Be aware that you have to exclude the route file (OpenApiRoute.java
) in the pom.xml
as this file will already be provided over the kamel run ...
CLI command.
Now that you have the source code packed in the jar file you have to provide this jar file to the Camel K container, where your Camel K route is running.
You can do this by adding the following (modelines)[https://camel.apache.org/camel-k/1.6.x/cli/modeline.html]
to your route file (OpenApiRoute.java
).
// camel-k: resource=file:../../../../../target/pojo-jar-1.0.0.jar // camel-k: trait=jvm.classpath=/etc/camel/resources/pojo-jar-1.0.0.jar
It's important to add the JAR file as resource to be compressed.
To run this integration use the following command:
kamel run ./src/main/org/apache/camel/OpenApiRoute.java