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

Compare with Current View Page History

« Previous Version 2 Next »

Before we van really get started, we have to create a SA project which contains our servicemix-camel SU. Because this is basically what we have learned in the previous tutorial, we are just going to give an outline of the tasks at hand here. Feel free to look back there whenever you need help completing these steps.

Creating the projects

We are going to create 3 Maven projects:

  • a servicemix-camel SU project
  • a servicemix SA project
  • a parent project to hold the previous two

Create the parent project

Start by creating a new directory to hold your project. Add a pom.xml file to it:

<?xml version="1.0" encoding="utf-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.apache.servicemix.tutorial.camel</groupId>
  <artifactId>parent</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>pom</packaging>
  <name>SMX-Camel :: Tutorial</name>
  <url>http://servicemix.apache.org</url>
</project>

Create the servicemix-camel SU project

Use the servicemix-camel-service-unit Maven archetype to create a first SU project inside the parent directory:

mvn archetype:create -DarchetypeArtefactId-camel-service-unit -DarchetypeGroupId=org.apache.servicemix.tooling -DartifactId=tutorial-camel-su

Create the SA project and add the SU

Use the servicemix-service-assembly Maven archetype to create the SA project:

mvn archetype:create -DarchetypeArtifactId=servicemix-service-assembly -DarchetypeGroupId=org.apache.servicemix.tooling -DartifactId=tutorial-camel-sa

Don't forget to add the SU as a dependency to the SA's pom.xml:

<project>
  ...
  <dependencies>
    <dependency>
      <groupId>org.apache.servicemix.tutorial.camel</groupId>
      <artifactId>tutorial-camel-su</artifactId>
      <version>1.0-SNAPSHOT</version>
    </dependency>
  </dependencies>
  ...
</project>

Cleaning up and doing a first build.

Just do a quick clean-up of the generated pom.xml files (e.g. changing the project names to get more comprehensible logging output) and build the entire project using the command mvn install in the parent project directory. If everything i

Now, we will just tell the user what to expect from the next tutorial page

Further reading

  • add useful links to additional information on the website here
  • ...



  • No labels