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.