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