Eclipse's Ant integration


Most Eclipse™ distributions include a plugin to launch Apache Ant build files. The provided Apache Ant distribution is a standard distribution of Ant that doesn't include Apache Ivy. You may wish to run Ivy targets against Eclipse's Ant distribution.

Install the plugin

Since IvyDE 2.2, a dedicated plugin can be install so that Ivy Ant tasks are automatically added to Ant's classpath. Go check the IvyDE updatesite and install the plugin named "Apache Ivy Ant Tasks"

Manual Configuration

If you want to install your custom version of Ivy, you'll need to do it manually.

In the global preference page of the Ant runtime, click on Add External JARs...

Then browse your filesystem to the plugins directory of your Eclipse installation and select the Ivy jar named org.apache.ivy_2.X.X.XXXXXXXXX.jar. Now Ivy has been added to the classpath of the Ant distribution embedded in Eclipse.

Run Apache Ivy targets

Create an Ant build file and declare the Ivy targets with:
    <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" />
And don't forgot to declare the namespace xmlns:ivy="antlib:org.apache.ivy.ant".

After the taskdefs have been added, you will have code completion on Ivy tasks:

The build will now be successful:


Printer Friendly