Dependencies
Use case
Custom libraries or dependencies can be utilized in integration projects. The instructions below explain how to incorporate an external library or dependency into the project.
Design
- Open
application.propertiesfile in a project - Add dependency in
camel.jbang.dependenciesin the format ofgroup:artifactId:version -
Use comma to separate multiple dependencies.
Note
Apache Camel components and dependencies related to Enterprise Integration Patterns (EIP), expressions, and data formats should not be manually added to
camel.jbang.dependencies. Instead, they are automatically resolved by analyzing the*.camel.yamlfiles.
Maven Mirror
The Talisman Platform includes an out-of-the-box Maven Repository mirror that stores essential dependencies for project builds. This mirror can be configured to download dependencies from Maven Central or other custom Maven repositories.
Maven Dependency Approach
Package the classes into a separate library, publish it to a Maven repository, and add it to the application.properties template as a default dependency. The processors become globally available to every new project while the project source stays clean.
- Build and publish the library to a Maven repository, for example the Maven mirror included with the platform.
- Open
templates/application.properties. -
Add the library to
camel.jbang.dependenciesin thegroup:artifactId:versionformat: -
Every project created from this template inherits the dependency, and the custom
ProcessororAggregationStrategyimplementations can be referenced by name from the routes.
See Design above for details on declaring dependencies in a single project.
Sharing code across projects
To make the same processors, routes, or scripts available to every new project — either as a default Maven dependency as described above, or as source code copied into the project — see Libraries.
