aspose file tools*
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
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
Author

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
author
Bartender

Joined: May 14, 2008
Posts: 5843
    
    7

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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Issue while Calling Maven from Ant