Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.이 콘텐츠는 선택한 언어로 제공되지 않습니다.
54.2. Generated API Sub-Project
Overview 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
Assuming that you generated a new Maven project as described in Section 54.1, “Generate Code with the Maven Archetype”, you can now find a Maven sub-project for packaging the Java API under the
camel-api-example/camel-api-example-api
project directory. In this section, we take a closer look at the generated example code and describe how it works.
Sample Java API 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
The generated example code includes a sample Java API, on which the example API component is based. The sample Java API is relatively simple, consisting of just two Hello World classes:
ExampleJavadocHello
and ExampleFileHello
.
ExampleJavadocHello class 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
Example 54.1, “ExampleJavadocHello class” shows the
ExampleJavadocHello
class from the sample Java API. As the name of the class suggests, this particular class is used to show how you can supply mapping metadata from Javadoc.
Example 54.1. ExampleJavadocHello class
ExampleFileHello class 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
Example 54.2, “ExampleFileHello class” shows the
ExampleFileHello
class from the sample Java API. As the name of the class suggests, this particular class is used to show how you can supply mapping metadata from a signature file.
Example 54.2. ExampleFileHello class
Generating the Javadoc metadata for ExampleJavadocHello 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
Because the metadata for
ExampleJavadocHello
is provided as Javadoc, it is necessary to generate Javadoc for the sample Java API and install it into the camel-api-example-api
Maven artifact. The API POM file, camel-api-example-api/pom.xml
, configures the maven-javadoc-plugin
to perform this step automatically during the Maven build.