Apache Ant-1.7.1
Introduction to Apache Ant
The Apache Ant package is a
Java-based build tool. In theory,
it is kind of like make, but without make's wrinkles. Ant is
different. 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.
Package Information
Apache Ant Dependencies
Required
JDK-6 Update
5
Recommended
JUnit-4.3.1
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/apache-ant
Installation of Apache Ant
If the recommendation of having JUnit installed cannot be matched,
Apache Ant can be installed anyway
but the tests cannot be performed. Remove the reference to the test
instructions by running the following command:
sed -i 's;jars,test-jar;jars;' build.xml
Install Apache Ant by running the
following commands:
sed -i 's|${dist.dir}/etc|/etc/ant|' build.xml
sed -i 's|/etc/ant.conf|/etc/ant/ant.conf|' src/script/ant
The unit regression tests are performed in the build step below
except the first sed
has been executed.
Now, as the root user:
./build.sh -Ddist.dir=/opt/ant-1.7.1 dist &&
ln -v -sf /etc/ant /opt/ant-1.7.1/etc &&
ln -v -sf ant-1.7.1 /opt/ant
Command Explanations
sed -i 's;jars...: If
JUnit package is not installed,
the regression tests cannot be performed.
sed ...: These
commands change the configuration directory to /etc/ant to conform with FHS guidelines.
./build.sh -Ddist.dir=/opt/ant-1.7.1
dist: This command does everything. It builds,
tests, then installs the package into /opt/ant-1.7.1.
ln -v -sf /etc/ant
/opt/ant-1.7.1/etc: The sed commands change the
configuration directory to /etc/ant
and this command creates a symlink from the configuration directory
back to the installation directory as the package is expecting to
find some files there.
ln -v -sf ant-1.7.1
/opt/ant: This command is optional, and creates a
convenience symlink.
Configuring Apache Ant
Config
Files
/etc/ant/ant.conf, ~/.ant/ant.conf, and ~/.antrc
Configuration Information
Some packages will require ant to be in the search path
and the $ANT_HOME environment variable
defined. Satisfy these requirements by adding the following lines
to /etc/profile or to individual
user's ~/.profile or ~/.bashrc files:
export PATH=$PATH:/opt/ant/bin
export ANT_HOME=/opt/ant
Contents
Installed Programs:
ant, antRun, antRun.pl,
complete-ant-cmd.pl, runant.pl, and runant.py
Installed Libraries:
ant.jar, ant-*.jar, xercesImpl.jar, and
xml-apis.jar
Installed Directories:
/etc/ant and /opt/ant-1.7.1
Short Descriptions
|
ant
|
is a Java based build
tool used by many packages instead of the conventional
make
program.
|
|
antRun
|
is a support script used to start ant build scripts in a
given directory.
|
|
antRun.pl
|
is a Perl script that
provides similar functionality offered by the
antRun
script.
|
|
complete-ant-cmd.pl
|
is a Perl script that
allows Bash to complete
an ant
command-line.
|
|
runant.pl
|
is a Perl wrapper script
used to invoke ant.
|
|
runant.py
|
is a Python wrapper
script used to invoke ant.
|
|
ant-*.jar
|
files are the Apache Ant
Java class libraries.
|
|
xercesImpl.jar
|
is a Java class library
used by Apache Ant to
perform XML parsing.
|
|
xml-apis.jar
|
contains the DOM Java
classes required by the Apache
Ant XML formatter.
|
Last updated on 2009-01-06 01:54:59 -0600