%general-entities; ]> $LastChangedBy$ $Date$ apache-ant-&apache-ant-version; Apache Ant 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. &lfs71_checked; Package Information Download (HTTP): Download (FTP): Download MD5 sum: &apache-ant-md5sum; Download size: &apache-ant-size; Estimated disk space required: &apache-ant-buildsize; Estimated build time: &apache-ant-time; Apache Ant Dependencies Required Recommended User Notes: Installation of Apache Ant You may need additional libraries to satisfy the build requirements of various packages installed using Apache Ant. Review the table at for any prerequisite libraries you may need. 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 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 && cp -v /usr/share/junit-&junit-version;/junit-&junit-version;.jar lib/optional/junit.jar The unit regression tests are performed during the build step below unless JUnit is not installed. Now, as the root user: ./build.sh -Ddist.dir=/opt/ant-&apache-ant-version; dist && ln -v -sf /etc/ant /opt/ant-&apache-ant-version;/etc && ln -v -sf ant-&apache-ant-version; /opt/ant Command Explanations sed -i 's;jars...: If the 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. cp -v /usr/share/junit-&junit-version;/&junit-version;.jar ...: This command copies the JUnit jar file into the directory where Apache Ant will look for it. ./build.sh -Ddist.dir=/opt/ant-&apache-ant-version; dist: This command does everything. It builds, tests, then installs the package into /opt/ant-&apache-ant-version;. ln -v -sf /etc/ant /opt/ant-&apache-ant-version;/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-&apache-ant-version; /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 ~/.ant/ant.conf ~/.antrc /etc/ant/ant.conf 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 Installed Libraries Installed Directories ant, antRun, antRun.pl, complete-ant-cmd.pl, runant.pl, and runant.py ant.jar, ant-*.jar, xercesImpl.jar, and xml-apis.jar /etc/ant and /opt/ant-&apache-ant-version; Short Descriptions ant is a Java based build tool used by many packages instead of the conventional make program. ant antRun is a support script used to start ant build scripts in a given directory. antRun antRun.pl is a Perl script that provides similar functionality offered by the antRun script. antRun.pl complete-ant-cmd.pl is a Perl script that allows Bash to complete an ant command-line. complete-ant-cmd.pl runant.pl is a Perl wrapper script used to invoke ant. runant.pl runant.py is a Python wrapper script used to invoke ant. runant.py ant-*.jar files are the Apache Ant Java class libraries. ant-*.jar xercesImpl.jar is a Java class library used by Apache Ant to perform XML parsing. xercesImpl.jar xml-apis.jar contains the DOM Java classes required by the Apache Ant XML formatter. xml-apis.jar