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