Many tools and ways are used to convert from ant to maven but what was the best for this migration ? Any help is appreciated.
Asked
Active
Viewed 2,192 times
1 Answers
0
Though, these may not be enough, but I've compiled some common practices while transferring module from ant to maven.
- Delete your
build.xml
completely. You'd have to rewrite it again because maven doesn't use it at all. - Introduce a new
pom.xml
. - Define main class in
<mainClass>src.com.test.Main</mainClass>
usingmaven-compiler-plugin
. See this answer. - For .jar that you're using in your
build.xml
search their dependencies online and add then in pom.xml. You can also add local dependencies in your pom.xml. - Transfer your images, text, audio, video, docs, pdf, xml to resources folder. (see also: What is the purpose for the resource folder?)
For more best practices see this answer also.
Moving onto Maven Anyway...

Community
- 1
- 1

Raman Sahasi
- 30,180
- 9
- 58
- 71