Kennis Building Mule 2 with Maven 3

Building Mule 2 with Maven 3

For the project I was working on, I wanted to try out the Mule ebMS adapter written by Clockwork. This adapter needs Mule 2, but unfortunately some of the dependencies for the latest release of Mule 2 (2.2.1) seem to have vanished from the popular Maven repositories.

No worries though, the Mule 2.2 source is not dead yet! Looking into their subversion repository you will find newer tags, so I checked out the latest tag, 2.2.8, and tried to build it - only to get a build failure.
I was using Maven 3, but Mule 2 was written for Maven 2. Not wanting to install an older version of Maven, I set out to fix the problem. Turned out there were actually two:
Firstly, Maven 3 does not want you to use values directly in the <includes> element, not even if it is a single value instead of a comma-separated list. Rather, you should use the child <include> element.
Secondly, the gmaven-plugin version used by Mule does not play nice with Maven 3. Upgrading to the latest version (1.4) fixed that.

This one was not all that hard to solve in the end, but it took a lot of googling and experimenting. I hope I will save you that trouble!