简体   繁体   English

将Maven依赖项转换为Ant

[英]Transiting Maven dependencies to Ant

I am working on a JAVA project that is Ant based and I need to make it Mule enabled so that I can implement RAML based web-service in this. 我正在一个基于Ant的JAVA项目中工作,需要使它启用Mule,以便可以在其中实现基于RAML的Web服务。 And to make it Mule enabled, I have collected number of jars required and finally Mule flow is working fine. 为了启用Mule,我收集了所需的jar数量,最后Mule流正常运行。 But, using any different Mule component requires further dependencies hence, it is becoming difficult to collect all those every time and then I thought to Mavenize my project first but that I am not allowed to do. 但是,使用任何不同的Mule组件都需要进一步的依赖关系,因此,每次都很难收集所有这些组件,然后我想到首先将我的项目Mavenize,但是我不允许这样做。 So, I need to know that is there any way I can use POM.xml together with Ant or any other way so that I don't need to collect required jars rather it get managed automatically. 因此,我需要知道有什么方法可以将POM.xml与Ant一起使用或以其他任何方式使用,这样我就不需要收集所需的jar,而是可以对其进行自动管理。

I haven't used it yet but for Ant there is Ivy which can work with Maven Central. 我还没有使用过它,但是对于Ant来说,有Ivy可以与Maven Central一起使用。 Maybe it can help in your situation as well. 也许它对您的情况也有帮助。

You won't be needing pom.xml unless you mavenise your project but you can use Apache IVY to do the dependency management. 除非您对项目进行了改动,否则将不需要pom.xml,但是可以使用Apache IVY进行依赖项管理。 You can maintain an ivy.xml file and let your ant script include its execution while building the project. 您可以维护ivy.xml文件,并在构建项目时让您的ant脚本包括其执行。 You can also have a ivy settings.xml to take care of patterns/locations. 您还可以使用一个常春藤settings.xml来处理模式/位置。

-Shanky G. 香克

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

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