Alex Rivera | Logout

How to call for a Maven goal within an Ant script?

Asked 2011-09-28T09:35:53.703
39

Is it possible to call or execute a Maven goal within an Ant script?

Say I have an ant target called 'distribute' and inside which I need to call a maven 'compile' goal from another pom.xml.

Edit
Report

1 Answer

1

You can use the exec task and call mvn compile as a terminal command. This is not ideal since you won't have any control over the execution, but otherwise I don't think there is a way to execute a Maven goal.

answered 2011-09-28T09:40:13.030

Your Answer