许多工具和方法用于从ant转换为maven,但这种迁移的最佳方法是什么? 任何帮助表示赞赏。
答案 0 :(得分:0)
尽管如此,这些可能还不够,但我在将模块从ant转移到maven时编译了一些常见的做法。
build.xml
。你不得不重新重写它,因为maven根本没有使用它。pom.xml
。 <mainClass>src.com.test.Main</mainClass>
在maven-compiler-plugin
中定义主要课程。请参阅this answer。build.xml
中使用的.jar,在线搜索其依赖项,然后在pom.xml中添加。您还可以添加local dependencies in your pom.xml。有关更多最佳做法,请参阅此答案 Moving onto Maven Anyway...