About Semika Kaluge
The maven-antrun-plugin allows us to run ant targets with various maven build phases. I am going to explain very practical usage of maven-antrun-plugin specially for developers with development environment.
Normally with maven build, you will bundle your project either to a war file or ear file. You can directly copy this war or ear file into the server deployment folder by using maven-antrun-plugin. If your sever is tomcat, you can directly copy your archive file to ‘webapps‘ folder easily. Some developers are used to copy the archive file to the server deployment folder manually even with their development. For them, this post will be very helpful.
If you want to use maven-antrun-plugin to copy your archive file into the server deployment folder every time when you build the project, you can add the following plugin into your pom.xml file and use what ever the ant targets as you wish.
Which pom.xml file, I am going to put this plugin to?
Source : http://www.javacodegeeks.com/2013/07/how-to-run-ant-targets-with-maven.html