Building Camel from Source

Camel uses Maven as its build and management tool. If you don’t fancy using Maven you can use your IDE directly or Download a distribution or JAR.

Prequisites

Required:

Maven options

To build camel maven has to be configured to use more memory

Unix/Linux/Mac

export MAVEN_OPTS="-Xms2048m -Xmx3584m"

Windows

set MAVEN_OPTS="-Xms2048m -Xmx3584m"

A normal build

Beware this runs all the unit tests which takes a couple of hours.

mvn clean install

A quick build without running tests

The following skips building the manual, the distro and does not execute the unit tests, which can complete in 15-20 minutes.

mvn clean install -Pfastinstall

A normal build without running tests but checkstyle verification enabled

mvn clean install -Pfastinstall,sourcecheck

Building with checkstyle

To enable source style checking with checkstyle, build Camel with the -Psourcecheck parameter

mvn clean install -Psourcecheck

Building source jars

If you want to build jar files with the source code, that for instance Eclipse can important so you can debug the Camel code as well. Then you can run this command from the camel root folder:

mvn clean source:jar install -Pfastinstall

Working with karaf features

If you change anything in the features.xml from platform/karaf you can run a validation step to ensure the generated features.xml file is correct. You can do this running the following maven goal from the platform directory.

mvn clean install -Pvalidate