Create a new extension
You should know how to build.
Go through the Quarkus extension author’s guide to get an idea of what is expected from you.
Make sure that nobody else works on the same extension already by searching through the GitHub issues.
Let others know that you work on the given extension by either creating a new issue or asking to assign an existing one to you.
Scaffold the necessary Maven modules using
quarkus-maven-plugin. As an example let’s add a new extension for supporting an imaginary Camel component
$ cd camel-quarkus $ mvn cq:create -N -Dcq.artifactIdBase=foo-abc
foo-abcis the unique part of the new extension’s
The above sequence of commands does the following:
It creates three new Maven modules under the
camel-quarkus-foo-abc(a.k.a. the runtime module) and
These three modules are linked where necessary:
camel-quarkus-foo-abc-parentis added to the
camel-quarkus-foo-abcis added to the
<dependencyManagement>of the runtime BOM (Bill of Materials)
camel-quarkus-foo-abc-deploymentis added to the
<dependencyManagement>of the deployment BOM (Bill of Materials)
It creates a basic
FooAbcProcessorclass in the deployment module.
It also creates a stub of an integration test module under
Add the extension name to the right category in
Compilation performed immediately after generating the modules should pass flawlessly but running the tests will fail because the test project needs to get finished. You need to build
poms/bom-deploymentone time first.
Review the generated
descriptioncomes from Camel Catalog. If it looks improper or too long due to concatenation of multiple component descriptions, you may override it by setting an explicit
<description>in the runtime
pom.xmlof your new extension. If you think the value coming from Camel Catalog should be changed, please file a new Camel issue and ask to fix the metadata for the given Camel component.
If there is some important keyword missing in both the
descriptionthrough which your new extension should definitely be findable on code.quarkus.io, consider setting
<quarkus.metadata.keywords>property in your runtime
mvn -N cq:update-quarkus-metadatafrom the source tree’s root directory to re-generate the
Check the Extension metadata page for more details about the
Review the dependencies in the generated runtime and deployment modules. In case the given library is supported by Quarkus, you may want to add a dependency on the corresponding Quarkus extension.
Complete the integration test module under
integration-tests/foo-abc. Make sure you test both the consumer and the producer of the component (if the component supports both). Make sure the tests are passing both in the JVM mode (
mvn test) and in the native mode (
mvn verify -Pnative).
If your test application is going to be configured via
camel.component.*properties, you need to add the
camel-quarkus-maindependency to the test project. See the Bootstrap section of the User guide for more details.
Read the Extension documentation page and add
usage.adoc, etc. in
src/main/docdirectory of the runtime module if necessary.
After completing the extension documentation, run `mvn clean install -DskipTests` from the root of the source tree to add your extension to the autogenerated list of extensions.
Before sending a pull request, please make sure you have run the following Maven command from the project root folder:
$ mvn process-resources -Pformat
The above command will perform the following tasks:
Add license headers to the new files
Re-generate the list of extensions and the Camel Quarkus Catalog
Sort elements in various POM files properly
Review the result visually.
Please squash your commits before sending a pull request.