- Go to google and type download Apache ant
- Select link http://ant.apache.org/bindownload.cgi
- Download file named like apache-ant-1.8.4-bin.zip
- Extract the zip file into a directory structure of your choice. Set the “ANT_HOME” environment variable to this location and include the “ANT_HOME/bin” directory in your path.
- Make sure that also the JAVA_HOME environment variable is set to the JDK. This is required for running Ant.
- Check your installation by opening a command line and typing “ant -version” into the commend line. The system should find the command ant and show the version number of your installed ant.
Apache Ant is a software tool for automating software build processes. It is similar to Make but is implemented using the Java language, requires the Java platform, and is best suited to building Java projects.
Apache Ant (Another Neat Tool) is a general purpose build tool. A build tool can be used to automate certain repetitive tasks, e.g. compiling source code, running software tests and creating jar files and Javadoc.
Apache Ant is used primarily used for building and deploying Java projects.
A Java build process typically includes:
the compilation of the Java source code into Java bytecode
creation of the .jar file for the distribution of the code
creation of the Javadoc documentation
Apache Ant uses a xml file for its configuration. This file is usually called “build.xml”. Ant builds are based on three blocks: tasks, targets and extension points.
A task in Ant is a unit of work which should be performed. Tasks are small, atomic steps, for example compile source code or create Javadoc. Tasks can be grouped into targets.
A target is a group of tasks which can be directly invoked via Ant. Tasks can also specify their dependencies. If a target depends on other targets then Ant will automatically perform these task first and so on and so on.
For example if target A depends on target B, Ant will first perform target B and then target A.
In your build.xml you can also specify the default target. Apache Ant will execute this target, if no explicit target is specified.