简体   繁体   English

蚂蚁使用Maven的库

[英]Ant use Maven's library

I wrote a project which use maven. 我写了一个使用Maven的项目。 It's good for me. 对我有好处
But, some other people don't have maven, so I am trying to write an ant build.xml for them. 但是,其他一些人没有maven,因此我正在尝试为他们编写一个ant build.xml。

My question is : 我的问题是

Inside "javac" -> "classpath" tag, how could ant get the libs I used in the project from maven? 在“ javac”->“ classpath”标签内,ant如何从maven获取我在项目中使用的库? So that could compile & pack all the 3rd-party libs into release via ant. 这样就可以通过ant编译并打包所有第3方库。

Is this possible or there are better solution for maven & ant exists in same project. 这是可能的还是对于同一项目中存在的maven&ant有更好的解决方案。

Ant combined with Ivy is your answer. 蚂蚁结合常春藤是您的答案。 Ant can use a Maven repository to pull in jars, and can even be made to output a pom.xml , so the jar can be deployed back to a Maven repository. Ant可以使用Maven存储库引入jar,甚至可以输出pom.xml ,因此可以将jar部署回Maven存储库。

I have an ivy.dir project on Github that I use to help integrate Ivy into already existing Ant tasks -- especially if they use Subversion as a version control system. 我在Github上有一个ivy.dir项目,用于帮助将Ivy集成到现有的Ant任务中-尤其是当它们使用Subversion作为版本控制系统时。 You can create a ivy.dir subproject, and make that an external on the Ant project. 您可以创建一个ivy.dir子项目,并将其作为Ant项目的外部项目。

Have a look at ivy . 看看常春藤 Use it to download your dependencies for ant from a maven repository. 使用它可以从Maven存储库下载ant的依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM