Installing Ant

Regardless of platform, downloading Ant is the first step to installing the software. The files can be downloaded to a temporary directory and then uncompressed to any desired directory. After the download step, the process differs depending on whether you've downloaded the binary distribution or the source distribution.
Ant does not provide an installation program; it runs from wherever you choose to copy the files and directories. Lists the directories that ultimately get created under your main Ant directory.

Directories provided with Ant
bin - Batch files, Perl scripts, and shell scripts for running Ant.
docs - Ant documentation.
lib - Libraries required by Ant to run.
src - Source code for Ant. Provided only in the source distribution.

Binary Installation
The term "binary" just means that everything is compiled and packaged into JAR files for easy execution — you don't need to compile Ant from source.
Steps to install Installation of the binary distribution:
1. Unzip (or untar) the distribution to the desired directory.
2. Set the ANT_HOME environment variable to point to to the ant installation directory.
3. Set the JAVA_HOME environment variable to point to the JDK location.
4. Add ANT_HOME/bin to your system's PATH environment variable.

The ant script uses the ANT_HOME and JAVA_HOME environment variables to configure the CLASSPATH used by the JVM running Ant. If these variables are not set, the startup script attempts to infer the correct values, subject to operating system limitations.

Source Installation
Installing the Ant source distribution requires a little more work than installing the binary distribution. As expected, downloading and uncompressing the distribution is the first step.
You generally want to place the source files in a directory separate from any existing Ant installations. Next, ensure that JAVA_HOME points to the JDK distribution. As with the binary installation, you should also set ANT_HOME and update your PATH.
type the following command from the source distribution directory:

build -Ddist.dir=destination_directory dist (Windows) -Ddist.dir=destination_directory dist (Unix)

The build script creates a complete binary distribution of Ant in the specified destination directory. When omitted, dist.dir defaults to build.


Installing Ant
Ant Basics
Using Ant
Running Ant
Ant Tasks
Core Tasks
Optional Tasks
Ant Command-Line

Use of this website constitutes acceptance of the Terms and Conditions