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