Install
Installing ant4eclipse to Ant's lib-directories
This is the easiest way of installing ant4eclipse. Simply copy the
ant4eclipse.jar and the jars from the
lib-directory from the ant4eclipse distribution into the
lib-directory of your ant installation. An alternative
approach is to copy the jar-files to a directory called
.ant/lib in your home directory. Both directories will be
searched by Ant for libraries.
Using ant4eclipse from command line
Point Ant to
ant4eclipse.jar and the ant4eclipse
lib-directory by using Ant's
"-lib" command line argument:
ant -lib /path/to/ant4eclipse/ant4eclipse.jar -lib /path/to/ant4eclipse/libs <other ant args>
Installing ant4eclipse as an eclipse plugin
Download a copy of the ant4eclipse-plugin and unzip it to your eclipse 3.x installation. Start (or restart) eclipse. To verify your installation, select 'Windows -> preferences'. In the Treeview, select 'ant -> runtime'. The ant4eclipse-classpathentry should be listed in "Contributed Entries".
Include ant4eclipse in your build-file
After you have installed ant4eclipse, you can create a new
build.xml file and declare the tasks that come with ant4eclipse
using Ant's
taskdef task:
Example:
Note: the ant-contrib task are not part of the ant4eclipse distribution and have to be installed separatly. Take a look at our link-page for further information where to download the ant-contrib tasks.
Next steps
Having prepared your build file this way, you're ready to start using ant4eclipse. See a complete example