source: general/prog/apache-ant.xml@ 50eb39e

12.2 trunk
Last change on this file since 50eb39e was 50eb39e, checked in by Bruce Dubbs <bdubbs@…>, 3 weeks ago

For apache-ant, a space after -D makes a difference.

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