Ant : Ant-Contrib – Introduction and Installation Process/Guide



What is Ant-Contrib Tasks?

The Ant-Contrib project provides a collection of tasks and types that extend Ant to work as a scripting language as well as a build tool.

Many developers want more from Ant than the ability to define dependencies. Ant-Contrib adds extra functionality to let Ant act more like a programming lanuage. Most tasks require Ant 1.5 or higher to work properly.

“Ant-Contrib Tasks” is an “independent third party” library of useful additional procedural and utility ApacheAnt Tasks.



First you must install Apache Ant itself, most of the Ant-Contrib tasks require Ant 1.5 or higher to work properly. You can download Ant from Apache.

Download Link:

“Ant-Contrib Tasks” is also TWO independent ant task libraries:


See the cc tasks for installation instructions for cpptasks. To install ant-contrib:

  1. Copy ant-contrib-0.3.jar to the lib directory of your Ant installation. If you want to use one of the tasks in your own project, add the lines
2.  <taskdef resource="net/sf/antcontrib/"/>

to your build file.

  1. Keep ant-contrib-0.3.jar in a separate location. You now have to tell Ant explicitly where to find it (say in /usr/share/java/lib):
4.  <taskdef resource="net/sf/antcontrib/">
5.    <classpath>
6.      <pathelement location="/usr/share/java/lib/ant-contrib-0.3.jar"/>
7.    </classpath>
8.  </taskdef>
Manual and weblinks:
Rajesh Kumar
Follow me
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x