Create pom.xml
Create a pom.xml file where you set the project and configuration details. This file is used by Maven to build the project.
<modelVersion>4.0.0</modelVersion>
<groupId>net.pricefx.integration</groupId>
<artifactId>helloworld-integration</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<properties>
<finalName>helloworld-integration</finalName>
<encoding>UTF-8</encoding>
<version.Java>1.8</version.Java>
<version.camel>2.17.1</version.camel>
<version.pricefx>1.0.1</version.pricefx>
<version.spring>1.3.3.RELEASE</version.spring>
<maven.compiler.source>${version.Java}</maven.compiler.source>
<maven.compiler.target>${version.Java}</maven.compiler.target>
<project.build.sourceEncoding>${encoding}</project.build.sourceEncoding>
<project.reporting.outputEncoding>${encoding}</project.reporting.outputEncoding>
</properties>
Maven Dependencies Management
IM implementations use many dependencies from Camel and Spring frameworks or other 3rd party libraries. This section shows best practices in using and configuring dependency management in your project.
Valid from the version 1.0.4.
Use this code in your pom.xml:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>net.pricefx.integration</groupId>
<artifactId>pricefx-api-client-parent</artifactId>
<version>1.0.4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Now you can use the IntegrationManager lib, Camel and Spring libs without version. The versions are pulled from the pricefx-api-client-parent project.
Dependencies example in simple project
<dependencies>
<dependency>
<groupId>net.pricefx.integration</groupId>
<artifactId>integration-manager-starter</artifactId>
</dependency>
<dependency>
<groupId>net.pricefx.integration</groupId>
<artifactId>integration-manager-starter-routesdeployment</artifactId>
</dependency>
<dependency>
<groupId>net.pricefx.integration</groupId>
<artifactId>integration-manager-starter-prometheus</artifactId>
</dependency>
<dependency>
<groupId>net.pricefx.integration</groupId>
<artifactId>camel-pfx</artifactId>
</dependency>
</dependencies>
Add the Spring Boot plugin to pom.xml.
If you want to migrate to a newer version of IM, you will only change the version element in the dependencyManagement block and all versions will update according to the versions set in pricefx-api-client-parent project.
IntegrationManager version 6.0.0