Running Examples
This section walks you through running the examples which are shipped with a binary distribution.
Before you start
First you need to Download a binary distribution.
To run the demos with maven, you need to download and install Apache Maven.
To test your Maven install, change directory to the examples directory and type:
mvn -v
You should see something like:
camel-rider:/tmp/camel/examples$ mvn -v Maven version: 2.0.8
Since Camel 1.4, you can also run the examples with Ant. To do so, download and install Apache Ant.
Several of the examples depend on other projects which you will need to download to run with Ant. Refer to the individual example README.txt files for details.
Running the examples in Maven
To run the first example using Maven, change directory to the example you want to run then issue the following command:
mvn exec:java
To run the other Spring-based examples such as the Spring Example, use the Camel Maven Plugin. For example:
cd camel-example-spring mvn camel:run
Running the examples in Ant
To run an example, change to the directory of the example you want to run, set any environment variables mentioned in the README.txt, and then launch ant:
on UNIX
cd camel-example-spring export ACTIVEMQ_HOME=<path to ActiveMQ install directory> ant
on Windows
cd camel-example-spring set ACTIVEMQ_HOME=<path to ActiveMQ install directory> ant
Running the examples in your IDE
In each example you can run the main() from your IDE.
To create an IDEA project, run
mvn idea:idea
If you are an Eclipse user, run
mvn eclipse:eclipse
You should now be able to open the project(s) in your IDE and run any main() method you wish.