Building ServiceMix From Source
ServiceMix 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. We have tested the build with Maven 2.0.6 8 and it works fine.
Previous / later versions of Maven may vary - if you hit problems on other versions please talk to us on the Mailing Lists.
, 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. Be sure to read the FAQ
ServiceMix 4.x requires to use Maven 2.2.1 or better.
Getting started
- Download and install Maven.
- Get the latest code from SVN
- Build the code with the following command
Code Block |
---|
mvn -Dmaven.test.skip=true -Pstep1 install mvn -Dmaven.test.skip=true -Pstep2 install |
Tip | ||
---|---|---|
| ||
|
Warning | ||
---|---|---|
| ||
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, use try the following items below:
|
Next time you build, you can just run
...
Checkstyle and PMD rules are used to scour the ServiceMix source code when performing a build. If you are hacking code and it does not follow these conventions, the build will fail. To make things easier on folks who are using Eclipse, there is an Eclipse code convention profile that matches the Checkstyle conventions, making things a bit easier in this regard. Import this profile into Eclipse under Preferences->Java->Code Style->Formatter->Import.
...
For Eclipse, a detailed description is given at Importing ServiceMix into Eclipse. In addition, this page also describes how to start ServiceMix inside Eclipse with all debugging possibilities.
Other IDEs
If you prefer to use another IDE then you can autogenerate the IDE's project files using maven plugins. e.g.
Code Block |
---|
mvn idea:idea
|
etcAny modern IDE with self respect can start a new project based on a Maven pom.xml file.
Note that you may need to build the whole ServiceMix project once using maven.
...