What are the minimum steps I should follow to replace Ant with Maven?
-
- Set up your project according to the standard directory layout.
- Create a minimal pom.xml with groupId, artifactId and version.
- Add your dependencies to the pom.xml
You should now be able to build a simple project, run the tests and package it.
-
Anecdote: Once you are in Maven, the reverse trip (though why would you ever go back!) is so simple:
mvn ant:ant
generates functionally equivalent ant scripts. Now if only an Ant->Maven generator existed.
-
See these two posts for details:
-
I have built an automated script to migrate Ant builds to Maven. You can find more information here:
http://erichauser.net/2009/10/26/ant2maven-easy-migration-from-ant-to-maven-with-nexus/
There is a link to the GitHub repository at the bottom which contains the script.
-
You can have a look to ant2maven script, that builds pom.xml from Ant scripts. I've never tried it, but it can be used to have a good pom.xml to start with...
0 comments:
Post a Comment