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