[dd5bdf3] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[ff769b8c] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
[dd5bdf3] | 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">
|
---|
[44e4099] | 11 | <!ENTITY apache-ant-buildsize "92 MB">
|
---|
[dd5bdf3] | 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>
|
---|
[5e0f7f2] | 22 | <indexterm zone="apache-ant">
|
---|
| 23 | <primary sortas="a-Apache-Ant">Apache Ant</primary></indexterm>
|
---|
[dd5bdf3] | 24 |
|
---|
| 25 | <sect2>
|
---|
| 26 | <title>Introduction to <application>Apache Ant</application></title>
|
---|
| 27 |
|
---|
| 28 | <para>The <application>Apache Ant</application> package is a
|
---|
| 29 | <application>Java</application>-based build tool. In theory, it is kind of
|
---|
| 30 | like <command>make</command>, but without <command>make</command>'s wrinkles.
|
---|
| 31 | Ant is different. Instead of a model where it is extended with shell-based
|
---|
| 32 | commands, Ant is extended using <application>Java</application> classes.
|
---|
| 33 | Instead of writing shell commands, the configuration files are
|
---|
| 34 | <acronym>XML</acronym>-based, calling out a target tree where various tasks
|
---|
| 35 | get executed. Each task is run by an object that implements a particular task
|
---|
| 36 | interface.</para>
|
---|
| 37 |
|
---|
| 38 | <sect3><title>Package information</title>
|
---|
| 39 | <itemizedlist spacing="compact">
|
---|
| 40 | <listitem><para>Download (HTTP):
|
---|
| 41 | <ulink url="&apache-ant-download-http;"/></para></listitem>
|
---|
| 42 | <listitem><para>Download (FTP):
|
---|
| 43 | <ulink url="&apache-ant-download-ftp;"/></para></listitem>
|
---|
| 44 | <listitem><para>Download MD5 sum: &apache-ant-md5sum;</para></listitem>
|
---|
| 45 | <listitem><para>Download size: &apache-ant-size;</para></listitem>
|
---|
| 46 | <listitem><para>Estimated disk space required:
|
---|
| 47 | &apache-ant-buildsize;</para></listitem>
|
---|
| 48 | <listitem><para>Estimated build time:
|
---|
| 49 | &apache-ant-time;</para></listitem></itemizedlist>
|
---|
| 50 | </sect3>
|
---|
| 51 |
|
---|
| 52 | <sect3><title>Additional downloads</title>
|
---|
| 53 | <itemizedlist spacing="compact">
|
---|
| 54 | <listitem><para>Required Patch: <ulink
|
---|
| 55 | url="&patch-root;/apache-ant-&apache-ant-version;-blfs_install-1.patch"/></para>
|
---|
| 56 | </listitem></itemizedlist>
|
---|
| 57 | </sect3>
|
---|
| 58 |
|
---|
| 59 | <sect3><title><application>Apache Ant</application> dependencies</title>
|
---|
| 60 | <sect4><title>Required</title>
|
---|
[5f0bab7] | 61 | <para><xref linkend="jdk"/></para>
|
---|
[dd5bdf3] | 62 | </sect4>
|
---|
| 63 | </sect3>
|
---|
| 64 |
|
---|
| 65 | </sect2>
|
---|
| 66 |
|
---|
| 67 | <sect2>
|
---|
| 68 | <title>Installation of <application>Apache Ant</application></title>
|
---|
| 69 |
|
---|
| 70 | <para>Note: you may need additional libraries to satisify the build
|
---|
[5e0f7f2] | 71 | requirements of various packages installed using
|
---|
| 72 | <application>Apache Ant</application>. Review the table at
|
---|
[dd5bdf3] | 73 | <ulink url="http://ant.apache.org/manual/install.html#librarydependencies"/>
|
---|
[6f39ee2] | 74 | for any prerequisite libraries you may need. One such library is the
|
---|
| 75 | <application>JUnit</application> testing framework library. Many Ant-installed
|
---|
| 76 | packages will use this library to perform the unit tests during the build
|
---|
| 77 | process. To install the JUnit library along with the
|
---|
| 78 | <application>Apache Ant</application> package, download it from
|
---|
| 79 | <ulink url="http://www.junit.org/"/>, unzip the distribution file (requires
|
---|
| 80 | <xref linkend="unzip"/>) and copy the <filename>junit.jar</filename> file
|
---|
| 81 | into the <filename class='directory'>lib</filename> subdirectory of the
|
---|
| 82 | <application>Apache Ant</application> source tree before beginning the
|
---|
| 83 | <application>Apache Ant</application> build.</para>
|
---|
[dd5bdf3] | 84 |
|
---|
| 85 | <para>Install <application>Apache Ant</application> by running the following
|
---|
| 86 | commands:</para>
|
---|
| 87 |
|
---|
[5e0f7f2] | 88 | <screen><userinput><command>patch -Np1 -i ../apache-ant-&apache-ant-version;-blfs_install-1.patch</command></userinput></screen>
|
---|
| 89 |
|
---|
| 90 | <para>Now, as the root user:</para>
|
---|
| 91 |
|
---|
| 92 | <screen><userinput role='root'><command>./build.sh -Ddist.dir=/opt/ant-&apache-ant-version; dist &&
|
---|
[dd5bdf3] | 93 | ln -sf /etc/ant /opt/ant-&apache-ant-version;/etc &&
|
---|
| 94 | ln -sf ant-&apache-ant-version; /opt/ant</command></userinput></screen>
|
---|
| 95 |
|
---|
| 96 | </sect2>
|
---|
| 97 |
|
---|
| 98 | <sect2>
|
---|
| 99 | <title>Command explanations</title>
|
---|
| 100 |
|
---|
| 101 | <para><command>./build.sh -Ddist.dir=/opt/ant-&apache-ant-version;
|
---|
| 102 | dist</command>: This command does everything. It builds the package, then
|
---|
| 103 | installs the package into
|
---|
| 104 | <filename class='directory'>/opt/ant-&apache-ant-version;</filename>.</para>
|
---|
| 105 |
|
---|
| 106 | <para><command>ln -sf /etc/ant /opt/ant-&apache-ant-version;/etc</command>:
|
---|
| 107 | The patch changes the configuration directory to
|
---|
| 108 | <filename class='directory'>/etc/ant</filename> to conform with
|
---|
| 109 | <acronym>FHS</acronym> guidelines. This command creates a symlink from the
|
---|
| 110 | configuration directory back to the installation directory as the package is
|
---|
| 111 | expecting to find the files there.</para>
|
---|
| 112 |
|
---|
| 113 | <para><command>ln -sf ant-&apache-ant-version; /opt/ant</command>: This
|
---|
| 114 | command is optional, and creates a convenience symlink.</para>
|
---|
| 115 |
|
---|
| 116 | </sect2>
|
---|
| 117 |
|
---|
| 118 | <sect2>
|
---|
| 119 | <title>Configuring <application>Apache Ant</application></title>
|
---|
| 120 |
|
---|
[5e0f7f2] | 121 | <sect3 id="apache-ant-config"><title>Config files</title>
|
---|
[dd5bdf3] | 122 | <para><filename>/etc/ant/ant.conf</filename>,
|
---|
| 123 | <filename>~/.ant/ant.conf</filename> and
|
---|
| 124 | <filename>~/.antrc</filename></para>
|
---|
[5e0f7f2] | 125 | <indexterm zone="apache-ant apache-ant-config">
|
---|
| 126 | <primary sortas="e-AA.ant-ant.conf">~/.ant/ant.conf</primary></indexterm>
|
---|
| 127 | <indexterm zone="apache-ant apache-ant-config">
|
---|
| 128 | <primary sortas="e-AA.antrc">~/.antrc</primary></indexterm>
|
---|
| 129 | <indexterm zone="apache-ant apache-ant-config">
|
---|
| 130 | <primary sortas="e-etc-ant-ant.conf">/etc/ant/ant.conf</primary></indexterm>
|
---|
[dd5bdf3] | 131 | </sect3>
|
---|
| 132 |
|
---|
| 133 | <sect3><title>Configuration Information</title>
|
---|
| 134 | <para>Some packages will require <command>ant</command> to be in the search
|
---|
[6f39ee2] | 135 | path and the <envar>$ANT_HOME</envar> environment variable defined.
|
---|
| 136 | Satisfy these requirements by adding the following lines to
|
---|
[dd5bdf3] | 137 | <filename>/etc/profile</filename> or to individual user's
|
---|
[6f39ee2] | 138 | <filename>~/.profile</filename> or <filename>~/.bashrc</filename> files:</para>
|
---|
[dd5bdf3] | 139 |
|
---|
[6f39ee2] | 140 | <screen><userinput>export PATH=$PATH:/opt/ant/bin
|
---|
| 141 | export ANT_HOME=/opt/ant</userinput></screen>
|
---|
[dd5bdf3] | 142 | </sect3>
|
---|
| 143 |
|
---|
| 144 | </sect2>
|
---|
| 145 |
|
---|
| 146 | <sect2>
|
---|
| 147 | <title>Contents</title>
|
---|
| 148 |
|
---|
[5e0f7f2] | 149 | <segmentedlist>
|
---|
| 150 | <segtitle>Installed Programs</segtitle>
|
---|
| 151 | <segtitle>Installed Libraries</segtitle>
|
---|
| 152 | <segtitle>Installed Directories</segtitle>
|
---|
| 153 |
|
---|
| 154 | <seglistitem>
|
---|
| 155 | <seg>ant, antRun, antRun.pl, complete-ant-cmd.pl, runant.pl and runant.py</seg>
|
---|
| 156 | <seg>ant-*.jar, xercesImpl.jar and xml-apis.jar</seg>
|
---|
| 157 | <seg>/etc/ant and /opt/ant-&apache-ant-version;</seg>
|
---|
| 158 | </seglistitem>
|
---|
| 159 | </segmentedlist>
|
---|
| 160 |
|
---|
| 161 | <variablelist>
|
---|
| 162 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 163 | <?dbfo list-presentation="list"?>
|
---|
| 164 |
|
---|
| 165 | <varlistentry id="ant">
|
---|
| 166 | <term><command>ant</command></term>
|
---|
| 167 | <listitem><para>is a <application>Java</application> based build tool used by
|
---|
| 168 | many packages instead of the conventional <command>make</command>
|
---|
| 169 | program.</para>
|
---|
| 170 | <indexterm zone="apache-ant ant">
|
---|
| 171 | <primary sortas="b-ant">ant</primary>
|
---|
| 172 | </indexterm></listitem>
|
---|
| 173 | </varlistentry>
|
---|
| 174 |
|
---|
| 175 | <varlistentry id="antRun">
|
---|
| 176 | <term><command>antRun</command></term>
|
---|
| 177 | <listitem><para>is a support script used to start <command>ant</command>
|
---|
| 178 | build scripts in a given directory.</para>
|
---|
| 179 | <indexterm zone="apache-ant antRun">
|
---|
| 180 | <primary sortas="b-antRun">antRun</primary>
|
---|
| 181 | </indexterm></listitem>
|
---|
| 182 | </varlistentry>
|
---|
| 183 |
|
---|
| 184 | <varlistentry id="antRun.pl">
|
---|
| 185 | <term><command>antRun.pl</command></term>
|
---|
| 186 | <listitem><para>is a <application>Perl</application> script that provides
|
---|
| 187 | similar functionality offered by the <command>antRun</command> script.</para>
|
---|
| 188 | <indexterm zone="apache-ant antRun.pl">
|
---|
| 189 | <primary sortas="b-antRun.pl">antRun.pl</primary>
|
---|
| 190 | </indexterm></listitem>
|
---|
| 191 | </varlistentry>
|
---|
| 192 |
|
---|
| 193 | <varlistentry id="complete-ant-cmd.pl">
|
---|
| 194 | <term><command>complete-ant-cmd.pl</command></term>
|
---|
| 195 | <listitem><para>is a <application>Perl</application> script that allows
|
---|
| 196 | <application>Bash</application> to complete an <command>ant</command>
|
---|
| 197 | command-line.</para>
|
---|
| 198 | <indexterm zone="apache-ant complete-ant-cmd.pl">
|
---|
| 199 | <primary sortas="b-complete-ant-cmd.pl">complete-ant-cmd.pl</primary>
|
---|
| 200 | </indexterm></listitem>
|
---|
| 201 | </varlistentry>
|
---|
| 202 |
|
---|
| 203 | <varlistentry id="runant.pl">
|
---|
| 204 | <term><command>runant.pl</command></term>
|
---|
| 205 | <listitem><para>is a <application>Perl</application> wrapper script used to
|
---|
| 206 | invoke <command>ant</command>.</para>
|
---|
| 207 | <indexterm zone="apache-ant runant.pl">
|
---|
| 208 | <primary sortas="b-runant.pl">runant.pl</primary>
|
---|
| 209 | </indexterm></listitem>
|
---|
| 210 | </varlistentry>
|
---|
| 211 |
|
---|
| 212 | <varlistentry id="runant.py">
|
---|
| 213 | <term><command>runant.py</command></term>
|
---|
| 214 | <listitem><para>is a <application>Python</application> wrapper script used to
|
---|
| 215 | invoke <command>ant</command>.</para>
|
---|
| 216 | <indexterm zone="apache-ant runant.py">
|
---|
| 217 | <primary sortas="b-runant.py">runant.py</primary>
|
---|
| 218 | </indexterm></listitem>
|
---|
| 219 | </varlistentry>
|
---|
| 220 |
|
---|
| 221 | <varlistentry id="ant-star">
|
---|
| 222 | <term><filename class='libraryfile'>ant-*.jar</filename></term>
|
---|
| 223 | <listitem><para>files are the <application>Apache Ant</application>
|
---|
| 224 | <application>Java</application> class libraries.</para>
|
---|
| 225 | <indexterm zone="apache-ant ant-star">
|
---|
| 226 | <primary sortas="c-ant-star">ant-*.jar</primary>
|
---|
| 227 | </indexterm></listitem>
|
---|
| 228 | </varlistentry>
|
---|
| 229 |
|
---|
| 230 | <varlistentry id="xercesImpl">
|
---|
| 231 | <term><filename class='libraryfile'>xercesImpl.jar</filename></term>
|
---|
| 232 | <listitem><para>is a <application>Java</application> class library used by
|
---|
| 233 | <application>Apache Ant</application> to perform <acronym>XML</acronym>
|
---|
| 234 | parsing.</para>
|
---|
| 235 | <indexterm zone="apache-ant xercesImpl">
|
---|
| 236 | <primary sortas="c-xercesImpl">xercesImpl.jar</primary>
|
---|
| 237 | </indexterm></listitem>
|
---|
| 238 | </varlistentry>
|
---|
| 239 |
|
---|
| 240 | <varlistentry id="xml-apis">
|
---|
| 241 | <term><filename class='libraryfile'>xml-apis.jar</filename></term>
|
---|
| 242 | <listitem><para>contains the <acronym>DOM</acronym>
|
---|
| 243 | <application>Java</application> classes required by the
|
---|
| 244 | <application>Apache Ant</application> <acronym>XML</acronym> formatter.</para>
|
---|
| 245 | <indexterm zone="apache-ant xml-apis">
|
---|
| 246 | <primary sortas="c-xml-apis">xml-apis.jar</primary>
|
---|
| 247 | </indexterm></listitem>
|
---|
| 248 | </varlistentry>
|
---|
| 249 | </variablelist>
|
---|
[dd5bdf3] | 250 |
|
---|
| 251 | </sect2>
|
---|
| 252 |
|
---|
| 253 | </sect1>
|
---|
| 254 |
|
---|