I've been trying to find a good way to specify some ant tasks(defined in build.xml) in pom.xml of a Maven project. For example, in my build.xml, I have the following line of code;
<target name="clean">
<delete dir="dist"/>
<delete dir="build"/>
</target>
How can I perform this action in my pom.xml?
Use maven-antrun-plugin.
You can put in the target ANT commands. Here the example of the maven-antrun-plugin on phase install that execute your commands: