[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 |
|
---|
[a145084] | 7 | <!ENTITY apache-ant-download-http "&sources-anduin-http;/a/apache-ant-&apache-ant-version;-src.tar.bz2">
|
---|
| 8 | <!-- <!ENTITY apache-ant-download-ftp "ftp://ftp.oregonstate.edu/pub/apache/ant/source/apache-ant-&apache-ant-version;-src.tar.bz2"> -->
|
---|
| 9 | <!ENTITY apache-ant-download-ftp " ">
|
---|
[915403df] | 10 | <!ENTITY apache-ant-md5sum "22b378e27ab300e4d73bf09d91c7e2a6">
|
---|
| 11 | <!ENTITY apache-ant-size "6.8 MB">
|
---|
| 12 | <!ENTITY apache-ant-buildsize "109 MB">
|
---|
[baba58bc] | 13 | <!ENTITY apache-ant-time "0.4 SBU">
|
---|
[dd5bdf3] | 14 | ]>
|
---|
| 15 |
|
---|
| 16 | <sect1 id="apache-ant" xreflabel="Apache Ant-&apache-ant-version;">
|
---|
[514ef84d] | 17 | <?dbhtml filename="apache-ant.html"?>
|
---|
| 18 |
|
---|
| 19 | <sect1info>
|
---|
| 20 | <othername>$LastChangedBy$</othername>
|
---|
| 21 | <date>$Date$</date>
|
---|
| 22 | </sect1info>
|
---|
| 23 |
|
---|
| 24 | <title>Apache Ant-&apache-ant-version;</title>
|
---|
| 25 |
|
---|
| 26 | <indexterm zone="apache-ant">
|
---|
| 27 | <primary sortas="a-Apache-Ant">Apache Ant</primary>
|
---|
| 28 | </indexterm>
|
---|
| 29 |
|
---|
| 30 | <sect2 role="package">
|
---|
| 31 | <title>Introduction to Apache Ant</title>
|
---|
| 32 |
|
---|
[539ace5] | 33 | <para>The <application>Apache Ant</application> package is a
|
---|
| 34 | <application>Java</application>-based build tool. In theory, it is kind of like
|
---|
| 35 | <command>make</command>, but without <command>make</command>'s wrinkles.
|
---|
| 36 | Ant is different. Instead of a model where it is extended with shell-based commands,
|
---|
| 37 | Ant is extended using <application>Java</application> classes. Instead of writing
|
---|
| 38 | shell commands, the configuration files are XML-based, calling out a target tree where
|
---|
| 39 | various tasks get executed. Each task is run by an object that implements a
|
---|
[514ef84d] | 40 | particular task interface.</para>
|
---|
| 41 |
|
---|
| 42 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 43 | <itemizedlist spacing="compact">
|
---|
| 44 | <listitem>
|
---|
| 45 | <para>Download (HTTP): <ulink url="&apache-ant-download-http;"/></para>
|
---|
| 46 | </listitem>
|
---|
| 47 | <listitem>
|
---|
| 48 | <para>Download (FTP): <ulink url="&apache-ant-download-ftp;"/></para>
|
---|
| 49 | </listitem>
|
---|
| 50 | <listitem>
|
---|
| 51 | <para>Download MD5 sum: &apache-ant-md5sum;</para>
|
---|
| 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
| 54 | <para>Download size: &apache-ant-size;</para>
|
---|
| 55 | </listitem>
|
---|
| 56 | <listitem>
|
---|
| 57 | <para>Estimated disk space required: &apache-ant-buildsize;</para>
|
---|
| 58 | </listitem>
|
---|
| 59 | <listitem>
|
---|
| 60 | <para>Estimated build time: &apache-ant-time;</para>
|
---|
| 61 | </listitem>
|
---|
| 62 | </itemizedlist>
|
---|
| 63 |
|
---|
[915403df] | 64 | <!-- <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
[514ef84d] | 65 | <itemizedlist spacing="compact">
|
---|
| 66 | <listitem>
|
---|
[539ace5] | 67 | <para>Required Patch: <ulink
|
---|
[514ef84d] | 68 | url="&patch-root;/apache-ant-&apache-ant-version;-blfs_install-1.patch"/></para>
|
---|
| 69 | </listitem>
|
---|
[915403df] | 70 | </itemizedlist> -->
|
---|
[514ef84d] | 71 |
|
---|
| 72 | <bridgehead renderas="sect3">Apache Ant Dependencies</bridgehead>
|
---|
| 73 |
|
---|
| 74 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
[915403df] | 75 | <para role="required"><xref linkend="jdk"/> and
|
---|
| 76 | <xref linkend="junit"/></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>
|
---|
| 92 |
|
---|
| 93 | <!-- <para>One such library is the
|
---|
[af2764a] | 94 | <application>JUnit</application>-3.8.1 testing framework library. Many
|
---|
| 95 | Ant-installed packages will use this library to perform the unit tests
|
---|
| 96 | during the build process. To install the JUnit library along with the
|
---|
[539ace5] | 97 | <application>Apache Ant</application> package, download it from
|
---|
| 98 | <ulink url="http://www.junit.org/"/>, unzip the distribution file (requires
|
---|
[514ef84d] | 99 | <xref linkend="unzip"/>) and copy the <filename>junit.jar</filename> file
|
---|
| 100 | into the <filename class='directory'>lib</filename> subdirectory of the
|
---|
[539ace5] | 101 | <application>Apache Ant</application> source tree before beginning the
|
---|
[915403df] | 102 | <application>Apache Ant</application> build.</para> -->
|
---|
[514ef84d] | 103 | </note>
|
---|
| 104 |
|
---|
[539ace5] | 105 | <para>Install <application>Apache Ant</application> by running the following
|
---|
[514ef84d] | 106 | commands:</para>
|
---|
| 107 |
|
---|
[915403df] | 108 | <screen><userinput>sed -i 's|${dist.dir}/etc|/etc/ant|' build.xml
|
---|
| 109 | sed -i 's|/etc/ant.conf|/etc/ant/ant.conf|' src/script/ant</userinput></screen>
|
---|
[514ef84d] | 110 |
|
---|
[915403df] | 111 | <para>The unit regression tests are performed in the build step below.</para>
|
---|
[af2764a] | 112 |
|
---|
[514ef84d] | 113 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 114 |
|
---|
| 115 | <screen role="root"><userinput>./build.sh -Ddist.dir=/opt/ant-&apache-ant-version; dist &&
|
---|
| 116 | ln -v -sf /etc/ant /opt/ant-&apache-ant-version;/etc &&
|
---|
| 117 | ln -v -sf ant-&apache-ant-version; /opt/ant</userinput></screen>
|
---|
| 118 |
|
---|
| 119 | </sect2>
|
---|
| 120 |
|
---|
| 121 | <sect2 role="commands">
|
---|
| 122 | <title>Command Explanations</title>
|
---|
| 123 |
|
---|
[915403df] | 124 | <para><command>sed ...</command>: These commands change the configuration
|
---|
| 125 | directory to <filename class='directory'>/etc/ant</filename> to conform
|
---|
| 126 | with FHS guidelines.</para>
|
---|
| 127 |
|
---|
[539ace5] | 128 | <para><command>./build.sh -Ddist.dir=/opt/ant-&apache-ant-version;
|
---|
[915403df] | 129 | dist</command>: This command does everything. It builds, tests, then
|
---|
[539ace5] | 130 | installs the package into
|
---|
[514ef84d] | 131 | <filename class='directory'>/opt/ant-&apache-ant-version;</filename>.</para>
|
---|
| 132 |
|
---|
[539ace5] | 133 | <para><command>ln -v -sf /etc/ant /opt/ant-&apache-ant-version;/etc</command>:
|
---|
[915403df] | 134 | The <command>sed</command> commands change the configuration directory to
|
---|
| 135 | <filename class='directory'>/etc/ant</filename> and this command creates a
|
---|
| 136 | symlink from the configuration directory back to the installation directory
|
---|
| 137 | as the package is expecting to find some files there.</para>
|
---|
[514ef84d] | 138 |
|
---|
[539ace5] | 139 | <para><command>ln -v -sf ant-&apache-ant-version; /opt/ant</command>: This
|
---|
[514ef84d] | 140 | command is optional, and creates a convenience symlink.</para>
|
---|
| 141 |
|
---|
| 142 | </sect2>
|
---|
| 143 |
|
---|
| 144 | <sect2 role="configuration">
|
---|
| 145 | <title>Configuring Apache Ant</title>
|
---|
| 146 |
|
---|
| 147 | <sect3 id="apache-ant-config">
|
---|
[30edc031] | 148 | <title>Config Files</title>
|
---|
[514ef84d] | 149 |
|
---|
[539ace5] | 150 | <para><filename>/etc/ant/ant.conf</filename>,
|
---|
| 151 | <filename>~/.ant/ant.conf</filename>, and
|
---|
[514ef84d] | 152 | <filename>~/.antrc</filename></para>
|
---|
| 153 |
|
---|
| 154 | <indexterm zone="apache-ant apache-ant-config">
|
---|
| 155 | <primary sortas="e-AA.ant-ant.conf">~/.ant/ant.conf</primary>
|
---|
| 156 | </indexterm>
|
---|
| 157 |
|
---|
| 158 | <indexterm zone="apache-ant apache-ant-config">
|
---|
| 159 | <primary sortas="e-AA.antrc">~/.antrc</primary>
|
---|
| 160 | </indexterm>
|
---|
| 161 |
|
---|
| 162 | <indexterm zone="apache-ant apache-ant-config">
|
---|
| 163 | <primary sortas="e-etc-ant-ant.conf">/etc/ant/ant.conf</primary>
|
---|
| 164 | </indexterm>
|
---|
| 165 |
|
---|
| 166 | </sect3>
|
---|
| 167 |
|
---|
| 168 | <sect3>
|
---|
| 169 | <title>Configuration Information</title>
|
---|
| 170 |
|
---|
| 171 | <para>Some packages will require <command>ant</command> to be in the search
|
---|
[539ace5] | 172 | path and the <envar>$ANT_HOME</envar> environment variable defined.
|
---|
| 173 | Satisfy these requirements by adding the following lines to
|
---|
| 174 | <filename>/etc/profile</filename> or to individual user's
|
---|
[514ef84d] | 175 | <filename>~/.profile</filename> or <filename>~/.bashrc</filename> files:</para>
|
---|
| 176 |
|
---|
| 177 | <screen><literal>export PATH=$PATH:/opt/ant/bin
|
---|
| 178 | export ANT_HOME=/opt/ant</literal></screen>
|
---|
| 179 |
|
---|
| 180 | </sect3>
|
---|
| 181 |
|
---|
| 182 | </sect2>
|
---|
| 183 |
|
---|
| 184 | <sect2 role="content">
|
---|
| 185 | <title>Contents</title>
|
---|
| 186 |
|
---|
| 187 | <segmentedlist>
|
---|
| 188 | <segtitle>Installed Programs</segtitle>
|
---|
| 189 | <segtitle>Installed Libraries</segtitle>
|
---|
| 190 | <segtitle>Installed Directories</segtitle>
|
---|
| 191 |
|
---|
| 192 | <seglistitem>
|
---|
| 193 | <seg>ant, antRun, antRun.pl, complete-ant-cmd.pl, runant.pl, and runant.py</seg>
|
---|
[915403df] | 194 | <seg>ant.jar, ant-*.jar, xercesImpl.jar, and xml-apis.jar</seg>
|
---|
[514ef84d] | 195 | <seg>/etc/ant and /opt/ant-&apache-ant-version;</seg>
|
---|
| 196 | </seglistitem>
|
---|
| 197 | </segmentedlist>
|
---|
| 198 |
|
---|
| 199 | <variablelist>
|
---|
| 200 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 201 | <?dbfo list-presentation="list"?>
|
---|
| 202 | <?dbhtml list-presentation="table"?>
|
---|
| 203 |
|
---|
| 204 | <varlistentry id="ant">
|
---|
| 205 | <term><command>ant</command></term>
|
---|
| 206 | <listitem>
|
---|
[539ace5] | 207 | <para>is a <application>Java</application> based build tool used by
|
---|
[0619e6d] | 208 | many packages instead of the conventional <command>make</command>
|
---|
[514ef84d] | 209 | program.</para>
|
---|
| 210 | <indexterm zone="apache-ant ant">
|
---|
| 211 | <primary sortas="b-ant">ant</primary>
|
---|
| 212 | </indexterm>
|
---|
| 213 | </listitem>
|
---|
| 214 | </varlistentry>
|
---|
| 215 |
|
---|
| 216 | <varlistentry id="antRun">
|
---|
| 217 | <term><command>antRun</command></term>
|
---|
| 218 | <listitem>
|
---|
[0619e6d] | 219 | <para>is a support script used to start <command>ant</command>
|
---|
[514ef84d] | 220 | build scripts in a given directory.</para>
|
---|
| 221 | <indexterm zone="apache-ant antRun">
|
---|
| 222 | <primary sortas="b-antRun">antRun</primary>
|
---|
| 223 | </indexterm>
|
---|
| 224 | </listitem>
|
---|
| 225 | </varlistentry>
|
---|
| 226 |
|
---|
| 227 | <varlistentry id="antRun.pl">
|
---|
| 228 | <term><command>antRun.pl</command></term>
|
---|
| 229 | <listitem>
|
---|
[539ace5] | 230 | <para>is a <application>Perl</application> script that provides
|
---|
[514ef84d] | 231 | similar functionality offered by the <command>antRun</command> script.</para>
|
---|
| 232 | <indexterm zone="apache-ant antRun.pl">
|
---|
| 233 | <primary sortas="b-antRun.pl">antRun.pl</primary>
|
---|
| 234 | </indexterm>
|
---|
| 235 | </listitem>
|
---|
| 236 | </varlistentry>
|
---|
| 237 |
|
---|
| 238 | <varlistentry id="complete-ant-cmd.pl">
|
---|
| 239 | <term><command>complete-ant-cmd.pl</command></term>
|
---|
| 240 | <listitem>
|
---|
[539ace5] | 241 | <para>is a <application>Perl</application> script that allows
|
---|
[0619e6d] | 242 | <application>Bash</application> to complete an <command>ant</command>
|
---|
[514ef84d] | 243 | command-line.</para>
|
---|
| 244 | <indexterm zone="apache-ant complete-ant-cmd.pl">
|
---|
| 245 | <primary sortas="b-complete-ant-cmd.pl">complete-ant-cmd.pl</primary>
|
---|
| 246 | </indexterm>
|
---|
| 247 | </listitem>
|
---|
| 248 | </varlistentry>
|
---|
| 249 |
|
---|
| 250 | <varlistentry id="runant.pl">
|
---|
| 251 | <term><command>runant.pl</command></term>
|
---|
| 252 | <listitem>
|
---|
[539ace5] | 253 | <para>is a <application>Perl</application> wrapper script used to
|
---|
[514ef84d] | 254 | invoke <command>ant</command>.</para>
|
---|
| 255 | <indexterm zone="apache-ant runant.pl">
|
---|
| 256 | <primary sortas="b-runant.pl">runant.pl</primary>
|
---|
| 257 | </indexterm>
|
---|
| 258 | </listitem>
|
---|
| 259 | </varlistentry>
|
---|
| 260 |
|
---|
| 261 | <varlistentry id="runant.py">
|
---|
| 262 | <term><command>runant.py</command></term>
|
---|
| 263 | <listitem>
|
---|
[539ace5] | 264 | <para>is a <application>Python</application> wrapper script used to
|
---|
[514ef84d] | 265 | invoke <command>ant</command>.</para>
|
---|
| 266 | <indexterm zone="apache-ant runant.py">
|
---|
| 267 | <primary sortas="b-runant.py">runant.py</primary>
|
---|
| 268 | </indexterm>
|
---|
| 269 | </listitem>
|
---|
| 270 | </varlistentry>
|
---|
| 271 |
|
---|
| 272 | <varlistentry id="ant-star">
|
---|
| 273 | <term><filename class='libraryfile'>ant-*.jar</filename></term>
|
---|
| 274 | <listitem>
|
---|
[0619e6d] | 275 | <para>files are the <application>Apache Ant</application>
|
---|
[514ef84d] | 276 | <application>Java</application> class libraries.</para>
|
---|
| 277 | <indexterm zone="apache-ant ant-star">
|
---|
| 278 | <primary sortas="c-ant-star">ant-*.jar</primary>
|
---|
| 279 | </indexterm>
|
---|
| 280 | </listitem>
|
---|
| 281 | </varlistentry>
|
---|
| 282 |
|
---|
| 283 | <varlistentry id="xercesImpl">
|
---|
| 284 | <term><filename class='libraryfile'>xercesImpl.jar</filename></term>
|
---|
| 285 | <listitem>
|
---|
[539ace5] | 286 | <para>is a <application>Java</application> class library used by
|
---|
[514ef84d] | 287 | <application>Apache Ant</application> to perform XML parsing.</para>
|
---|
| 288 | <indexterm zone="apache-ant xercesImpl">
|
---|
| 289 | <primary sortas="c-xercesImpl">xercesImpl.jar</primary>
|
---|
| 290 | </indexterm>
|
---|
| 291 | </listitem>
|
---|
| 292 | </varlistentry>
|
---|
| 293 |
|
---|
| 294 | <varlistentry id="xml-apis">
|
---|
| 295 | <term><filename class='libraryfile'>xml-apis.jar</filename></term>
|
---|
| 296 | <listitem>
|
---|
[539ace5] | 297 | <para>contains the DOM <application>Java</application> classes required
|
---|
[514ef84d] | 298 | by the <application>Apache Ant</application> XML formatter.</para>
|
---|
| 299 | <indexterm zone="apache-ant xml-apis">
|
---|
| 300 | <primary sortas="c-xml-apis">xml-apis.jar</primary>
|
---|
| 301 | </indexterm>
|
---|
| 302 | </listitem>
|
---|
| 303 | </varlistentry>
|
---|
| 304 |
|
---|
| 305 | </variablelist>
|
---|
| 306 |
|
---|
| 307 | </sect2>
|
---|
[dd5bdf3] | 308 |
|
---|
| 309 | </sect1>
|
---|