1

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?

voidMainReturn
  • 3,339
  • 6
  • 38
  • 66

1 Answers1

2

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.

Community
  • 1
  • 1
Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185
  • Another question, so now the rev is 5.13.0.0. Whenever there is a new version of jGraph, wlill my ivy.xml automatically know that and fetch it for me? – voidMainReturn Jun 18 '13 at 00:00
  • And one last question is about nbbuild.xml : now that I have ivy.xml file, How to include it in nbbuild.xml or how to tell nbbuild.xml to refer to this file ? – voidMainReturn Jun 18 '13 at 00:06
  • @tejas I have updated the answer. I don't use netbeans so I don't know what the nbbuild.xml file is. I suspect it's a generated build file, in which case you'll have to integrate the changes. Perhaps look at the netbeans IDE I suggested in the other question. – Mark O'Connor Jun 18 '13 at 00:12
  • Thanks for your support so far. I'll find out on how to integrate it to nbbuild.xml. – voidMainReturn Jun 18 '13 at 01:02