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