Passing your Maven classpath to Ant:
In your pom.xml, configure something like this:
In your build.xml, have something like:
The path that maven is using should now be assigned to "runtime-classpath".
This is very useful for calling a custom ant task, when the definition is in your maven classpath.
Using ant-contrib tasks:
To use ant-contrib tasks with the maven-antrun-plugin you'll need to do a couple of things:
1. Add a taskdef.
2. Add some dependencies for the plugin:
Notice that the transcient dependency on ant:ant is execluded for ant-contrib. This is due to ant-contrib having a dependency on ant-1.5. I was getting the following error before replacing ant with ant-nodeps-1.6.5:
Here's full example of using the antrun plugin to move a war file to a jboss server deploy directory once it is built. You can also define the unpacked property (ie. mvn install -Dunpacked) to have the app moved exploded (or unpacked).
