在蚂蚁中加入外部罐子(Include external jars in ant)

编程入门 行业动态 更新时间:2024-10-28 14:28:27
在蚂蚁中加入外部罐子(Include external jars in ant)

我是编写构建文件的新手,目前我正在为我的项目编写ant。 我面临的问题是将jar包含在ant build文件中。 根据标准的'ant build',jar需要保存在lib文件夹中。 但问题是jar是非常巨大的,超过100 GB的大小因此无法保存在GitHub中。

我把它放在另一个存储库中,并希望将其包含在我的构建文件中。

有人可以让我知道如何将网箱中的罐子包含在我的'pathelement location'中。

I am new to writing build files and currently I am writing the ant for my project. The issue I am facing is to include the jar to in ant build file. As per the standard 'ant build' the jars need to be kept in lib folder. But the issue is the jar is very huge, more than 100 GB of size and hence cannot be kept in GitHub.

I have put that in another repository and want to include that in my build file.

Could anyone please let me know how to include the jars in my 'pathelement location' from the url.

最满意答案

Apache ivy是第三方依赖管理器,是Maven和Gradle等更现代的Java构建工具中内置的强大功能。

下面的答案给出了一个详细的例子,使用常春藤来管理类路径并帮助创建可执行jar。

Ant,Ivy和JUnit找不到类 - build.xml中出错?

您提到了另一个存储库的使用。 据推测,这是一个像Nexus或Artifactory这样的Maven存储库管理器。 常春藤有能力从这些下载。 (这将是另一个问题:-))

Apache ivy is a 3rd party dependency manager, a powerful feature built into more modern Java build tools like Maven and Gradle.

The following answer gives a detailed example, using ivy to manage classpaths and help in the creation of an executable jar.

Class not found with Ant, Ivy and JUnit - error in build.xml?

You mentioned the use of another repository. Presumably this is a Maven repository manager like Nexus or Artifactory. Ivy is capable of downloading from these. (which would be another question :-))

更多推荐

本文发布于:2023-08-01 05:27:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1354302.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:罐子   蚂蚁   Include   ant   jars

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!