Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Before we van really get started, we have to

Excerpt

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.

Section

More detailed information about section

...

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:

Code Block
xml
xml

<?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:

No Format

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:

No Format

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:

Code Block
xml
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

...