You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by eyalg1972 <ey...@bmc.com> on 2009/03/24 20:33:55 UTC

Executing maven build from ant build

Hi,

I need to know how to run maven from ant.

Especially- if the pom.xml is in different directory - can you give the
maven the location of the pom.xml as a parameter? (I always run it from the
exact directory).

Do you use the ant exec task?

Did someone did it- and can give me an example of how it is done (Including-
parsing the result- success of failure)?

Thanks
-- 
View this message in context: http://www.nabble.com/Executing-maven-build-from-ant-build-tp22687975p22687975.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Executing maven build from ant build

Posted by Wayne Fay <wa...@gmail.com>.
> There are Maven tasks for Ant, but I find them extremely difficult to
> use. The documentation is just plain awful. The official Maven Ant
> page simply lists where you can download the JAR file, and that's it.
> I simply wanted Ant to run an existing pom.xml, but could find no way
> to do this.

If the Ant guys want to make it easier to call out and use Maven, they
will create plugins/tools to enable it as Maven has done with the
maven-antrun-plugin. Or someone else who cares can do this -- its all
open source.

You're complaining to the wrong group, I think. And you're assuming
the Maven Ant Tasks are designed for allowing you to run a Maven build
from Ant -- this is simply an incorrect assumption on your part. Read
the docs again:
http://maven.apache.org/ant-tasks/index.html

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Executing maven build from ant build

Posted by David Weintraub <qa...@gmail.com>.
There are Maven tasks for Ant, but I find them extremely difficult to
use. The documentation is just plain awful. The official Maven Ant
page simply lists where you can download the JAR file, and that's it.
I simply wanted Ant to run an existing pom.xml, but could find no way
to do this.

So, I simply did an <exec> to Maven instead.

On Tue, Mar 24, 2009 at 3:33 PM, eyalg1972 <ey...@bmc.com> wrote:
>
> Hi,
>
> I need to know how to run maven from ant.
>
> Especially- if the pom.xml is in different directory - can you give the
> maven the location of the pom.xml as a parameter? (I always run it from the
> exact directory).
>
> Do you use the ant exec task?
>
> Did someone did it- and can give me an example of how it is done (Including-
> parsing the result- success of failure)?
>
> Thanks
> --
> View this message in context: http://www.nabble.com/Executing-maven-build-from-ant-build-tp22687975p22687975.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>



-- 
--
David Weintraub
qazwart@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org