Is it possible to execute build.xml
script with Maven?
This script checksout all my projects and subprojects and I've just got used to using maven, didn't really use much of an ant before and I know ant can be used with Maven. So my question is: how?
I'm really not a big fan of this approach (either use Ant, or Maven, but not a bastard mix) but you can use an external
build.xml
with the Maven AntRun Plugin:And then run
mvn antrun:run
(or put the configuration inside anexecution
if you want to bind the AntRun plugin to a lifecycle phase, refer to the Usage page).Update: If you are using things from ant-contrib, you need to declare it as dependency of the plugin. I've updated the plugin configuration to reflect this. Also note the
taskdef
element that I've added (I'm not sure you need theclasspathref
attribute though).You can execute ant scripts via the Maven-Ant Plugin, but why do you need Ant to checkout your project? Haven't you organized your sub-projects to be in the same tree?