Building Mule ESB CE

I found the guides available on a bit cluttered when it came to how to build the Mule ESB from source.

First of it's the matter of finding the source. Following the guide lines in the official guide you see that it's the SVN repository on codehaus that is the main repo. There is a repository on github however this seems to just be a mirror that does not follow the main repository very well. The trunk is pretty much empty and it seems the branches/mule-3.3.x is where all the action is.

svn co

To simply build the distribution you can move into the distribution sub-directory and execute 'mvn'. However this will pull the latest Mule snapshot artefacts from the maven repository at codehaus.

cd distributions/standalone

This build ends in failure during assembly verification but this is because we did not build it with -DperformRelease=true so the javadoc and source bundle is not included.

After unpacking the resulting package you are ready to run

tar xzf mule-standalone-3.3.2-SNAPSHOT.tar.gz
cd mule-standalone-3.3.2-SNAPSHOT/bin

But if you simply wanted the binary distribution I recommend that you grab it from the download page. So instead we want to actually build our binaries from the source first. For that we need to move up a step and build the Mule artefacts and install them into the local maven repository.

cd ..
mvn clean
mvn -DskipTests install

This will build and install the packages in the local maven repo. After this you can rebuild the distribution.

cd distributions/standalone
mvn clean

After that you have your new server ready for testing. Just don't forget to create the lib/shared/default directory.

Good luck.