[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 |
|
---|
[5bd4ba6e] | 7 | <!ENTITY apache-ant-download-http "http://archive.apache.org/dist/ant/source/apache-ant-&apache-ant-version;-src.tar.bz2">
|
---|
[e8edecd] | 8 | <!ENTITY apache-ant-download-ftp " ">
|
---|
[4ad483bf] | 9 | <!ENTITY apache-ant-md5sum "995f21618acdf35beacc465c84d79534">
|
---|
| 10 | <!ENTITY apache-ant-size "3.3 MB">
|
---|
| 11 | <!ENTITY apache-ant-buildsize "105 MB">
|
---|
| 12 | <!ENTITY apache-ant-time "0.2 SBU">
|
---|
[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
|
---|
[e549304] | 33 | <application>Java</application>-based build tool. In theory, it is kind of
|
---|
| 34 | like <command>make</command>, but without <command>make</command>'s
|
---|
| 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 |
|
---|
[4e047ca4] | 42 | &lfs75_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>
|
---|
| 65 |
|
---|
| 66 | <bridgehead renderas="sect3">Apache Ant Dependencies</bridgehead>
|
---|
| 67 |
|
---|
| 68 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
[ff53809] | 69 | <para role="required">
|
---|
[4e047ca4] | 70 | A JDK (<xref linkend="java-bin"/> or <xref linkend="openjdk"/>) and
|
---|
| 71 | <xref linkend="glib2"/>
|
---|
[ff53809] | 72 | </para>
|
---|
[66ab31e] | 73 |
|
---|
| 74 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
[ff53809] | 75 | <para role="recommended">
|
---|
| 76 | <xref linkend="junit"/>
|
---|
| 77 | </para>
|
---|
[514ef84d] | 78 |
|
---|
[1039de3] | 79 | <para condition="html" role="usernotes">User Notes:
|
---|
| 80 | <ulink url="&blfs-wiki;/apache-ant"/></para>
|
---|
| 81 |
|
---|
[514ef84d] | 82 | </sect2>
|
---|
| 83 |
|
---|
| 84 | <sect2 role="installation">
|
---|
| 85 | <title>Installation of Apache Ant</title>
|
---|
| 86 |
|
---|
| 87 | <note>
|
---|
[919683dc] | 88 | <para>You may need additional libraries to satisfy the build
|
---|
[539ace5] | 89 | requirements of various packages installed using
|
---|
| 90 | <application>Apache Ant</application>. Review the table at
|
---|
[0619e6d] | 91 | <ulink url="http://ant.apache.org/manual/install.html#librarydependencies"/>
|
---|
[debb88bf] | 92 | for any prerequisite libraries you may need. Place any needed libraries
|
---|
| 93 | in <filename>lib/optional</filename>.</para>
|
---|
[514ef84d] | 94 | </note>
|
---|
| 95 |
|
---|
[d414190] | 96 | <para>If it is not possible to install the recommended
|
---|
| 97 | <application>JUnit</application> package, install
|
---|
| 98 | <application>Apache Ant</application> by removing the reference to the test
|
---|
| 99 | instructions (note that the tests will not be performed):</para>
|
---|
[66ab31e] | 100 |
|
---|
[debb88bf] | 101 | <screen><userinput>sed -i 's/jars,test-jar/jars/' build.xml</userinput></screen>
|
---|
[66ab31e] | 102 |
|
---|
[0d7900a] | 103 | <para>otherwise copy the <application>junit</application> jar file to the
|
---|
[e8edecd] | 104 | local directory tree.</para>
|
---|
| 105 |
|
---|
[debb88bf] | 106 | <screen><userinput>cp -v /usr/share/java/junit-&junit-version;.jar lib/optional</userinput></screen>
|
---|
[e8edecd] | 107 |
|
---|
[539ace5] | 108 | <para>Install <application>Apache Ant</application> by running the following
|
---|
[514ef84d] | 109 | commands:</para>
|
---|
| 110 |
|
---|
[d414190] | 111 | <para>The unit regression tests are performed during the build step below
|
---|
| 112 | unless <application>JUnit</application> is not installed. Now, as the
|
---|
| 113 | <systemitem class="username">root</systemitem> user:</para>
|
---|
[514ef84d] | 114 |
|
---|
| 115 | <screen role="root"><userinput>./build.sh -Ddist.dir=/opt/ant-&apache-ant-version; dist &&
|
---|
[e8edecd] | 116 | ln -v -sfn ant-&apache-ant-version; /opt/ant</userinput></screen>
|
---|
| 117 |
|
---|
| 118 | <note><para>Make sure the JAVA_HOME environment variable is set for the
|
---|
| 119 | <systemitem class="username">root</systemitem> user.</para></note>
|
---|
[514ef84d] | 120 |
|
---|
| 121 | </sect2>
|
---|
| 122 |
|
---|
| 123 | <sect2 role="commands">
|
---|
| 124 | <title>Command Explanations</title>
|
---|
| 125 |
|
---|
[debb88bf] | 126 | <para><command>sed -i 's/jars...</command>: If the
|
---|
[d414190] | 127 | <application>JUnit</application> package is not installed, the regression
|
---|
| 128 | tests cannot be performed.</para>
|
---|
[66ab31e] | 129 |
|
---|
[e549304] | 130 | <para><command>cp -v
|
---|
[debb88bf] | 131 | /usr/share/java/junit-&junit-version;.jar ...</command>:
|
---|
[9b9be0d] | 132 | This command copies the JUnit jar file into the directory where Apache Ant
|
---|
| 133 | will look for it.</para>
|
---|
| 134 |
|
---|
[539ace5] | 135 | <para><command>./build.sh -Ddist.dir=/opt/ant-&apache-ant-version;
|
---|
[915403df] | 136 | dist</command>: This command does everything. It builds, tests, then
|
---|
[539ace5] | 137 | installs the package into
|
---|
[514ef84d] | 138 | <filename class='directory'>/opt/ant-&apache-ant-version;</filename>.</para>
|
---|
| 139 |
|
---|
[e8edecd] | 140 | <para><command>ln -v -sfn ant-&apache-ant-version; /opt/ant</command>: This
|
---|
[514ef84d] | 141 | command is optional, and creates a convenience symlink.</para>
|
---|
| 142 |
|
---|
| 143 | </sect2>
|
---|
| 144 |
|
---|
| 145 | <sect2 role="configuration">
|
---|
| 146 | <title>Configuring Apache Ant</title>
|
---|
| 147 |
|
---|
| 148 | <sect3 id="apache-ant-config">
|
---|
[30edc031] | 149 | <title>Config Files</title>
|
---|
[514ef84d] | 150 |
|
---|
[539ace5] | 151 | <para><filename>/etc/ant/ant.conf</filename>,
|
---|
| 152 | <filename>~/.ant/ant.conf</filename>, and
|
---|
[514ef84d] | 153 | <filename>~/.antrc</filename></para>
|
---|
| 154 |
|
---|
| 155 | <indexterm zone="apache-ant apache-ant-config">
|
---|
| 156 | <primary sortas="e-AA.ant-ant.conf">~/.ant/ant.conf</primary>
|
---|
| 157 | </indexterm>
|
---|
| 158 |
|
---|
| 159 | <indexterm zone="apache-ant apache-ant-config">
|
---|
| 160 | <primary sortas="e-AA.antrc">~/.antrc</primary>
|
---|
| 161 | </indexterm>
|
---|
| 162 |
|
---|
| 163 | <indexterm zone="apache-ant apache-ant-config">
|
---|
| 164 | <primary sortas="e-etc-ant-ant.conf">/etc/ant/ant.conf</primary>
|
---|
| 165 | </indexterm>
|
---|
| 166 |
|
---|
| 167 | </sect3>
|
---|
| 168 |
|
---|
| 169 | <sect3>
|
---|
| 170 | <title>Configuration Information</title>
|
---|
| 171 |
|
---|
[e549304] | 172 | <para>Some packages will require <command>ant</command> to be in the
|
---|
| 173 | search path and the <envar>$ANT_HOME</envar> environment variable
|
---|
| 174 | defined. Satisfy these requirements by adding the following lines to
|
---|
[539ace5] | 175 | <filename>/etc/profile</filename> or to individual user's
|
---|
[514ef84d] | 176 | <filename>~/.profile</filename> or <filename>~/.bashrc</filename> files:</para>
|
---|
| 177 |
|
---|
| 178 | <screen><literal>export PATH=$PATH:/opt/ant/bin
|
---|
| 179 | export ANT_HOME=/opt/ant</literal></screen>
|
---|
| 180 |
|
---|
| 181 | </sect3>
|
---|
| 182 |
|
---|
| 183 | </sect2>
|
---|
| 184 |
|
---|
| 185 | <sect2 role="content">
|
---|
| 186 | <title>Contents</title>
|
---|
| 187 |
|
---|
| 188 | <segmentedlist>
|
---|
| 189 | <segtitle>Installed Programs</segtitle>
|
---|
| 190 | <segtitle>Installed Libraries</segtitle>
|
---|
| 191 | <segtitle>Installed Directories</segtitle>
|
---|
| 192 |
|
---|
| 193 | <seglistitem>
|
---|
| 194 | <seg>ant, antRun, antRun.pl, complete-ant-cmd.pl, runant.pl, and runant.py</seg>
|
---|
[e8edecd] | 195 | <seg>ant*.jar</seg>
|
---|
| 196 | <seg>/opt/ant-&apache-ant-version;</seg>
|
---|
[514ef84d] | 197 | </seglistitem>
|
---|
| 198 | </segmentedlist>
|
---|
| 199 |
|
---|
| 200 | <variablelist>
|
---|
| 201 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 202 | <?dbfo list-presentation="list"?>
|
---|
| 203 | <?dbhtml list-presentation="table"?>
|
---|
| 204 |
|
---|
| 205 | <varlistentry id="ant">
|
---|
| 206 | <term><command>ant</command></term>
|
---|
| 207 | <listitem>
|
---|
[539ace5] | 208 | <para>is a <application>Java</application> based build tool used by
|
---|
[0619e6d] | 209 | many packages instead of the conventional <command>make</command>
|
---|
[514ef84d] | 210 | program.</para>
|
---|
| 211 | <indexterm zone="apache-ant ant">
|
---|
| 212 | <primary sortas="b-ant">ant</primary>
|
---|
| 213 | </indexterm>
|
---|
| 214 | </listitem>
|
---|
| 215 | </varlistentry>
|
---|
| 216 |
|
---|
| 217 | <varlistentry id="antRun">
|
---|
| 218 | <term><command>antRun</command></term>
|
---|
| 219 | <listitem>
|
---|
[0619e6d] | 220 | <para>is a support script used to start <command>ant</command>
|
---|
[514ef84d] | 221 | build scripts in a given directory.</para>
|
---|
| 222 | <indexterm zone="apache-ant antRun">
|
---|
| 223 | <primary sortas="b-antRun">antRun</primary>
|
---|
| 224 | </indexterm>
|
---|
| 225 | </listitem>
|
---|
| 226 | </varlistentry>
|
---|
| 227 |
|
---|
| 228 | <varlistentry id="antRun.pl">
|
---|
| 229 | <term><command>antRun.pl</command></term>
|
---|
| 230 | <listitem>
|
---|
[539ace5] | 231 | <para>is a <application>Perl</application> script that provides
|
---|
[514ef84d] | 232 | similar functionality offered by the <command>antRun</command> script.</para>
|
---|
| 233 | <indexterm zone="apache-ant antRun.pl">
|
---|
| 234 | <primary sortas="b-antRun.pl">antRun.pl</primary>
|
---|
| 235 | </indexterm>
|
---|
| 236 | </listitem>
|
---|
| 237 | </varlistentry>
|
---|
| 238 |
|
---|
| 239 | <varlistentry id="complete-ant-cmd.pl">
|
---|
| 240 | <term><command>complete-ant-cmd.pl</command></term>
|
---|
| 241 | <listitem>
|
---|
[539ace5] | 242 | <para>is a <application>Perl</application> script that allows
|
---|
[0619e6d] | 243 | <application>Bash</application> to complete an <command>ant</command>
|
---|
[514ef84d] | 244 | command-line.</para>
|
---|
| 245 | <indexterm zone="apache-ant complete-ant-cmd.pl">
|
---|
| 246 | <primary sortas="b-complete-ant-cmd.pl">complete-ant-cmd.pl</primary>
|
---|
| 247 | </indexterm>
|
---|
| 248 | </listitem>
|
---|
| 249 | </varlistentry>
|
---|
| 250 |
|
---|
| 251 | <varlistentry id="runant.pl">
|
---|
| 252 | <term><command>runant.pl</command></term>
|
---|
| 253 | <listitem>
|
---|
[539ace5] | 254 | <para>is a <application>Perl</application> wrapper script used to
|
---|
[514ef84d] | 255 | invoke <command>ant</command>.</para>
|
---|
| 256 | <indexterm zone="apache-ant runant.pl">
|
---|
| 257 | <primary sortas="b-runant.pl">runant.pl</primary>
|
---|
| 258 | </indexterm>
|
---|
| 259 | </listitem>
|
---|
| 260 | </varlistentry>
|
---|
| 261 |
|
---|
| 262 | <varlistentry id="runant.py">
|
---|
| 263 | <term><command>runant.py</command></term>
|
---|
| 264 | <listitem>
|
---|
[539ace5] | 265 | <para>is a <application>Python</application> wrapper script used to
|
---|
[514ef84d] | 266 | invoke <command>ant</command>.</para>
|
---|
| 267 | <indexterm zone="apache-ant runant.py">
|
---|
| 268 | <primary sortas="b-runant.py">runant.py</primary>
|
---|
| 269 | </indexterm>
|
---|
| 270 | </listitem>
|
---|
| 271 | </varlistentry>
|
---|
| 272 |
|
---|
| 273 | <varlistentry id="ant-star">
|
---|
[e8edecd] | 274 | <term><filename class='libraryfile'>ant*.jar</filename></term>
|
---|
[514ef84d] | 275 | <listitem>
|
---|
[0619e6d] | 276 | <para>files are the <application>Apache Ant</application>
|
---|
[514ef84d] | 277 | <application>Java</application> class libraries.</para>
|
---|
| 278 | <indexterm zone="apache-ant ant-star">
|
---|
| 279 | <primary sortas="c-ant-star">ant-*.jar</primary>
|
---|
| 280 | </indexterm>
|
---|
| 281 | </listitem>
|
---|
| 282 | </varlistentry>
|
---|
| 283 |
|
---|
| 284 | </variablelist>
|
---|
| 285 |
|
---|
| 286 | </sect2>
|
---|
[dd5bdf3] | 287 |
|
---|
| 288 | </sect1>
|
---|