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.
Download (HTTP): http://archive.apache.org/dist/ant/source/apache-ant-1.6.5-src.tar.bz2
Download (FTP): ftp://ftp.oregonstate.edu/pub/apache/ant/source/apache-ant-1.6.5-src.tar.bz2
Download MD5 sum: 80a7ad191c40b7d8c82533524b282b6b
Download size: 6.2 MB
Estimated disk space required: 94.5 MB
Estimated build time: 0.4 SBU
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/apache-ant
You may need additional libraries to satisfy the build requirements of various packages installed using Apache Ant. Review the table at http://ant.apache.org/manual/install.html#librarydependencies for any prerequisite libraries you may need. One such library is the JUnit-3.8.1 testing framework library. Many Ant-installed packages will use this library to perform the unit tests during the build process. To install the JUnit library along with the Apache Ant package, download it from http://www.junit.org/, unzip the distribution file (requires UnZip-5.52) and copy the junit.jar file into the lib subdirectory of the Apache Ant source tree before beginning the Apache Ant build.
Install Apache Ant by running the following commands:
patch -Np1 -i ../apache-ant-1.6.5-blfs_install-1.patch
This package does not come with a test suite.
Now, as the root user:
./build.sh -Ddist.dir=/opt/ant-1.6.5 dist && ln -v -sf /etc/ant /opt/ant-1.6.5/etc && ln -v -sf ant-1.6.5 /opt/ant
./build.sh -Ddist.dir=/opt/ant-1.6.5 dist: This command does everything. It builds, then installs the package into /opt/ant-1.6.5.
ln -v -sf /etc/ant /opt/ant-1.6.5/etc: The patch changes the configuration directory to /etc/ant to conform with FHS guidelines. This command creates a symlink from the configuration directory back to the installation directory as the package is expecting to find the files there.
ln -v -sf ant-1.6.5 /opt/ant: This command is optional, and creates a convenience symlink.
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
Last updated on 2007-01-18 13:38:19 -0600