glfs/general/sysutils/apache-ant.xml
Randy McMurchy 6f39ee2850 Added a note to the Apache Ant instructions to optionally build the Junit testing library
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@3064 af4574ff-66df-0310-9fd7-8a98e5e911e0
2004-12-01 20:24:44 +00:00

161 lines
6.1 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY apache-ant-download-http "http://www.apache.org/dist/ant/source/apache-ant-&apache-ant-version;-src.tar.bz2">
<!ENTITY apache-ant-download-ftp "ftp://ftp.oregonstate.edu/pub/apache/ant/source/apache-ant-&apache-ant-version;-src.tar.bz2">
<!ENTITY apache-ant-md5sum "83c3adefdbf90bcbc4b804d4c55c0778">
<!ENTITY apache-ant-size "6.2 MB">
<!ENTITY apache-ant-buildsize "90 MB">
<!ENTITY apache-ant-time "0.47 SBU">
]>
<sect1 id="apache-ant" xreflabel="Apache Ant-&apache-ant-version;">
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<?dbhtml filename="apache-ant.html"?>
<title>Apache Ant-&apache-ant-version;</title>
<sect2>
<title>Introduction to <application>Apache Ant</application></title>
<para>The <application>Apache Ant</application> package is a
<application>Java</application>-based build tool. In theory, it is kind of
like <command>make</command>, but without <command>make</command>'s wrinkles.
Ant is different. Instead of a model where it is extended with shell-based
commands, Ant is extended using <application>Java</application> classes.
Instead of writing shell commands, the configuration files are
<acronym>XML</acronym>-based, calling out a target tree where various tasks
get executed. Each task is run by an object that implements a particular task
interface.</para>
<sect3><title>Package information</title>
<itemizedlist spacing="compact">
<listitem><para>Download (HTTP):
<ulink url="&apache-ant-download-http;"/></para></listitem>
<listitem><para>Download (FTP):
<ulink url="&apache-ant-download-ftp;"/></para></listitem>
<listitem><para>Download MD5 sum: &apache-ant-md5sum;</para></listitem>
<listitem><para>Download size: &apache-ant-size;</para></listitem>
<listitem><para>Estimated disk space required:
&apache-ant-buildsize;</para></listitem>
<listitem><para>Estimated build time:
&apache-ant-time;</para></listitem></itemizedlist>
</sect3>
<sect3><title>Additional downloads</title>
<itemizedlist spacing="compact">
<listitem><para>Required Patch: <ulink
url="&patch-root;/apache-ant-&apache-ant-version;-blfs_install-1.patch"/></para>
</listitem></itemizedlist>
</sect3>
<sect3><title><application>Apache Ant</application> dependencies</title>
<sect4><title>Required</title>
<para><xref linkend="j2sdk"/></para>
</sect4>
</sect3>
</sect2>
<sect2>
<title>Installation of <application>Apache Ant</application></title>
<para>Note: you may need additional libraries to satisify the build
requirements of various packages. Review the table at
<ulink url="http://ant.apache.org/manual/install.html#librarydependencies"/>
for any prerequisite libraries you may need. One such library is the
<application>JUnit</application> 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
<application>Apache Ant</application> package, download it from
<ulink url="http://www.junit.org/"/>, unzip the distribution file (requires
<xref linkend="unzip"/>) and copy the <filename>junit.jar</filename> file
into the <filename class='directory'>lib</filename> subdirectory of the
<application>Apache Ant</application> source tree before beginning the
<application>Apache Ant</application> build.</para>
<para>Install <application>Apache Ant</application> by running the following
commands:</para>
<screen><userinput><command>patch -Np1 -i ../apache-ant-&apache-ant-version;-blfs_install-1.patch &amp;&amp;
./build.sh -Ddist.dir=/opt/ant-&apache-ant-version; dist &amp;&amp;
ln -sf /etc/ant /opt/ant-&apache-ant-version;/etc &amp;&amp;
ln -sf ant-&apache-ant-version; /opt/ant</command></userinput></screen>
</sect2>
<sect2>
<title>Command explanations</title>
<para><command>./build.sh -Ddist.dir=/opt/ant-&apache-ant-version;
dist</command>: This command does everything. It builds the package, then
installs the package into
<filename class='directory'>/opt/ant-&apache-ant-version;</filename>.</para>
<para><command>ln -sf /etc/ant /opt/ant-&apache-ant-version;/etc</command>:
The patch changes the configuration directory to
<filename class='directory'>/etc/ant</filename> to conform with
<acronym>FHS</acronym> 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.</para>
<para><command>ln -sf ant-&apache-ant-version; /opt/ant</command>: This
command is optional, and creates a convenience symlink.</para>
</sect2>
<sect2>
<title>Configuring <application>Apache Ant</application></title>
<sect3><title>Config files</title>
<para><filename>/etc/ant/ant.conf</filename>,
<filename>~/.ant/ant.conf</filename> and
<filename>~/.antrc</filename></para>
</sect3>
<sect3><title>Configuration Information</title>
<para>Some packages will require <command>ant</command> to be in the search
path and the <envar>$ANT_HOME</envar> environment variable defined.
Satisfy these requirements by adding the following lines to
<filename>/etc/profile</filename> or to individual user's
<filename>~/.profile</filename> or <filename>~/.bashrc</filename> files:</para>
<screen><userinput>export PATH=$PATH:/opt/ant/bin
export ANT_HOME=/opt/ant</userinput></screen>
</sect3>
</sect2>
<sect2>
<title>Contents</title>
<para>The <application>Apache Ant</application> package contains
<command>ant</command>,
<command>antRun</command>,
<command>antRun.pl</command>,
<command>complete-ant-cmd.pl</command>,
<command>runant.pl</command>,
<command>runant.py</command> and
<filename>*.jar</filename> files.</para>
</sect2>
<sect2><title>Description</title>
<sect3><title>ant</title>
<para><command>ant</command> is a <application>Java</application> based
build tool used by many packages instead of the conventional
<command>make</command> program.</para>
</sect3>
</sect2>
</sect1>