jQuery in Action, 2nd edition*
The moose likes Ant, Maven and Other Build Tools and the fly likes Issue while Calling Maven from Ant Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Issue while Calling Maven from Ant" Watch "Issue while Calling Maven from Ant" New topic

Issue while Calling Maven from Ant

Anand Bhatt
Ranch Hand

Joined: May 30, 2007
Posts: 189
I have created one Maven project( having pom.xml at root). I am using Ant to build my whole project. Now my requirement is that I want to compile my Maven project using build.xml.

I have placed below block/target in build.xml but it's not working for me.

Can some one share the correct sysntax to complie the java code: Below is my pom.xml

Peter Johnson

Joined: May 14, 2008
Posts: 5812

If you open a command prompt at D:\TestProject\EventFile_Process and run "mvn install", does it work?

I have never used the maven plugin for ant, but from my reading the artifact:pom task populates the Ant build with the Maven properties. Thus it does not invoke the POM using Maven. To invoke the Maven build, you need to use the artifact:mvn task (http://maven.apache.org/ant-tasks/examples/mvn.html)

JBoss In Action
I agree. Here's the link: http://aspose.com/file-tools
subject: Issue while Calling Maven from Ant
Similar Threads
how do i send a email test report from maven
maven java:compile
how to make the plugin jar to take the specified version from the pom.
maven error
maven descriptor for any IDE