[dd5bdf3] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[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 " ">
|
---|
[c058934] | 9 | <!ENTITY apache-ant-md5sum "4cf5c6728612f4787eda265b0a2d266b">
|
---|
[51ba03e] | 10 | <!ENTITY apache-ant-size "3.7 MB">
|
---|
[c058934] | 11 | <!ENTITY apache-ant-buildsize "242 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 |
|
---|
[043de93] | 41 | &lfs113_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 |
|
---|
[94bdff09] | 125 | <!-- Not needed with 1.10.10
|
---|
[c084a2a] | 126 | <para>
|
---|
| 127 | First fix an incompatibility issue between the documentation standard
|
---|
| 128 | used in the build tree, and the one expected by <xref
|
---|
| 129 | linkend="openjdk"/>:
|
---|
| 130 | </para>
|
---|
| 131 |
|
---|
[94bdff09] | 132 | <screen><userinput>sed -i 's/- -add-modules java.activation/-html4/' build.xml</userinput></screen>
|
---|
| 133 | -->
|
---|
[c084a2a] | 134 |
|
---|
[488b738f] | 135 | <para>
|
---|
| 136 | Build a limited bootstrap version of <application>Apache
|
---|
| 137 | Ant</application> using the following command:
|
---|
| 138 | </para>
|
---|
[e8edecd] | 139 |
|
---|
[d61ead0a] | 140 | <screen><userinput>./bootstrap.sh</userinput></screen>
|
---|
[6dc9fd3] | 141 |
|
---|
[8fdbeef] | 142 | <para>
|
---|
| 143 | Now fix a problem when the next command tries to download a file from
|
---|
| 144 | a problem site:
|
---|
| 145 | </para>
|
---|
| 146 |
|
---|
| 147 | <screen><userinput>sed -e 's|ftp.software.ibm.com|anduin.linuxfromscratch.org|' \
|
---|
| 148 | -e 's|software/awdtools/netrexx|BLFS/apache-ant|' \
|
---|
| 149 | -i fetch.xml </userinput></screen>
|
---|
| 150 |
|
---|
[488b738f] | 151 | <para>
|
---|
| 152 | Download the runtime dependencies using the
|
---|
| 153 | <filename>fetch.xml</filename> ant build script:
|
---|
| 154 | </para>
|
---|
[514ef84d] | 155 |
|
---|
[c084a2a] | 156 | <screen><userinput>bootstrap/bin/ant -f fetch.xml -Ddest=optional</userinput></screen>
|
---|
[514ef84d] | 157 |
|
---|
[488b738f] | 158 | <para>
|
---|
| 159 | Build <application>Apache Ant</application> by running the following
|
---|
| 160 | command:
|
---|
| 161 | </para>
|
---|
[e8edecd] | 162 |
|
---|
[d61ead0a] | 163 | <screen><userinput>./build.sh -Ddist.dir=$PWD/ant-&apache-ant-version; dist</userinput></screen>
|
---|
| 164 |
|
---|
[488b738f] | 165 | <para>
|
---|
| 166 | Install, as the <systemitem class="username">root</systemitem> user:
|
---|
| 167 | </para>
|
---|
[d61ead0a] | 168 |
|
---|
| 169 | <screen role="root"><userinput>cp -rv ant-&apache-ant-version; /opt/ &&
|
---|
| 170 | chown -R root:root /opt/ant-&apache-ant-version; &&
|
---|
| 171 | ln -sfv ant-&apache-ant-version; /opt/ant</userinput></screen>
|
---|
[6dc9fd3] | 172 |
|
---|
[514ef84d] | 173 | </sect2>
|
---|
| 174 |
|
---|
| 175 | <sect2 role="commands">
|
---|
| 176 | <title>Command Explanations</title>
|
---|
| 177 |
|
---|
[488b738f] | 178 | <para>
|
---|
[c084a2a] | 179 | <command>bootstrap/bin/ant -f fetch.xml -Ddest=optional</command>:
|
---|
[94bdff09] | 180 | Downloads the missing dependencies to the user's home directory, and
|
---|
| 181 | copies them into the source tree (in the <filename>lib/optional</filename>
|
---|
[c084a2a] | 182 | directory, where <command>ant</command> picks them up at build time).
|
---|
[488b738f] | 183 | </para>
|
---|
[514ef84d] | 184 |
|
---|
[488b738f] | 185 | <para>
|
---|
| 186 | <command>./build.sh -Ddist.dir=$PWD/ant-&apache-ant-version;
|
---|
| 187 | dist</command>: This command builds, tests, then installs the package
|
---|
| 188 | into a temporary directory.
|
---|
| 189 | </para>
|
---|
[514ef84d] | 190 |
|
---|
| 191 | </sect2>
|
---|
| 192 |
|
---|
| 193 | <sect2 role="configuration">
|
---|
| 194 | <title>Configuring Apache Ant</title>
|
---|
| 195 |
|
---|
| 196 | <sect3 id="apache-ant-config">
|
---|
[30edc031] | 197 | <title>Config Files</title>
|
---|
[514ef84d] | 198 |
|
---|
[de33b2a] | 199 | <para>
|
---|
| 200 | <filename>/etc/ant/ant.conf</filename>,
|
---|
| 201 | <filename>~/.ant/ant.conf</filename>, and
|
---|
| 202 | <filename>~/.antrc</filename>
|
---|
| 203 | </para>
|
---|
[514ef84d] | 204 |
|
---|
| 205 | <indexterm zone="apache-ant apache-ant-config">
|
---|
| 206 | <primary sortas="e-AA.ant-ant.conf">~/.ant/ant.conf</primary>
|
---|
| 207 | </indexterm>
|
---|
| 208 |
|
---|
| 209 | <indexterm zone="apache-ant apache-ant-config">
|
---|
| 210 | <primary sortas="e-AA.antrc">~/.antrc</primary>
|
---|
| 211 | </indexterm>
|
---|
| 212 |
|
---|
| 213 | <indexterm zone="apache-ant apache-ant-config">
|
---|
| 214 | <primary sortas="e-etc-ant-ant.conf">/etc/ant/ant.conf</primary>
|
---|
| 215 | </indexterm>
|
---|
| 216 |
|
---|
| 217 | </sect3>
|
---|
| 218 |
|
---|
| 219 | <sect3>
|
---|
| 220 | <title>Configuration Information</title>
|
---|
| 221 |
|
---|
[de33b2a] | 222 | <para>
|
---|
| 223 | Some packages will require <command>ant</command> to be in the
|
---|
| 224 | search path and the <envar>ANT_HOME</envar> environment variable
|
---|
| 225 | defined. Satisfy these requirements by issuing, as the <systemitem
|
---|
| 226 | class="username">root</systemitem> user:
|
---|
| 227 | </para>
|
---|
[58cba7f0] | 228 |
|
---|
[ea7266a] | 229 | <screen role="root"><userinput>cat > /etc/profile.d/ant.sh << EOF
|
---|
| 230 | <literal># Begin /etc/profile.d/ant.sh
|
---|
[7a5639a] | 231 |
|
---|
[58cba7f0] | 232 | pathappend /opt/ant/bin
|
---|
| 233 | export ANT_HOME=/opt/ant
|
---|
[7a5639a] | 234 |
|
---|
[ea7266a] | 235 | # End /etc/profile.d/ant.sh</literal>
|
---|
[58cba7f0] | 236 | EOF</userinput></screen>
|
---|
| 237 |
|
---|
[de33b2a] | 238 | <para>
|
---|
| 239 | The above instructions assume you have configured your system as
|
---|
| 240 | described in <xref linkend="postlfs-config-profile"/>.
|
---|
| 241 | </para>
|
---|
[514ef84d] | 242 |
|
---|
| 243 | </sect3>
|
---|
| 244 |
|
---|
| 245 | </sect2>
|
---|
| 246 |
|
---|
| 247 | <sect2 role="content">
|
---|
| 248 | <title>Contents</title>
|
---|
| 249 |
|
---|
| 250 | <segmentedlist>
|
---|
| 251 | <segtitle>Installed Programs</segtitle>
|
---|
| 252 | <segtitle>Installed Libraries</segtitle>
|
---|
| 253 | <segtitle>Installed Directories</segtitle>
|
---|
| 254 |
|
---|
| 255 | <seglistitem>
|
---|
[488b738f] | 256 | <seg>
|
---|
| 257 | ant, antRun, antRun.pl, complete-ant-cmd.pl, runant.pl, and runant.py </seg>
|
---|
| 258 | <seg>
|
---|
[96923ef] | 259 | Numerous <filename>ant*.jar</filename> and dependent libraries in
|
---|
[488b738f] | 260 | <envar>$ANT_HOME</envar><filename>/lib</filename>
|
---|
| 261 | </seg>
|
---|
[e8edecd] | 262 | <seg>/opt/ant-&apache-ant-version;</seg>
|
---|
[514ef84d] | 263 | </seglistitem>
|
---|
| 264 | </segmentedlist>
|
---|
| 265 |
|
---|
| 266 | <variablelist>
|
---|
| 267 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 268 | <?dbfo list-presentation="list"?>
|
---|
| 269 | <?dbhtml list-presentation="table"?>
|
---|
| 270 |
|
---|
| 271 | <varlistentry id="ant">
|
---|
| 272 | <term><command>ant</command></term>
|
---|
| 273 | <listitem>
|
---|
[de33b2a] | 274 | <para>
|
---|
| 275 | is a <application>Java</application> based build tool used by
|
---|
| 276 | many packages instead of the conventional <command>make</command>
|
---|
[4c24eb0a] | 277 | program
|
---|
[de33b2a] | 278 | </para>
|
---|
[514ef84d] | 279 | <indexterm zone="apache-ant ant">
|
---|
| 280 | <primary sortas="b-ant">ant</primary>
|
---|
| 281 | </indexterm>
|
---|
| 282 | </listitem>
|
---|
| 283 | </varlistentry>
|
---|
| 284 |
|
---|
| 285 | <varlistentry id="antRun">
|
---|
| 286 | <term><command>antRun</command></term>
|
---|
| 287 | <listitem>
|
---|
[de33b2a] | 288 | <para>
|
---|
| 289 | is a support script used to start <command>ant</command>
|
---|
[4c24eb0a] | 290 | build scripts in a given directory
|
---|
[de33b2a] | 291 | </para>
|
---|
[514ef84d] | 292 | <indexterm zone="apache-ant antRun">
|
---|
| 293 | <primary sortas="b-antRun">antRun</primary>
|
---|
| 294 | </indexterm>
|
---|
| 295 | </listitem>
|
---|
| 296 | </varlistentry>
|
---|
| 297 |
|
---|
| 298 | <varlistentry id="antRun.pl">
|
---|
| 299 | <term><command>antRun.pl</command></term>
|
---|
| 300 | <listitem>
|
---|
[de33b2a] | 301 | <para>
|
---|
| 302 | is a <application>Perl</application> script that provides similar
|
---|
[4c24eb0a] | 303 | functionality offered by the <command>antRun</command> script
|
---|
[de33b2a] | 304 | </para>
|
---|
[514ef84d] | 305 | <indexterm zone="apache-ant antRun.pl">
|
---|
| 306 | <primary sortas="b-antRun.pl">antRun.pl</primary>
|
---|
| 307 | </indexterm>
|
---|
| 308 | </listitem>
|
---|
| 309 | </varlistentry>
|
---|
| 310 |
|
---|
| 311 | <varlistentry id="complete-ant-cmd.pl">
|
---|
| 312 | <term><command>complete-ant-cmd.pl</command></term>
|
---|
| 313 | <listitem>
|
---|
[de33b2a] | 314 | <para>
|
---|
| 315 | is a <application>Perl</application> script that allows
|
---|
| 316 | <application>Bash</application> to complete an
|
---|
[4c24eb0a] | 317 | <command>ant</command> command-line
|
---|
[de33b2a] | 318 | </para>
|
---|
[514ef84d] | 319 | <indexterm zone="apache-ant complete-ant-cmd.pl">
|
---|
| 320 | <primary sortas="b-complete-ant-cmd.pl">complete-ant-cmd.pl</primary>
|
---|
| 321 | </indexterm>
|
---|
| 322 | </listitem>
|
---|
| 323 | </varlistentry>
|
---|
| 324 |
|
---|
| 325 | <varlistentry id="runant.pl">
|
---|
| 326 | <term><command>runant.pl</command></term>
|
---|
| 327 | <listitem>
|
---|
[de33b2a] | 328 | <para>
|
---|
| 329 | is a <application>Perl</application> wrapper script used to
|
---|
[4c24eb0a] | 330 | invoke <command>ant</command>
|
---|
[de33b2a] | 331 | </para>
|
---|
[514ef84d] | 332 | <indexterm zone="apache-ant runant.pl">
|
---|
| 333 | <primary sortas="b-runant.pl">runant.pl</primary>
|
---|
| 334 | </indexterm>
|
---|
| 335 | </listitem>
|
---|
| 336 | </varlistentry>
|
---|
| 337 |
|
---|
| 338 | <varlistentry id="runant.py">
|
---|
| 339 | <term><command>runant.py</command></term>
|
---|
| 340 | <listitem>
|
---|
[de33b2a] | 341 | <para>
|
---|
| 342 | is a <application>Python</application> wrapper script used to
|
---|
[4c24eb0a] | 343 | invoke <command>ant</command>
|
---|
[de33b2a] | 344 | </para>
|
---|
[514ef84d] | 345 | <indexterm zone="apache-ant runant.py">
|
---|
| 346 | <primary sortas="b-runant.py">runant.py</primary>
|
---|
| 347 | </indexterm>
|
---|
| 348 | </listitem>
|
---|
| 349 | </varlistentry>
|
---|
| 350 |
|
---|
| 351 | <varlistentry id="ant-star">
|
---|
[4c24eb0a] | 352 | <term><filename class="libraryfile">ant*.jar</filename></term>
|
---|
[514ef84d] | 353 | <listitem>
|
---|
[de33b2a] | 354 | <para>
|
---|
| 355 | files are the <application>Apache Ant</application>
|
---|
[4c24eb0a] | 356 | <application>Java</application> class libraries
|
---|
[de33b2a] | 357 | </para>
|
---|
[514ef84d] | 358 | <indexterm zone="apache-ant ant-star">
|
---|
| 359 | <primary sortas="c-ant-star">ant-*.jar</primary>
|
---|
| 360 | </indexterm>
|
---|
| 361 | </listitem>
|
---|
| 362 | </varlistentry>
|
---|
| 363 |
|
---|
| 364 | </variablelist>
|
---|
| 365 |
|
---|
| 366 | </sect2>
|
---|
[dd5bdf3] | 367 |
|
---|
| 368 | </sect1>
|
---|