There are basically two way to install Ivy. Either manually or automatically.
Manually
Download the version you want [[download here]], unpack the downloaded zip file wherever you want, and copy the ivy jar file in your ant lib directory (ANT_HOME/lib). If you use ant 1.6.0 or superior, you can then simply go to the src/example/hello-ivy dir and run ant: if the build is successful, you have successfully installed Ivy ! If you use ant 1.5.1 or superior, you have to modify the build files in the examples: - remove the namespace section at their head: xmlns:ivy="antlib:org.apache.ivy.ant" - add taskdefs for ivy tasks:
- replace ivy:xxx tasks by ivy-xxx You can now run the build, if it is successful, you have successfully installed Ivy ! If the build is not successful, check the [[faq FAQ]] to see what can be the problem with the ivyrep resolver.
Ivy dependendencies
One of the two binary versions of Ivy doesn't include the optional dependencies. To download them using Ivy, all you need is to run the Ant build file provided in the distribution. This will use Ivy itself to download the dependencies. Then you should see the Ivy optional dependencies in the lib directory, organized per configuration (see the ivy.xml for details about the configurations and their use).
Automatically
If you want to use Ivy only in your ant build scripts, and have an internet connection when you build, you can download Ivy from this site and use the downloaded version automatically, using this simple build snippet:
Then the only thing to do is to add the init-ivy target in the depends attribute of your targets using Ivy, and add ivy namespace to your build script. See the self contained [[svn:src/example/go-ivy/build.xml go-ivy]] example for details about this.