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