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?
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?
The following answer to your other question gives a detailed example of a working ivy enabled project:
Yes, you'll have to create the ivy.xml file yourself, but Maven Central makes this really easy. Your examples are as follows:
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>
Update
If you want to latest revision of a dependency then use the dynamic revisions feature.
<dependencies>
<dependency org="jgraph" name="jgraph" rev="latest.release" />
<dependency org="commons-codec" name="commons-codec" rev="latest.release" />
</dependencies>
Be warned this can lead to build instability as 3rd party projects will change over time.
来源:https://stackoverflow.com/questions/17158456/using-ant-ivy-in-netbeans