Run without source code
Is it possible to run integrations contained in a JAR file, without having to specify which source files will be used? Or pull a Maven dependency and run every route on it?
I think a better implementation what I was talking about is in #334
There are several ways to use custom dependencies. Pre 1.9 you can use Jitpack dependencies (https://camel.apache.org/camel-k/1.9.x/configuration/dependencies.html#dependencies-kind-jitpack). In 1.9 release you can use directly the -d option passing your dependency, such as:
kamel run MyIntegration.java -d file://path/to/my-integration.jar
Have a look to the blog post for some more detail: https://camel.apache.org/blog/2022/04/camel-k-release-1-9/
In your example you still must have a MyIntegration.java integration file.
Let's suppose that all my routes are packaged a few JAR files and pushed to a Maven repository. For example, I have a common-routes JAR with shared routes and another JAR files with the routes itself, customer-route-package, which depends on common-routes.
What I'm trying to accomplish is something like:
kamel run mvn:my.org:customer-route-package:1.0 -d mvn:my.org:common-routes:1.0
It will even better if somehow the dependencies could be automatically pulled, like they would if the route-package artifact was used as a dependency in another project.
camel k is powered on top of camel-main, and it has a ton of options for route discovery. But it may be that the camel-k-operator is hardcoding some of these options so you can't tweak it
See the option camel.main.routesIncludePattern
https://camel.apache.org/components/3.17.x/others/main.html
Where you can configure it with classpath:xxx to do classpath scanning.
Ah, okey, I got it now. That is not possible at the moment. Maybe you can play a bit with the jvm trait and use the options to tune the resulting java execution command, but the presence of a source appears to be required at the moment.
This issue has been automatically marked as stale due to 90 days of inactivity. It will be closed if no further activity occurs within 15 days. If you think that’s incorrect or the issue should never stale, please simply write any comment. Thanks for your contributions!
This issue has been automatically marked as stale due to 90 days of inactivity. It will be closed if no further activity occurs within 15 days. If you think that’s incorrect or the issue should never stale, please simply write any comment. Thanks for your contributions!