Eclipse's Ant interation

Most Eclipse distribution includes a plugin to launch ant build files. The provided Ant is a standard distribution of Ant and so it doesn't include Ivy. But you probably want to use Ivy targets within the Eclipse's Ant.

Configure Ant classpath

For now IvyDE doesn't contribute to the Ant classpath of the Eclipse plugin, so you will have to do it manually.

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

Then browse your filesystem into the plugins directory of your Eclipse install, and select the Ivy jar named org.apache.ivy_2.X.X.XXXXXXXXX.jar. And that's it, Ivy has been added to the classpath of Ant embedded in Eclipse.

Run Ivy targets

Create an Ant build file and just 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".

Then you will be able to have completion on Ivy tasks:

And run successul build:

Printer Friendly