|
Ant is a Java-based build tool from the Apache project that was originally bundled with early versions of Tomcat. Its creator had become dissatisfied with make as a way of building Tomcat from source and developed a tool to make his life easier. Ant was designed to fix the problems with make described previously and so mirrored the portability aims of Java. The build tools helps the programmers to build their complex application and place the files in the desired location with less effort. The Ant is different tool then make , gnumake , nmake , jam build tool as Instead of a model where it is extended with shell-based commands, Ant is extended using Java classes. Instead of writing shell commands, the configuration files are XML-based, calling out a target tree where various tasks get executed. Each task is run by an object that implements a particular Task interface in ant.
Note:- Latest version of Ant is available on Ant web page http://ant.apache.org/ .
System Requirements
Ant can be used with so many operating systems as it is written in java. All you need to have is only the JVM to run Ant scripts in your environments.
Note:- To build and use Ant, you must have a JAXP-compliant XML parser installed and available on your classpath, such as Xerces as the configuration file is a XML file and ant needs to parse the file for the tasks
There are many directories in the ANT bundle. But only the bin and lib directories are required to run Ant. To install Ant, choose a directory and copy the distribution files there. This directory will be known as ANT_HOME. For running the ant command we also have to set the path parameter with ANT_HOME/bin. The commands are as follows for different environments.
Windows and OS/2
set ANT_HOME=c:\ant
set JAVA_HOME=c:\jdk-1.5.0.05
set PATH=%PATH%;%ANT_HOME%\bin
Linux/Unix (bash)
export ANT_HOME=/usr/local/ant
export JAVA_HOME=/usr/local/jdk-1.5.0.05
export PATH=${PATH}:${ANT_HOME}/bin
Linux/Unix (csh)
setenv ANT_HOME /usr/local/ant
setenv JAVA_HOME /usr/local/jdk/jdk-1.5.0.05
set path=( $path $ANT_HOME/bin )
|