ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <>
Subject Re: calling maven2 files from ant
Date Tue, 06 Jun 2006 09:43:38 GMT
EJ Ciramella wrote:
> Without some really hacky scripty goodness, is there a clever way to
> call maven2 with an ant script?
> I'm working on getting a maven 2 based project up and running under
> cruisecontrol and I've taken advantage of lots of little ant benefits.
> Some things simply don't work using maven 2 directly, but having ant
> call into maven would make things much easier.

Axis2's build.xml delegates to maven1

     <property name="maven.commoncmd" value="--emacs" />
     <condition property="maven.line"
         value="--offline ${maven.commoncmd}">
       <istrue value="${offline}"/>

     <condition property="maven.executable" value="maven.bat">
       <os family="windows" />
     <property name="maven.executable" value="maven" />

     <property name="maven.line" value="${maven.commoncmd}" />
     <presetdef name="maven">
       <exec failonerror="true" executable="${maven.executable}">
        <arg line="${maven.line}" />

this is used in targets like

   <target name="clean" depends="init"
       description="clean everything">
       <arg value="multiproject:clean"/>

   <target name="dist" depends="init"
       description="make a distribution">

   <target name="dist-lite" depends="init"
       description="make a distribution, skip testing">
       <arg value="-Dmaven.test.skip=true" />

   <target name="create-lib" unless="jars.present" depends="init"
       description="creates the libraries">
       <arg value="create-lib" />

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message