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 that 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 that executes various tasks. Each task is run by an
object that implements a particular task interface.
This package is known to build and work properly using an LFS-7.5
Apache Ant Dependencies
A JDK (Java Binary or OpenJDK-126.96.36.199/IcedTea-2.4.5)
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/apache-ant
Installation of Apache Ant
If it is not possible to install the recommended JUnit package, install Apache Ant by removing the reference to the
test instructions (note that the tests will not be performed):
sed -i 's/jars,test-jar/jars/' build.xml
otherwise copy the junit jar file
to the local directory tree.
cp -v /usr/share/java/junit-4.11.jar lib/optional
Install Apache Ant by running the
The unit regression tests are performed during the build step below
unless JUnit is not installed.
Now, as the
./build.sh -Ddist.dir=/opt/ant-1.9.3 dist &&
ln -v -sfn ant-1.9.3 /opt/ant
Make sure the JAVA_HOME environment variable is set for the
sed -i 's/jars...: If
the JUnit package is not
installed, the regression tests cannot be performed.
cp -v /usr/share/java/junit-4.11.jar
...: This command copies the JUnit jar file into
the directory where Apache Ant will look for it.
dist: This command does everything. It builds,
tests, then installs the package into
ln -v -sfn ant-1.9.3
/opt/ant: This command is optional, and creates a
Configuring Apache Ant
Some packages will require ant to be in the search path
$ANT_HOME environment variable
defined. Satisfy these requirements by adding the following lines
/etc/profile or to individual
ant, antRun, antRun.pl,
complete-ant-cmd.pl, runant.pl, and runant.py
is a Java based build
tool used by many packages instead of the conventional
is a support script used to start ant build scripts in a
is a Perl script that
provides similar functionality offered by the
is a Perl script that
allows Bash to complete
is a Perl wrapper script
used to invoke ant.
is a Python wrapper
script used to invoke ant.
files are the Apache Ant
Java class libraries.
Last updated on 2014-02-19 19:56:28 -0800