Promote JVM extension to Native
The directory extensions-jvm contains extensions that have not been tested in
native mode yet. Configuring the
native build and implementing integration tests for
them may open the door to even faster startup and lower memory footprint.
Please find some guiding steps below to start this quest:
-
Make sure that nobody else works on promoting the same extension by searching through the GitHub issues.
-
Let others know that you work on promoting the given extension by either creating a new issue or asking to assign an existing one to you.
-
Use the
promotemojo ofcq-maven-pluginto perform the automatable steps:$ cd camel-quarkus $ mvn -N cq:promote -Dcq.artifactIdBase=...where
cq.artifactIdBaseneeds to be set to the unique part of theartifactIdof the extension you are promoting. E.g. if you are promoting an extension withartifactIdcamel-quarkus-foo, you need to set-Dcq.artifactIdBase=foo.The
promotemojo does the following for you:-
Copies the test module from
extensions-jvm/foo/integration-testtointegration-tests/foo -
Adjusts the
nameandartifactIdof the test module -
Adds
nativeprofile to the test module -
Creates a native test class extending the existing JVM mode test class
-
Copies the rest of the extension code from
extensions-jvm/footoextensions/foo -
Removes the warning build step from the processor class in the deployment module
-
-
Assign the integration test to an existing or new test category in
tooling/scripts/test-categories.yamlso that it gets executed by the CI. -
Add some meaningful tests to
FooTestand make sure they pass in both JVM and native mode:$ cd integration-tests/foo $ mvn clean verify -PnativeConsider shifting some tasks from runtime to build time. The Quarkus extension author’s guide may be a good ally for this.
-
Unify source files format, update docs and rebuild the whole project:
$ mvn clean install -DskipTests -Pformat -
Squash your commits before sending a pull request.
Good luck!