0

Many tools and ways are used to convert from ant to maven but what was the best for this migration ? Any help is appreciated.

user3237201
  • 479
  • 1
  • 4
  • 13

1 Answers1

0

Though, these may not be enough, but I've compiled some common practices while transferring module from ant to maven.

  1. Delete your build.xml completely. You'd have to rewrite it again because maven doesn't use it at all.
  2. Introduce a new pom.xml.
  3. Define main class in <mainClass>src.com.test.Main</mainClass> using maven-compiler-plugin. See this answer.
  4. 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.
  5. 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