While ANT comes with many great features out of the box. Eventually you will need some additional task capabilities that are not available as standard. Fortunately it is very easy to include third party tasks that others have already written.
The most common set of third party tasks which get installed are the ANT-Contrib tasks. These tasks add additional logic and decision making capabilities such as looping which are invaluable for larger projects.
So lets get started installing them. Go to the ant-contrib download page on sourceforge and get the 1.0b3 version zip file. Extract the zip file and copy "ant-contrib-1.0b3.jar" to your "{ant install dir}/lib" folder.
With the jar file installed in the ant lib directory the next step is to include the ant-contrib tasks in your project. To do this add a taskdef entry to your build file init code. The format of this depends on the version of ant you are running.
If you use ANT in an IDE such as eclipse you need to add a reference to the ant-contrib jar file in the classpath config. To do this in eclipse open the Window menu and select:
Browse to the ant-contrib jar file on your hard drive and select it. Apply the changes and close the settings window.
Finally at this stage you should be able to use the new ant-contrib tasks so lets test it. Add a new test task to your build file and call one of the new ant-contrib tasks from it. Below is the test I normally use to check ant-contrib is working using the for list loop task.
Letter @{letter}