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