[ab4fdfc] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[dd5bdf3] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[2612183a] | 7 | <!ENTITY apache-ant-download-http "https://archive.apache.org/dist/ant/source/apache-ant-&apache-ant-version;-src.tar.xz">
|
---|
[e8edecd] | 8 | <!ENTITY apache-ant-download-ftp " ">
|
---|
[91b39178] | 9 | <!ENTITY apache-ant-md5sum "055843219f487edb3a6db554ad1355ef">
|
---|
| 10 | <!ENTITY apache-ant-size "3.6 MB">
|
---|
| 11 | <!ENTITY apache-ant-buildsize "195 MB">
|
---|
[3795b64] | 12 | <!ENTITY apache-ant-time "0.3 SBU (excluding download time)">
|
---|
[dd5bdf3] | 13 | ]>
|
---|
| 14 |
|
---|
[ff53809] | 15 | <sect1 id="apache-ant" xreflabel="apache-ant-&apache-ant-version;">
|
---|
[514ef84d] | 16 | <?dbhtml filename="apache-ant.html"?>
|
---|
| 17 |
|
---|
| 18 |
|
---|
[ff53809] | 19 | <title>apache-ant-&apache-ant-version;</title>
|
---|
[514ef84d] | 20 |
|
---|
| 21 | <indexterm zone="apache-ant">
|
---|
| 22 | <primary sortas="a-Apache-Ant">Apache Ant</primary>
|
---|
| 23 | </indexterm>
|
---|
| 24 |
|
---|
| 25 | <sect2 role="package">
|
---|
| 26 | <title>Introduction to Apache Ant</title>
|
---|
| 27 |
|
---|
[de33b2a] | 28 | <para>
|
---|
| 29 | The <application>Apache Ant</application> package is a
|
---|
| 30 | <application>Java</application>-based build tool. In theory, it is
|
---|
| 31 | like the <command>make</command> command, but without
|
---|
| 32 | <command>make</command>'s wrinkles. <application>Ant</application> is
|
---|
| 33 | different. Instead of a model that is extended with shell-based commands,
|
---|
| 34 | <application>Ant</application> is extended using
|
---|
| 35 | <application>Java</application> classes. Instead of writing shell
|
---|
| 36 | commands, the configuration files are XML-based, calling out a target
|
---|
| 37 | tree that executes various tasks. Each task is run by an object that
|
---|
| 38 | implements a particular task interface.
|
---|
| 39 | </para>
|
---|
[514ef84d] | 40 |
|
---|
[f722f5b] | 41 | &lfs121_checked;
|
---|
[50929e8] | 42 |
|
---|
[514ef84d] | 43 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 44 | <itemizedlist spacing="compact">
|
---|
| 45 | <listitem>
|
---|
[de33b2a] | 46 | <para>
|
---|
| 47 | Download (HTTP): <ulink url="&apache-ant-download-http;"/>
|
---|
| 48 | </para>
|
---|
[514ef84d] | 49 | </listitem>
|
---|
| 50 | <listitem>
|
---|
[de33b2a] | 51 | <para>
|
---|
| 52 | Download (FTP): <ulink url="&apache-ant-download-ftp;"/>
|
---|
| 53 | </para>
|
---|
[514ef84d] | 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
[de33b2a] | 56 | <para>
|
---|
| 57 | Download MD5 sum: &apache-ant-md5sum;
|
---|
| 58 | </para>
|
---|
[514ef84d] | 59 | </listitem>
|
---|
| 60 | <listitem>
|
---|
[de33b2a] | 61 | <para>
|
---|
| 62 | Download size: &apache-ant-size;
|
---|
| 63 | </para>
|
---|
[514ef84d] | 64 | </listitem>
|
---|
| 65 | <listitem>
|
---|
[de33b2a] | 66 | <para>
|
---|
| 67 | Estimated disk space required: &apache-ant-buildsize;
|
---|
| 68 | </para>
|
---|
[514ef84d] | 69 | </listitem>
|
---|
| 70 | <listitem>
|
---|
[de33b2a] | 71 | <para>
|
---|
| 72 | Estimated build time: &apache-ant-time;
|
---|
| 73 | </para>
|
---|
[514ef84d] | 74 | </listitem>
|
---|
| 75 | </itemizedlist>
|
---|
[488b738f] | 76 | <!--
|
---|
[6dc9fd3] | 77 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 78 | <itemizedlist spacing="compact">
|
---|
| 79 | <listitem>
|
---|
| 80 | <para>
|
---|
| 81 | Required file: <ulink
|
---|
[d61ead0a] | 82 | url="https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/javax/media/jai-core/1.1.3/jai-core-1.1.3.jar"/>
|
---|
[6dc9fd3] | 83 | </para>
|
---|
| 84 | </listitem>
|
---|
| 85 | <listitem>
|
---|
| 86 | <para>
|
---|
| 87 | Required file: <ulink
|
---|
[d61ead0a] | 88 | url="https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/com/sun/media/jai-codec/1.1.3/jai-codec-1.1.3.jar"/>
|
---|
| 89 | </para>
|
---|
| 90 | </listitem>
|
---|
| 91 | <listitem>
|
---|
| 92 | <para>
|
---|
| 93 | Required file: <ulink
|
---|
| 94 | url="http://central.maven.org/maven2/org/tukaani/xz/1.0/xz-1.0.jar"/>
|
---|
| 95 | </para>
|
---|
| 96 | </listitem>
|
---|
| 97 | <listitem>
|
---|
| 98 | <para>
|
---|
| 99 | Required file: <ulink
|
---|
| 100 | url="http://www.netrexx.org/files/NetRexx-3.06-GA.zip"/>
|
---|
[6dc9fd3] | 101 | </para>
|
---|
| 102 | </listitem>
|
---|
| 103 | </itemizedlist>
|
---|
[488b738f] | 104 | -->
|
---|
[514ef84d] | 105 | <bridgehead renderas="sect3">Apache Ant Dependencies</bridgehead>
|
---|
| 106 |
|
---|
| 107 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
[ff53809] | 108 | <para role="required">
|
---|
[4e047ca4] | 109 | A JDK (<xref linkend="java-bin"/> or <xref linkend="openjdk"/>) and
|
---|
| 110 | <xref linkend="glib2"/>
|
---|
[ff53809] | 111 | </para>
|
---|
[66ab31e] | 112 |
|
---|
[afb71d0a] | 113 | &build-use-internet;
|
---|
| 114 |
|
---|
[6dc9fd3] | 115 | <!-- <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
[ff53809] | 116 | <para role="recommended">
|
---|
| 117 | <xref linkend="junit"/>
|
---|
| 118 | </para>
|
---|
[6dc9fd3] | 119 | -->
|
---|
[514ef84d] | 120 | </sect2>
|
---|
| 121 |
|
---|
| 122 | <sect2 role="installation">
|
---|
| 123 | <title>Installation of Apache Ant</title>
|
---|
[c084a2a] | 124 |
|
---|
[488b738f] | 125 | <para>
|
---|
| 126 | Build a limited bootstrap version of <application>Apache
|
---|
| 127 | Ant</application> using the following command:
|
---|
| 128 | </para>
|
---|
[e8edecd] | 129 |
|
---|
[d61ead0a] | 130 | <screen><userinput>./bootstrap.sh</userinput></screen>
|
---|
[6dc9fd3] | 131 |
|
---|
[91b39178] | 132 | <!-- No longer needed in 1.10.14.
|
---|
[8fdbeef] | 133 | <para>
|
---|
[e440af5] | 134 | Now fix a problem when the next command tries to download a file from
|
---|
[8fdbeef] | 135 | a problem site:
|
---|
| 136 | </para>
|
---|
| 137 |
|
---|
| 138 | <screen><userinput>sed -e 's|ftp.software.ibm.com|anduin.linuxfromscratch.org|' \
|
---|
| 139 | -e 's|software/awdtools/netrexx|BLFS/apache-ant|' \
|
---|
| 140 | -i fetch.xml </userinput></screen>
|
---|
[91b39178] | 141 | -->
|
---|
[8fdbeef] | 142 |
|
---|
[488b738f] | 143 | <para>
|
---|
| 144 | Download the runtime dependencies using the
|
---|
| 145 | <filename>fetch.xml</filename> ant build script:
|
---|
| 146 | </para>
|
---|
[514ef84d] | 147 |
|
---|
[7c83169b] | 148 | <screen><userinput>bootstrap/bin/ant -f fetch.xml -D dest=optional</userinput></screen>
|
---|
[514ef84d] | 149 |
|
---|
[488b738f] | 150 | <para>
|
---|
| 151 | Build <application>Apache Ant</application> by running the following
|
---|
| 152 | command:
|
---|
| 153 | </para>
|
---|
[e8edecd] | 154 |
|
---|
[7c83169b] | 155 | <screen><userinput>./build.sh -D dist.dir=$PWD/ant-&apache-ant-version; dist</userinput></screen>
|
---|
[d61ead0a] | 156 |
|
---|
[488b738f] | 157 | <para>
|
---|
| 158 | Install, as the <systemitem class="username">root</systemitem> user:
|
---|
| 159 | </para>
|
---|
[d61ead0a] | 160 |
|
---|
| 161 | <screen role="root"><userinput>cp -rv ant-&apache-ant-version; /opt/ &&
|
---|
| 162 | chown -R root:root /opt/ant-&apache-ant-version; &&
|
---|
| 163 | ln -sfv ant-&apache-ant-version; /opt/ant</userinput></screen>
|
---|
[6dc9fd3] | 164 |
|
---|
[514ef84d] | 165 | </sect2>
|
---|
| 166 |
|
---|
| 167 | <sect2 role="commands">
|
---|
| 168 | <title>Command Explanations</title>
|
---|
| 169 |
|
---|
[488b738f] | 170 | <para>
|
---|
[7c83169b] | 171 | <command>bootstrap/bin/ant -f fetch.xml -D dest=optional</command>:
|
---|
[94bdff09] | 172 | Downloads the missing dependencies to the user's home directory, and
|
---|
| 173 | copies them into the source tree (in the <filename>lib/optional</filename>
|
---|
[c084a2a] | 174 | directory, where <command>ant</command> picks them up at build time).
|
---|
[488b738f] | 175 | </para>
|
---|
[514ef84d] | 176 |
|
---|
[488b738f] | 177 | <para>
|
---|
[7c83169b] | 178 | <command>./build.sh -D dist.dir=$PWD/ant-&apache-ant-version;
|
---|
[488b738f] | 179 | dist</command>: This command builds, tests, then installs the package
|
---|
| 180 | into a temporary directory.
|
---|
| 181 | </para>
|
---|
[514ef84d] | 182 |
|
---|
| 183 | </sect2>
|
---|
| 184 |
|
---|
| 185 | <sect2 role="configuration">
|
---|
| 186 | <title>Configuring Apache Ant</title>
|
---|
| 187 |
|
---|
| 188 | <sect3 id="apache-ant-config">
|
---|
[30edc031] | 189 | <title>Config Files</title>
|
---|
[514ef84d] | 190 |
|
---|
[de33b2a] | 191 | <para>
|
---|
| 192 | <filename>/etc/ant/ant.conf</filename>,
|
---|
| 193 | <filename>~/.ant/ant.conf</filename>, and
|
---|
| 194 | <filename>~/.antrc</filename>
|
---|
| 195 | </para>
|
---|
[514ef84d] | 196 |
|
---|
| 197 | <indexterm zone="apache-ant apache-ant-config">
|
---|
| 198 | <primary sortas="e-AA.ant-ant.conf">~/.ant/ant.conf</primary>
|
---|
| 199 | </indexterm>
|
---|
| 200 |
|
---|
| 201 | <indexterm zone="apache-ant apache-ant-config">
|
---|
| 202 | <primary sortas="e-AA.antrc">~/.antrc</primary>
|
---|
| 203 | </indexterm>
|
---|
| 204 |
|
---|
| 205 | <indexterm zone="apache-ant apache-ant-config">
|
---|
| 206 | <primary sortas="e-etc-ant-ant.conf">/etc/ant/ant.conf</primary>
|
---|
| 207 | </indexterm>
|
---|
| 208 |
|
---|
| 209 | </sect3>
|
---|
| 210 |
|
---|
| 211 | <sect3>
|
---|
| 212 | <title>Configuration Information</title>
|
---|
| 213 |
|
---|
[de33b2a] | 214 | <para>
|
---|
| 215 | Some packages will require <command>ant</command> to be in the
|
---|
| 216 | search path and the <envar>ANT_HOME</envar> environment variable
|
---|
| 217 | defined. Satisfy these requirements by issuing, as the <systemitem
|
---|
| 218 | class="username">root</systemitem> user:
|
---|
| 219 | </para>
|
---|
[58cba7f0] | 220 |
|
---|
[ea7266a] | 221 | <screen role="root"><userinput>cat > /etc/profile.d/ant.sh << EOF
|
---|
| 222 | <literal># Begin /etc/profile.d/ant.sh
|
---|
[7a5639a] | 223 |
|
---|
[58cba7f0] | 224 | pathappend /opt/ant/bin
|
---|
| 225 | export ANT_HOME=/opt/ant
|
---|
[7a5639a] | 226 |
|
---|
[ea7266a] | 227 | # End /etc/profile.d/ant.sh</literal>
|
---|
[58cba7f0] | 228 | EOF</userinput></screen>
|
---|
| 229 |
|
---|
[de33b2a] | 230 | <para>
|
---|
| 231 | The above instructions assume you have configured your system as
|
---|
| 232 | described in <xref linkend="postlfs-config-profile"/>.
|
---|
| 233 | </para>
|
---|
[514ef84d] | 234 |
|
---|
| 235 | </sect3>
|
---|
| 236 |
|
---|
| 237 | </sect2>
|
---|
| 238 |
|
---|
| 239 | <sect2 role="content">
|
---|
| 240 | <title>Contents</title>
|
---|
| 241 |
|
---|
| 242 | <segmentedlist>
|
---|
| 243 | <segtitle>Installed Programs</segtitle>
|
---|
| 244 | <segtitle>Installed Libraries</segtitle>
|
---|
| 245 | <segtitle>Installed Directories</segtitle>
|
---|
| 246 |
|
---|
| 247 | <seglistitem>
|
---|
[488b738f] | 248 | <seg>
|
---|
| 249 | ant, antRun, antRun.pl, complete-ant-cmd.pl, runant.pl, and runant.py </seg>
|
---|
| 250 | <seg>
|
---|
[96923ef] | 251 | Numerous <filename>ant*.jar</filename> and dependent libraries in
|
---|
[488b738f] | 252 | <envar>$ANT_HOME</envar><filename>/lib</filename>
|
---|
| 253 | </seg>
|
---|
[e8edecd] | 254 | <seg>/opt/ant-&apache-ant-version;</seg>
|
---|
[514ef84d] | 255 | </seglistitem>
|
---|
| 256 | </segmentedlist>
|
---|
| 257 |
|
---|
| 258 | <variablelist>
|
---|
| 259 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 260 | <?dbfo list-presentation="list"?>
|
---|
| 261 | <?dbhtml list-presentation="table"?>
|
---|
| 262 |
|
---|
| 263 | <varlistentry id="ant">
|
---|
| 264 | <term><command>ant</command></term>
|
---|
| 265 | <listitem>
|
---|
[de33b2a] | 266 | <para>
|
---|
| 267 | is a <application>Java</application> based build tool used by
|
---|
| 268 | many packages instead of the conventional <command>make</command>
|
---|
[4c24eb0a] | 269 | program
|
---|
[de33b2a] | 270 | </para>
|
---|
[514ef84d] | 271 | <indexterm zone="apache-ant ant">
|
---|
| 272 | <primary sortas="b-ant">ant</primary>
|
---|
| 273 | </indexterm>
|
---|
| 274 | </listitem>
|
---|
| 275 | </varlistentry>
|
---|
| 276 |
|
---|
| 277 | <varlistentry id="antRun">
|
---|
| 278 | <term><command>antRun</command></term>
|
---|
| 279 | <listitem>
|
---|
[de33b2a] | 280 | <para>
|
---|
| 281 | is a support script used to start <command>ant</command>
|
---|
[4c24eb0a] | 282 | build scripts in a given directory
|
---|
[de33b2a] | 283 | </para>
|
---|
[514ef84d] | 284 | <indexterm zone="apache-ant antRun">
|
---|
| 285 | <primary sortas="b-antRun">antRun</primary>
|
---|
| 286 | </indexterm>
|
---|
| 287 | </listitem>
|
---|
| 288 | </varlistentry>
|
---|
| 289 |
|
---|
| 290 | <varlistentry id="antRun.pl">
|
---|
| 291 | <term><command>antRun.pl</command></term>
|
---|
| 292 | <listitem>
|
---|
[de33b2a] | 293 | <para>
|
---|
| 294 | is a <application>Perl</application> script that provides similar
|
---|
[4c24eb0a] | 295 | functionality offered by the <command>antRun</command> script
|
---|
[de33b2a] | 296 | </para>
|
---|
[514ef84d] | 297 | <indexterm zone="apache-ant antRun.pl">
|
---|
| 298 | <primary sortas="b-antRun.pl">antRun.pl</primary>
|
---|
| 299 | </indexterm>
|
---|
| 300 | </listitem>
|
---|
| 301 | </varlistentry>
|
---|
| 302 |
|
---|
| 303 | <varlistentry id="complete-ant-cmd.pl">
|
---|
| 304 | <term><command>complete-ant-cmd.pl</command></term>
|
---|
| 305 | <listitem>
|
---|
[de33b2a] | 306 | <para>
|
---|
| 307 | is a <application>Perl</application> script that allows
|
---|
| 308 | <application>Bash</application> to complete an
|
---|
[4c24eb0a] | 309 | <command>ant</command> command-line
|
---|
[de33b2a] | 310 | </para>
|
---|
[514ef84d] | 311 | <indexterm zone="apache-ant complete-ant-cmd.pl">
|
---|
| 312 | <primary sortas="b-complete-ant-cmd.pl">complete-ant-cmd.pl</primary>
|
---|
| 313 | </indexterm>
|
---|
| 314 | </listitem>
|
---|
| 315 | </varlistentry>
|
---|
| 316 |
|
---|
| 317 | <varlistentry id="runant.pl">
|
---|
| 318 | <term><command>runant.pl</command></term>
|
---|
| 319 | <listitem>
|
---|
[de33b2a] | 320 | <para>
|
---|
| 321 | is a <application>Perl</application> wrapper script used to
|
---|
[4c24eb0a] | 322 | invoke <command>ant</command>
|
---|
[de33b2a] | 323 | </para>
|
---|
[514ef84d] | 324 | <indexterm zone="apache-ant runant.pl">
|
---|
| 325 | <primary sortas="b-runant.pl">runant.pl</primary>
|
---|
| 326 | </indexterm>
|
---|
| 327 | </listitem>
|
---|
| 328 | </varlistentry>
|
---|
| 329 |
|
---|
| 330 | <varlistentry id="runant.py">
|
---|
| 331 | <term><command>runant.py</command></term>
|
---|
| 332 | <listitem>
|
---|
[de33b2a] | 333 | <para>
|
---|
| 334 | is a <application>Python</application> wrapper script used to
|
---|
[4c24eb0a] | 335 | invoke <command>ant</command>
|
---|
[de33b2a] | 336 | </para>
|
---|
[514ef84d] | 337 | <indexterm zone="apache-ant runant.py">
|
---|
| 338 | <primary sortas="b-runant.py">runant.py</primary>
|
---|
| 339 | </indexterm>
|
---|
| 340 | </listitem>
|
---|
| 341 | </varlistentry>
|
---|
| 342 |
|
---|
| 343 | <varlistentry id="ant-star">
|
---|
[4c24eb0a] | 344 | <term><filename class="libraryfile">ant*.jar</filename></term>
|
---|
[514ef84d] | 345 | <listitem>
|
---|
[de33b2a] | 346 | <para>
|
---|
| 347 | files are the <application>Apache Ant</application>
|
---|
[4c24eb0a] | 348 | <application>Java</application> class libraries
|
---|
[de33b2a] | 349 | </para>
|
---|
[514ef84d] | 350 | <indexterm zone="apache-ant ant-star">
|
---|
| 351 | <primary sortas="c-ant-star">ant-*.jar</primary>
|
---|
| 352 | </indexterm>
|
---|
| 353 | </listitem>
|
---|
| 354 | </varlistentry>
|
---|
| 355 |
|
---|
| 356 | </variablelist>
|
---|
| 357 |
|
---|
| 358 | </sect2>
|
---|
[dd5bdf3] | 359 |
|
---|
| 360 | </sect1>
|
---|