[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 |
|
---|
[8bfb60e] | 7 | <!ENTITY apache-ant-download-http "http://archive.apache.org/dist/ant/source/apache-ant-&apache-ant-version;-src.tar.bz2">
|
---|
[dd5bdf3] | 8 | <!ENTITY apache-ant-download-ftp "ftp://ftp.oregonstate.edu/pub/apache/ant/source/apache-ant-&apache-ant-version;-src.tar.bz2">
|
---|
[baba58bc] | 9 | <!ENTITY apache-ant-md5sum "80a7ad191c40b7d8c82533524b282b6b">
|
---|
[dd5bdf3] | 10 | <!ENTITY apache-ant-size "6.2 MB">
|
---|
[baba58bc] | 11 | <!ENTITY apache-ant-buildsize "94.5 MB">
|
---|
| 12 | <!ENTITY apache-ant-time "0.4 SBU">
|
---|
[dd5bdf3] | 13 | ]>
|
---|
| 14 |
|
---|
| 15 | <sect1 id="apache-ant" xreflabel="Apache Ant-&apache-ant-version;">
|
---|
[514ef84d] | 16 | <?dbhtml filename="apache-ant.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
[56762b82] | 21 | <keywordset>
|
---|
| 22 | <keyword role="package">apache-ant-&apache-ant-version;-src.tar</keyword>
|
---|
[22ac237] | 23 | <keyword role="ftpdir">apache-ant</keyword>
|
---|
[56762b82] | 24 | </keywordset>
|
---|
[514ef84d] | 25 | </sect1info>
|
---|
| 26 |
|
---|
| 27 | <title>Apache Ant-&apache-ant-version;</title>
|
---|
| 28 |
|
---|
| 29 | <indexterm zone="apache-ant">
|
---|
| 30 | <primary sortas="a-Apache-Ant">Apache Ant</primary>
|
---|
| 31 | </indexterm>
|
---|
| 32 |
|
---|
| 33 | <sect2 role="package">
|
---|
| 34 | <title>Introduction to Apache Ant</title>
|
---|
| 35 |
|
---|
[539ace5] | 36 | <para>The <application>Apache Ant</application> package is a
|
---|
| 37 | <application>Java</application>-based build tool. In theory, it is kind of like
|
---|
| 38 | <command>make</command>, but without <command>make</command>'s wrinkles.
|
---|
| 39 | Ant is different. Instead of a model where it is extended with shell-based commands,
|
---|
| 40 | Ant is extended using <application>Java</application> classes. Instead of writing
|
---|
| 41 | shell commands, the configuration files are XML-based, calling out a target tree where
|
---|
| 42 | various tasks get executed. Each task is run by an object that implements a
|
---|
[514ef84d] | 43 | particular task interface.</para>
|
---|
| 44 |
|
---|
| 45 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 46 | <itemizedlist spacing="compact">
|
---|
| 47 | <listitem>
|
---|
| 48 | <para>Download (HTTP): <ulink url="&apache-ant-download-http;"/></para>
|
---|
| 49 | </listitem>
|
---|
| 50 | <listitem>
|
---|
| 51 | <para>Download (FTP): <ulink url="&apache-ant-download-ftp;"/></para>
|
---|
| 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
| 54 | <para>Download MD5 sum: &apache-ant-md5sum;</para>
|
---|
| 55 | </listitem>
|
---|
| 56 | <listitem>
|
---|
| 57 | <para>Download size: &apache-ant-size;</para>
|
---|
| 58 | </listitem>
|
---|
| 59 | <listitem>
|
---|
| 60 | <para>Estimated disk space required: &apache-ant-buildsize;</para>
|
---|
| 61 | </listitem>
|
---|
| 62 | <listitem>
|
---|
| 63 | <para>Estimated build time: &apache-ant-time;</para>
|
---|
| 64 | </listitem>
|
---|
| 65 | </itemizedlist>
|
---|
| 66 |
|
---|
| 67 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 68 | <itemizedlist spacing="compact">
|
---|
| 69 | <listitem>
|
---|
[539ace5] | 70 | <para>Required Patch: <ulink
|
---|
[514ef84d] | 71 | url="&patch-root;/apache-ant-&apache-ant-version;-blfs_install-1.patch"/></para>
|
---|
| 72 | </listitem>
|
---|
| 73 | </itemizedlist>
|
---|
| 74 |
|
---|
| 75 | <bridgehead renderas="sect3">Apache Ant Dependencies</bridgehead>
|
---|
| 76 |
|
---|
| 77 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
[56762b82] | 78 | <para role="required"><xref linkend="jdk"/></para>
|
---|
[514ef84d] | 79 |
|
---|
| 80 | </sect2>
|
---|
| 81 |
|
---|
| 82 | <sect2 role="installation">
|
---|
| 83 | <title>Installation of Apache Ant</title>
|
---|
| 84 |
|
---|
| 85 | <note>
|
---|
[919683dc] | 86 | <para>You may need additional libraries to satisfy the build
|
---|
[539ace5] | 87 | requirements of various packages installed using
|
---|
| 88 | <application>Apache Ant</application>. Review the table at
|
---|
[0619e6d] | 89 | <ulink url="http://ant.apache.org/manual/install.html#librarydependencies"/>
|
---|
[539ace5] | 90 | for any prerequisite libraries you may need. One such library is the
|
---|
| 91 | <application>JUnit</application> testing framework library. Many Ant-installed
|
---|
| 92 | packages will use this library to perform the unit tests during the build
|
---|
| 93 | process. To install the JUnit library along with the
|
---|
| 94 | <application>Apache Ant</application> package, download it from
|
---|
| 95 | <ulink url="http://www.junit.org/"/>, unzip the distribution file (requires
|
---|
[514ef84d] | 96 | <xref linkend="unzip"/>) and copy the <filename>junit.jar</filename> file
|
---|
| 97 | into the <filename class='directory'>lib</filename> subdirectory of the
|
---|
[539ace5] | 98 | <application>Apache Ant</application> source tree before beginning the
|
---|
[514ef84d] | 99 | <application>Apache Ant</application> build.</para>
|
---|
| 100 | </note>
|
---|
| 101 |
|
---|
[539ace5] | 102 | <para>Install <application>Apache Ant</application> by running the following
|
---|
[514ef84d] | 103 | commands:</para>
|
---|
| 104 |
|
---|
| 105 | <screen><userinput>patch -Np1 -i ../apache-ant-&apache-ant-version;-blfs_install-1.patch</userinput></screen>
|
---|
| 106 |
|
---|
| 107 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 108 |
|
---|
| 109 | <screen role="root"><userinput>./build.sh -Ddist.dir=/opt/ant-&apache-ant-version; dist &&
|
---|
| 110 | ln -v -sf /etc/ant /opt/ant-&apache-ant-version;/etc &&
|
---|
| 111 | ln -v -sf ant-&apache-ant-version; /opt/ant</userinput></screen>
|
---|
| 112 |
|
---|
| 113 | </sect2>
|
---|
| 114 |
|
---|
| 115 | <sect2 role="commands">
|
---|
| 116 | <title>Command Explanations</title>
|
---|
| 117 |
|
---|
[539ace5] | 118 | <para><command>./build.sh -Ddist.dir=/opt/ant-&apache-ant-version;
|
---|
[baba58bc] | 119 | dist</command>: This command does everything. It builds, then
|
---|
[539ace5] | 120 | installs the package into
|
---|
[514ef84d] | 121 | <filename class='directory'>/opt/ant-&apache-ant-version;</filename>.</para>
|
---|
| 122 |
|
---|
[539ace5] | 123 | <para><command>ln -v -sf /etc/ant /opt/ant-&apache-ant-version;/etc</command>:
|
---|
| 124 | The patch changes the configuration directory to
|
---|
| 125 | <filename class='directory'>/etc/ant</filename> to conform with
|
---|
| 126 | FHS guidelines. This command creates a symlink from the
|
---|
| 127 | configuration directory back to the installation directory as the package is
|
---|
[514ef84d] | 128 | expecting to find the files there.</para>
|
---|
| 129 |
|
---|
[539ace5] | 130 | <para><command>ln -v -sf ant-&apache-ant-version; /opt/ant</command>: This
|
---|
[514ef84d] | 131 | command is optional, and creates a convenience symlink.</para>
|
---|
| 132 |
|
---|
| 133 | </sect2>
|
---|
| 134 |
|
---|
| 135 | <sect2 role="configuration">
|
---|
| 136 | <title>Configuring Apache Ant</title>
|
---|
| 137 |
|
---|
| 138 | <sect3 id="apache-ant-config">
|
---|
[30edc031] | 139 | <title>Config Files</title>
|
---|
[514ef84d] | 140 |
|
---|
[539ace5] | 141 | <para><filename>/etc/ant/ant.conf</filename>,
|
---|
| 142 | <filename>~/.ant/ant.conf</filename>, and
|
---|
[514ef84d] | 143 | <filename>~/.antrc</filename></para>
|
---|
| 144 |
|
---|
| 145 | <indexterm zone="apache-ant apache-ant-config">
|
---|
| 146 | <primary sortas="e-AA.ant-ant.conf">~/.ant/ant.conf</primary>
|
---|
| 147 | </indexterm>
|
---|
| 148 |
|
---|
| 149 | <indexterm zone="apache-ant apache-ant-config">
|
---|
| 150 | <primary sortas="e-AA.antrc">~/.antrc</primary>
|
---|
| 151 | </indexterm>
|
---|
| 152 |
|
---|
| 153 | <indexterm zone="apache-ant apache-ant-config">
|
---|
| 154 | <primary sortas="e-etc-ant-ant.conf">/etc/ant/ant.conf</primary>
|
---|
| 155 | </indexterm>
|
---|
| 156 |
|
---|
| 157 | </sect3>
|
---|
| 158 |
|
---|
| 159 | <sect3>
|
---|
| 160 | <title>Configuration Information</title>
|
---|
| 161 |
|
---|
| 162 | <para>Some packages will require <command>ant</command> to be in the search
|
---|
[539ace5] | 163 | path and the <envar>$ANT_HOME</envar> environment variable defined.
|
---|
| 164 | Satisfy these requirements by adding the following lines to
|
---|
| 165 | <filename>/etc/profile</filename> or to individual user's
|
---|
[514ef84d] | 166 | <filename>~/.profile</filename> or <filename>~/.bashrc</filename> files:</para>
|
---|
| 167 |
|
---|
| 168 | <screen><literal>export PATH=$PATH:/opt/ant/bin
|
---|
| 169 | export ANT_HOME=/opt/ant</literal></screen>
|
---|
| 170 |
|
---|
| 171 | </sect3>
|
---|
| 172 |
|
---|
| 173 | </sect2>
|
---|
| 174 |
|
---|
| 175 | <sect2 role="content">
|
---|
| 176 | <title>Contents</title>
|
---|
| 177 |
|
---|
| 178 | <segmentedlist>
|
---|
| 179 | <segtitle>Installed Programs</segtitle>
|
---|
| 180 | <segtitle>Installed Libraries</segtitle>
|
---|
| 181 | <segtitle>Installed Directories</segtitle>
|
---|
| 182 |
|
---|
| 183 | <seglistitem>
|
---|
| 184 | <seg>ant, antRun, antRun.pl, complete-ant-cmd.pl, runant.pl, and runant.py</seg>
|
---|
| 185 | <seg>ant-*.jar, xercesImpl.jar, and xml-apis.jar</seg>
|
---|
| 186 | <seg>/etc/ant and /opt/ant-&apache-ant-version;</seg>
|
---|
| 187 | </seglistitem>
|
---|
| 188 | </segmentedlist>
|
---|
| 189 |
|
---|
| 190 | <variablelist>
|
---|
| 191 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 192 | <?dbfo list-presentation="list"?>
|
---|
| 193 | <?dbhtml list-presentation="table"?>
|
---|
| 194 |
|
---|
| 195 | <varlistentry id="ant">
|
---|
| 196 | <term><command>ant</command></term>
|
---|
| 197 | <listitem>
|
---|
[539ace5] | 198 | <para>is a <application>Java</application> based build tool used by
|
---|
[0619e6d] | 199 | many packages instead of the conventional <command>make</command>
|
---|
[514ef84d] | 200 | program.</para>
|
---|
| 201 | <indexterm zone="apache-ant ant">
|
---|
| 202 | <primary sortas="b-ant">ant</primary>
|
---|
| 203 | </indexterm>
|
---|
| 204 | </listitem>
|
---|
| 205 | </varlistentry>
|
---|
| 206 |
|
---|
| 207 | <varlistentry id="antRun">
|
---|
| 208 | <term><command>antRun</command></term>
|
---|
| 209 | <listitem>
|
---|
[0619e6d] | 210 | <para>is a support script used to start <command>ant</command>
|
---|
[514ef84d] | 211 | build scripts in a given directory.</para>
|
---|
| 212 | <indexterm zone="apache-ant antRun">
|
---|
| 213 | <primary sortas="b-antRun">antRun</primary>
|
---|
| 214 | </indexterm>
|
---|
| 215 | </listitem>
|
---|
| 216 | </varlistentry>
|
---|
| 217 |
|
---|
| 218 | <varlistentry id="antRun.pl">
|
---|
| 219 | <term><command>antRun.pl</command></term>
|
---|
| 220 | <listitem>
|
---|
[539ace5] | 221 | <para>is a <application>Perl</application> script that provides
|
---|
[514ef84d] | 222 | similar functionality offered by the <command>antRun</command> script.</para>
|
---|
| 223 | <indexterm zone="apache-ant antRun.pl">
|
---|
| 224 | <primary sortas="b-antRun.pl">antRun.pl</primary>
|
---|
| 225 | </indexterm>
|
---|
| 226 | </listitem>
|
---|
| 227 | </varlistentry>
|
---|
| 228 |
|
---|
| 229 | <varlistentry id="complete-ant-cmd.pl">
|
---|
| 230 | <term><command>complete-ant-cmd.pl</command></term>
|
---|
| 231 | <listitem>
|
---|
[539ace5] | 232 | <para>is a <application>Perl</application> script that allows
|
---|
[0619e6d] | 233 | <application>Bash</application> to complete an <command>ant</command>
|
---|
[514ef84d] | 234 | command-line.</para>
|
---|
| 235 | <indexterm zone="apache-ant complete-ant-cmd.pl">
|
---|
| 236 | <primary sortas="b-complete-ant-cmd.pl">complete-ant-cmd.pl</primary>
|
---|
| 237 | </indexterm>
|
---|
| 238 | </listitem>
|
---|
| 239 | </varlistentry>
|
---|
| 240 |
|
---|
| 241 | <varlistentry id="runant.pl">
|
---|
| 242 | <term><command>runant.pl</command></term>
|
---|
| 243 | <listitem>
|
---|
[539ace5] | 244 | <para>is a <application>Perl</application> wrapper script used to
|
---|
[514ef84d] | 245 | invoke <command>ant</command>.</para>
|
---|
| 246 | <indexterm zone="apache-ant runant.pl">
|
---|
| 247 | <primary sortas="b-runant.pl">runant.pl</primary>
|
---|
| 248 | </indexterm>
|
---|
| 249 | </listitem>
|
---|
| 250 | </varlistentry>
|
---|
| 251 |
|
---|
| 252 | <varlistentry id="runant.py">
|
---|
| 253 | <term><command>runant.py</command></term>
|
---|
| 254 | <listitem>
|
---|
[539ace5] | 255 | <para>is a <application>Python</application> wrapper script used to
|
---|
[514ef84d] | 256 | invoke <command>ant</command>.</para>
|
---|
| 257 | <indexterm zone="apache-ant runant.py">
|
---|
| 258 | <primary sortas="b-runant.py">runant.py</primary>
|
---|
| 259 | </indexterm>
|
---|
| 260 | </listitem>
|
---|
| 261 | </varlistentry>
|
---|
| 262 |
|
---|
| 263 | <varlistentry id="ant-star">
|
---|
| 264 | <term><filename class='libraryfile'>ant-*.jar</filename></term>
|
---|
| 265 | <listitem>
|
---|
[0619e6d] | 266 | <para>files are the <application>Apache Ant</application>
|
---|
[514ef84d] | 267 | <application>Java</application> class libraries.</para>
|
---|
| 268 | <indexterm zone="apache-ant ant-star">
|
---|
| 269 | <primary sortas="c-ant-star">ant-*.jar</primary>
|
---|
| 270 | </indexterm>
|
---|
| 271 | </listitem>
|
---|
| 272 | </varlistentry>
|
---|
| 273 |
|
---|
| 274 | <varlistentry id="xercesImpl">
|
---|
| 275 | <term><filename class='libraryfile'>xercesImpl.jar</filename></term>
|
---|
| 276 | <listitem>
|
---|
[539ace5] | 277 | <para>is a <application>Java</application> class library used by
|
---|
[514ef84d] | 278 | <application>Apache Ant</application> to perform XML parsing.</para>
|
---|
| 279 | <indexterm zone="apache-ant xercesImpl">
|
---|
| 280 | <primary sortas="c-xercesImpl">xercesImpl.jar</primary>
|
---|
| 281 | </indexterm>
|
---|
| 282 | </listitem>
|
---|
| 283 | </varlistentry>
|
---|
| 284 |
|
---|
| 285 | <varlistentry id="xml-apis">
|
---|
| 286 | <term><filename class='libraryfile'>xml-apis.jar</filename></term>
|
---|
| 287 | <listitem>
|
---|
[539ace5] | 288 | <para>contains the DOM <application>Java</application> classes required
|
---|
[514ef84d] | 289 | by the <application>Apache Ant</application> XML formatter.</para>
|
---|
| 290 | <indexterm zone="apache-ant xml-apis">
|
---|
| 291 | <primary sortas="c-xml-apis">xml-apis.jar</primary>
|
---|
| 292 | </indexterm>
|
---|
| 293 | </listitem>
|
---|
| 294 | </varlistentry>
|
---|
| 295 |
|
---|
| 296 | </variablelist>
|
---|
| 297 |
|
---|
| 298 | </sect2>
|
---|
[dd5bdf3] | 299 |
|
---|
| 300 | </sect1>
|
---|