Skip to content

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

Image title

  1. Open application.properties file in a project
  2. Add dependency in camel.jbang.dependencies in the format of group:artifactId:version
  3. 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.yaml files.

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.

  1. Build and publish the library to a Maven repository, for example the Maven mirror included with the platform.
  2. Open templates/application.properties.
  3. Add the library to camel.jbang.dependencies in the group:artifactId:version format:

    templates/application.properties
    camel.jbang.dependencies=com.mycompany:integration-commons:1.0.0
    
  4. Every project created from this template inherits the dependency, and the custom Processor or AggregationStrategy implementations 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.