Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.

Creating a new Spring based Camel Route

If you want to create your own version of the Spring Example you can use the maven archetype.

mvn archetype:generate                   \
  -DarchetypeGroupId=org.apache.camel.archetypes  \
  -DarchetypeArtifactId=camel-archetype-spring   \
  -DarchetypeVersion=1.5.0             \
  -DgroupId=myGroupId                  \
  -DartifactId=myArtifactId   

Note: -DarchetypeVersion=1.5.0 is the version number of Camel. Change this to the current version of Camel you are using.

When using camel archetypes, make sure your package name is not org.apache.camel (or a sub package of this) as this will instruct Camel to search in its own packages for your routes. This can also cause Camel not to start, as shown in CAMEL-1197. You can change your package name by specifying -Dpackage

This will create a maven project which can be run immediately via the Camel Maven Plugin as follows

cd myArtifactId
mvn camel:run

The configuration file is in src/main/resources/META-INF/spring/camel-context.xml.

The routing rules lives at src/main/java/myGroupId/MyRouteBuilder.java

© 2004-2015 The Apache Software Foundation.
Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
Graphic Design By Hiram