Suppose you had created and maintained your project from maven from long time, but now you have instructions to move it to ant build environment. Well, it does not look easy, but it really is very much.
All you need to use if maven ant plugin which is specifically only for this purpose. e.g.
$ mvn ant:ant
Lets see a detailed example.
1) Create sample maven project
$ mvn archetype:generate -DgroupId=com.howtodoinjava -DartifactId=antBuildScriptDemo -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
2) Generate ant script from pom.xml
$ cd antBuildScriptDemo $ mvn ant:ant
Above command will generate 3 files in project root folder.
To run the above generated ant file, install ant in your system and execute the
build.xml file like this:
Happy Learning !!