LibraryLink ToToggle FramesPrintFeedback

Stage 1: Create a New Project

In this stage, you create a Maven project (simple-router) that contains a sample application.

To create the project do the following:

  1. Create a new directory, ProjectRoot.

  2. In a command window, change to the ProjectRoot directory.

  3. Enter the following command to create the simple-router project:

    mvn archetype:create 
    -DremoteRepositories=http://repo.fusesource.com/maven2 
    -DarchetypeGroupId=org.apache.camel.archetypes 
    -DarchetypeArtifactId=camel-archetype-java 
    -DarchetypeVersion=2.4.0-fuse-00-00 
    -DgroupId=tutorial 
    -DartifactId=simple-router
    [Note]Note

    Maven accesses the Internet to download JARs and store them in its local repository.

    Maven creates the following directories and files:

    ProjectRoot/simple-router
    ProjectRoot/simple-router/pom.xml 1
    ProjectRoot/simple-router/ReadMe.txt
    ProjectRoot/simple-router/src
    ProjectRoot/simple-router/src/data
    ProjectRoot/simple-router/src/data/message1.xml 2
    ProjectRoot/simple-router/src/data/message2.xml 3
    ProjectRoot/simple-router/src/main
    ProjectRoot/simple-router/src/main/java
    ProjectRoot/simple-router/src/main/java/tutorial
    ProjectRoot/simple-router/src/main/java/tutorial/MyRouteBuilder.java 4
    ProjectRoot/simple-router/src/main/resources
    ProjectRoot/simple-router/src/main/resources/log4j.properties
    ProjectRoot/simple-router/src/main/resources/META-INF
    ProjectRoot/simple-router/src/main/resources/META-INF/spring
    ProjectRoot/simple-router/src/main/resources/META-INF/spring/camel-context.xml 5
              

    Some of the project artifacts are described below:

    1

    pom.xml is a Maven project file.

    2

    message1.xml is an input message in XML format.

    3

    message2.xml is an input message in XML format.

    4

    MyRouteBuilder.java is a Java source file that implements the sample route.

    5

    camel-context.xml is a Spring configuration file.