--- <% attributes("title") = "Building ServiceMix" %> title: Building ServiceMix --- name:content pipeline:markdown # Building ServiceMix From Source ServiceMix uses [Maven](http://maven.apache.org/) as its build and management tool. We have tested the build with Maven 2.0.8 and it works fine, but Maven 2.0.9 is known to cause some issues that prevent a successful build for ServiceMix 3.2.1 and previous versions. This has been fixed for 3.2.2 and 3.3. ServiceMix 4.x requires to use Maven 2.2.1 or better. ## Getting started * Download and [install Maven](http://maven.apache.org/download.html#Installation). * Get the latest code [from SVN](source.html). * Build the code with the following command {pygmentize:: text} mvn -Dmaven.test.skip=true -Pstep1 install mvn -Dmaven.test.skip=true -Pstep2 install {pygmentize}
It may happen, that building step1 fails with an error message regarding PMD or checkstyle. In this case you can add a nochecks
to the line so it looks like this:
Also, if an out of memory error is encountered during compilation, set the MAVEN_OPTS
environment variable to a larger amount of memory. Below is an example:
settings.xml
file to avoid this problem:
{pygmentize:: xml}
There is an issue in building if you use the system property style of declaring the profiles (i.e., -Dprofile=step2
) as the XFire Maven plugin thinks step2
is a profile name it should use. This is fixed in the ServiceMix trunk (3.3 or greater). To work around this issue, try the following items below:
-Pstep2
style of declaring the profile as noted aboveIf an out of memory error is encountered when building 3.1.1, setting the following environmental variable may help
MAVEN_OPTS=-Xmx768m
Note that this only works for versions from 3.0-M3.
To build previous versions, you need to run:
{pygmentize:: text} mvn -N install cd tooling mvn install -Dmaven.test.skip=true cd .. mvn install -Dmaven.test.skip=true {pygmentize}