DSL Modeline
| Deprecated: This dsl-modeline is deprecated and may be removed in a future release. |
Since Camel 3.16
Modeline is deprecated, and will be removed in a future release. Declare the dependencies of an integration in application.properties with camel.jbang.dependencies=groupId:artifactId:version (several separated by comma), or with camel run --dep, instead of //DEPS lines in the route files. |
Camel CLI
The Camel CLI reads JBang dependencies in the //DEPS comment style: a route file can name the extra Maven dependencies it needs, and camel run downloads them and adds them to the classpath. To find them, Camel reads every route file before it loads the routes, and logs a WARN for each file that has //DEPS lines.
A //DEPS line is a comment in the comment style of the file, such as //DEPS com.example:my-library:1.0 in a Java route and #//DEPS com.example:my-library:1.0 in a YAML route. One line can name several coordinates, separated by spaces; a coordinate that ends with @pom is skipped, and a coordinate can use a JVM system property as ${name} or ${name:default}.
The same dependencies in application.properties:
camel.jbang.dependencies=com.example:my-library:1.0,com.example:other-library:2.1 Modelines are on with camel run (the --modeline option, true by default) and in the dev profile of Camel Main (camel.main.modeline).