在 netbeans 中使用蚂蚁常春藤 [英] using ant ivy in netbeans

查看:30
本文介绍了在 netbeans 中使用蚂蚁常春藤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于我是 Ant+Ivy 的新手,这可能听起来很幼稚,但请耐心等待.我最近安装了 Ivy plugin 来使用 netbeans.但我不知道接下来该怎么办?我必须自己创建 ivy.xml 文件吗?我是否必须在某处添加对 nbbuild.xml 的引用?如果是,在哪里?

Since I am new to Ant+Ivy this might sound very naive question but please bear with me. I recently installed Ivy plugin to work with netbeans. But I don't know what to do next? Do I have to create ivy.xml file myself ? do I have to add its reference to nbbuild.xml somewhere? if yes where?

最后是如何编写ivy.xml 来获取我正在使用的库的最新版本.例如我正在使用 jgraph.jar、commons-codec-1.6.jar 等,有人可以演示如何在 ivy.xml 文件中编写代码以获取这些的最新版本吗?这些在 maven 中央存储库 中可用,我可以通过 ivy.xml 连接到那个吗?如果是,如何?

and finally how to write ivy.xml to fetch latest versions of the libraries I am using. e.g. I am using jgraph.jar, commons-codec-1.6.jar etc, Can somebody demonstrate how to write code in ivy.xml file to fetch the latest versions of these? These are available in the maven central repository, Can I connect to that thru ivy.xml? If yes how?

推荐答案

以下对您的其他问题的回答给出了启用 ivy 的项目的详细示例:

The following answer to your other question gives a detailed example of a working ivy enabled project:

是的,您必须创建 ivy.xml 文件,但 Maven Central 使这非常容易.您的示例如下:

Yes, you'll have to create the ivy.xml file yourself, but Maven Central makes this really easy. Your examples are as follows:

只需将 ivy 依赖项声明复制-n-粘贴到您的 ivy.xml 文件中:

Just copy-n-paste the ivy dependency declarations into your ivy.xml file:

<dependencies>
  <dependency org="jgraph" name="jgraph" rev="5.13.0.0" />
  <dependency org="commons-codec" name="commons-codec" rev="1.6" />
</dependencies>

更新

如果您想要最新版本的依赖项,请使用 动态修订功能.

<dependencies>
  <dependency org="jgraph" name="jgraph" rev="latest.release" />
  <dependency org="commons-codec" name="commons-codec" rev="latest.release" />
</dependencies>

请注意,这可能会导致构建不稳定,因为 3rd 方项目会随着时间的推移而发生变化.

Be warned this can lead to build instability as 3rd party projects will change over time.

这篇关于在 netbeans 中使用蚂蚁常春藤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆