[dd5bdf3] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
| 7 | <!ENTITY apache-ant-download-http "http://www.apache.org/dist/ant/source/apache-ant-&apache-ant-version;-src.tar.bz2">
|
---|
| 8 | <!ENTITY apache-ant-download-ftp "ftp://ftp.oregonstate.edu/pub/apache/ant/source/apache-ant-&apache-ant-version;-src.tar.bz2">
|
---|
| 9 | <!ENTITY apache-ant-md5sum "83c3adefdbf90bcbc4b804d4c55c0778">
|
---|
| 10 | <!ENTITY apache-ant-size "6.2 MB">
|
---|
| 11 | <!ENTITY apache-ant-buildsize "90 MB">
|
---|
| 12 | <!ENTITY apache-ant-time "0.47 SBU">
|
---|
| 13 | ]>
|
---|
| 14 |
|
---|
| 15 | <sect1 id="apache-ant" xreflabel="Apache Ant-&apache-ant-version;">
|
---|
| 16 | <sect1info>
|
---|
| 17 | <othername>$LastChangedBy$</othername>
|
---|
| 18 | <date>$Date$</date>
|
---|
| 19 | </sect1info>
|
---|
| 20 | <?dbhtml filename="apache-ant.html"?>
|
---|
| 21 | <title>Apache Ant-&apache-ant-version;</title>
|
---|
| 22 |
|
---|
| 23 | <sect2>
|
---|
| 24 | <title>Introduction to <application>Apache Ant</application></title>
|
---|
| 25 |
|
---|
| 26 | <para>The <application>Apache Ant</application> package is a
|
---|
| 27 | <application>Java</application>-based build tool. In theory, it is kind of
|
---|
| 28 | like <command>make</command>, but without <command>make</command>'s wrinkles.
|
---|
| 29 | Ant is different. Instead of a model where it is extended with shell-based
|
---|
| 30 | commands, Ant is extended using <application>Java</application> classes.
|
---|
| 31 | Instead of writing shell commands, the configuration files are
|
---|
| 32 | <acronym>XML</acronym>-based, calling out a target tree where various tasks
|
---|
| 33 | get executed. Each task is run by an object that implements a particular task
|
---|
| 34 | interface.</para>
|
---|
| 35 |
|
---|
| 36 | <sect3><title>Package information</title>
|
---|
| 37 | <itemizedlist spacing="compact">
|
---|
| 38 | <listitem><para>Download (HTTP):
|
---|
| 39 | <ulink url="&apache-ant-download-http;"/></para></listitem>
|
---|
| 40 | <listitem><para>Download (FTP):
|
---|
| 41 | <ulink url="&apache-ant-download-ftp;"/></para></listitem>
|
---|
| 42 | <listitem><para>Download MD5 sum: &apache-ant-md5sum;</para></listitem>
|
---|
| 43 | <listitem><para>Download size: &apache-ant-size;</para></listitem>
|
---|
| 44 | <listitem><para>Estimated disk space required:
|
---|
| 45 | &apache-ant-buildsize;</para></listitem>
|
---|
| 46 | <listitem><para>Estimated build time:
|
---|
| 47 | &apache-ant-time;</para></listitem></itemizedlist>
|
---|
| 48 | </sect3>
|
---|
| 49 |
|
---|
| 50 | <sect3><title>Additional downloads</title>
|
---|
| 51 | <itemizedlist spacing="compact">
|
---|
| 52 | <listitem><para>Required Patch: <ulink
|
---|
| 53 | url="&patch-root;/apache-ant-&apache-ant-version;-blfs_install-1.patch"/></para>
|
---|
| 54 | </listitem></itemizedlist>
|
---|
| 55 | </sect3>
|
---|
| 56 |
|
---|
| 57 | <sect3><title><application>Apache Ant</application> dependencies</title>
|
---|
| 58 | <sect4><title>Required</title>
|
---|
| 59 | <para><xref linkend="j2sdk"/></para>
|
---|
| 60 | </sect4>
|
---|
| 61 | </sect3>
|
---|
| 62 |
|
---|
| 63 | </sect2>
|
---|
| 64 |
|
---|
| 65 | <sect2>
|
---|
| 66 | <title>Installation of <application>Apache Ant</application></title>
|
---|
| 67 |
|
---|
| 68 | <para>Note: you may need additional libraries to satisify the build
|
---|
| 69 | requirements of various packages. Review the table at
|
---|
| 70 | <ulink url="http://ant.apache.org/manual/install.html#librarydependencies"/>
|
---|
[6f39ee2] | 71 | for any prerequisite libraries you may need. One such library is the
|
---|
| 72 | <application>JUnit</application> testing framework library. Many Ant-installed
|
---|
| 73 | packages will use this library to perform the unit tests during the build
|
---|
| 74 | process. To install the JUnit library along with the
|
---|
| 75 | <application>Apache Ant</application> package, download it from
|
---|
| 76 | <ulink url="http://www.junit.org/"/>, unzip the distribution file (requires
|
---|
| 77 | <xref linkend="unzip"/>) and copy the <filename>junit.jar</filename> file
|
---|
| 78 | into the <filename class='directory'>lib</filename> subdirectory of the
|
---|
| 79 | <application>Apache Ant</application> source tree before beginning the
|
---|
| 80 | <application>Apache Ant</application> build.</para>
|
---|
[dd5bdf3] | 81 |
|
---|
| 82 | <para>Install <application>Apache Ant</application> by running the following
|
---|
| 83 | commands:</para>
|
---|
| 84 |
|
---|
| 85 | <screen><userinput><command>patch -Np1 -i ../apache-ant-&apache-ant-version;-blfs_install-1.patch &&
|
---|
| 86 | ./build.sh -Ddist.dir=/opt/ant-&apache-ant-version; dist &&
|
---|
| 87 | ln -sf /etc/ant /opt/ant-&apache-ant-version;/etc &&
|
---|
| 88 | ln -sf ant-&apache-ant-version; /opt/ant</command></userinput></screen>
|
---|
| 89 |
|
---|
| 90 | </sect2>
|
---|
| 91 |
|
---|
| 92 | <sect2>
|
---|
| 93 | <title>Command explanations</title>
|
---|
| 94 |
|
---|
| 95 | <para><command>./build.sh -Ddist.dir=/opt/ant-&apache-ant-version;
|
---|
| 96 | dist</command>: This command does everything. It builds the package, then
|
---|
| 97 | installs the package into
|
---|
| 98 | <filename class='directory'>/opt/ant-&apache-ant-version;</filename>.</para>
|
---|
| 99 |
|
---|
| 100 | <para><command>ln -sf /etc/ant /opt/ant-&apache-ant-version;/etc</command>:
|
---|
| 101 | The patch changes the configuration directory to
|
---|
| 102 | <filename class='directory'>/etc/ant</filename> to conform with
|
---|
| 103 | <acronym>FHS</acronym> guidelines. This command creates a symlink from the
|
---|
| 104 | configuration directory back to the installation directory as the package is
|
---|
| 105 | expecting to find the files there.</para>
|
---|
| 106 |
|
---|
| 107 | <para><command>ln -sf ant-&apache-ant-version; /opt/ant</command>: This
|
---|
| 108 | command is optional, and creates a convenience symlink.</para>
|
---|
| 109 |
|
---|
| 110 | </sect2>
|
---|
| 111 |
|
---|
| 112 | <sect2>
|
---|
| 113 | <title>Configuring <application>Apache Ant</application></title>
|
---|
| 114 |
|
---|
| 115 | <sect3><title>Config files</title>
|
---|
| 116 | <para><filename>/etc/ant/ant.conf</filename>,
|
---|
| 117 | <filename>~/.ant/ant.conf</filename> and
|
---|
| 118 | <filename>~/.antrc</filename></para>
|
---|
| 119 | </sect3>
|
---|
| 120 |
|
---|
| 121 | <sect3><title>Configuration Information</title>
|
---|
| 122 | <para>Some packages will require <command>ant</command> to be in the search
|
---|
[6f39ee2] | 123 | path and the <envar>$ANT_HOME</envar> environment variable defined.
|
---|
| 124 | Satisfy these requirements by adding the following lines to
|
---|
[dd5bdf3] | 125 | <filename>/etc/profile</filename> or to individual user's
|
---|
[6f39ee2] | 126 | <filename>~/.profile</filename> or <filename>~/.bashrc</filename> files:</para>
|
---|
[dd5bdf3] | 127 |
|
---|
[6f39ee2] | 128 | <screen><userinput>export PATH=$PATH:/opt/ant/bin
|
---|
| 129 | export ANT_HOME=/opt/ant</userinput></screen>
|
---|
[dd5bdf3] | 130 |
|
---|
| 131 | </sect3>
|
---|
| 132 |
|
---|
| 133 | </sect2>
|
---|
| 134 |
|
---|
| 135 | <sect2>
|
---|
| 136 | <title>Contents</title>
|
---|
| 137 |
|
---|
| 138 | <para>The <application>Apache Ant</application> package contains
|
---|
| 139 | <command>ant</command>,
|
---|
| 140 | <command>antRun</command>,
|
---|
| 141 | <command>antRun.pl</command>,
|
---|
| 142 | <command>complete-ant-cmd.pl</command>,
|
---|
| 143 | <command>runant.pl</command>,
|
---|
| 144 | <command>runant.py</command> and
|
---|
| 145 | <filename>*.jar</filename> files.</para>
|
---|
| 146 |
|
---|
| 147 | </sect2>
|
---|
| 148 |
|
---|
| 149 | <sect2><title>Description</title>
|
---|
| 150 |
|
---|
| 151 | <sect3><title>ant</title>
|
---|
| 152 | <para><command>ant</command> is a <application>Java</application> based
|
---|
| 153 | build tool used by many packages instead of the conventional
|
---|
| 154 | <command>make</command> program.</para>
|
---|
| 155 | </sect3>
|
---|
| 156 |
|
---|
| 157 | </sect2>
|
---|
| 158 |
|
---|
| 159 | </sect1>
|
---|
| 160 |
|
---|