Run Maven in Ant

The maven-antrun-plugin allows us to run Ant tasks in Maven. On the contrary, there is no Ant task for running Maven in Ant.

Luckily, Maven is command line based and so we can make use to the <exec> Ant task to run Maven command. =P

<target name="build" basedir="/${maven.project.directory}" >
	<exec>mvn install</exec>
</target>

Done =)

Reference: Nabble – How do I run maven build from ant

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.