You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

We now have to configure the tutorial-file-su

Configuring pom.xml

Changing the project name

In order to make the build output a little bit more comprehensible, we first change the project name in the generated pom.xml file.

<project>
  ...
  <name>Tutorial :: File SU</name>
  ...
</project>

Adding a dependency for a JBI component

Every service unit is targeted at a specific JBI component. We also specify this in pom.xml, by simple adding a dependency to the targeted pom.xml. ServiceMix's Maven tooling will take care of the rest. In this case, we are going to add a dependency to servicemix-file (groupId is org.apache.servicemix. The ServiceMix version is specified as a property in the pom.xml file, so we are going to re-use the same version property here. Since we are not going to use JUnit here, the <dependencies> element below should be enough for your SU right now.

<dependencies>
  <dependency>
    <groupId>org.apache.servicemix</groupId>
    <artifactId>servicemix-file</artifactId>
    <version>${servicemix-version}</version>
  </dependency>
</dependencies>

Next, we will have to configure our new SU to really provide some services.

<h3>Things to remember</h3>

  • You specify the target component for a SU as a normal dependency in Maven's pom.xml file

  • No labels