source: general/prog/apache-ant.xml@ afb71d0a

12.0 12.1 kea ken/TL2024 ken/tuningfonts lazarus lxqt plabs/newcss python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since afb71d0a was afb71d0a, checked in by Xi Ruoyao <xry111@…>, 13 months ago

Add notes about Internet connection requirement for building or testing

  • Property mode set to 100644
File size: 11.6 KB
Line 
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 "4cf5c6728612f4787eda265b0a2d266b">
10 <!ENTITY apache-ant-size "3.7 MB">
11 <!ENTITY apache-ant-buildsize "242 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 &lfs113_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 <para condition="html" role="usernotes">User Notes:
121 <ulink url="&blfs-wiki;/apache-ant"/></para>
122
123 </sect2>
124
125 <sect2 role="installation">
126 <title>Installation of Apache Ant</title>
127
128<!-- Not needed with 1.10.10
129 <para>
130 First fix an incompatibility issue between the documentation standard
131 used in the build tree, and the one expected by <xref
132 linkend="openjdk"/>:
133 </para>
134
135<screen><userinput>sed -i 's/- -add-modules java.activation/-html4/' build.xml</userinput></screen>
136-->
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 Now fix a problem when the next command tries to download a file from
147 a problem site:
148 </para>
149
150<screen><userinput>sed -e 's|ftp.software.ibm.com|anduin.linuxfromscratch.org|' \
151 -e 's|software/awdtools/netrexx|BLFS/apache-ant|' \
152 -i fetch.xml </userinput></screen>
153
154 <para>
155 Download the runtime dependencies using the
156 <filename>fetch.xml</filename> ant build script:
157 </para>
158
159<screen><userinput>bootstrap/bin/ant -f fetch.xml -Ddest=optional</userinput></screen>
160
161 <para>
162 Build <application>Apache Ant</application> by running the following
163 command:
164 </para>
165
166<screen><userinput>./build.sh -Ddist.dir=$PWD/ant-&apache-ant-version; dist</userinput></screen>
167
168 <para>
169 Install, as the <systemitem class="username">root</systemitem> user:
170 </para>
171
172<screen role="root"><userinput>cp -rv ant-&apache-ant-version; /opt/ &amp;&amp;
173chown -R root:root /opt/ant-&apache-ant-version; &amp;&amp;
174ln -sfv ant-&apache-ant-version; /opt/ant</userinput></screen>
175
176 </sect2>
177
178 <sect2 role="commands">
179 <title>Command Explanations</title>
180
181 <para>
182 <command>bootstrap/bin/ant -f fetch.xml -Ddest=optional</command>:
183 Downloads the missing dependencies to the user's home directory, and
184 copies them into the source tree (in the <filename>lib/optional</filename>
185 directory, where <command>ant</command> picks them up at build time).
186 </para>
187
188 <para>
189 <command>./build.sh -Ddist.dir=$PWD/ant-&apache-ant-version;
190 dist</command>: This command builds, tests, then installs the package
191 into a temporary directory.
192 </para>
193
194 </sect2>
195
196 <sect2 role="configuration">
197 <title>Configuring Apache Ant</title>
198
199 <sect3 id="apache-ant-config">
200 <title>Config Files</title>
201
202 <para>
203 <filename>/etc/ant/ant.conf</filename>,
204 <filename>~/.ant/ant.conf</filename>, and
205 <filename>~/.antrc</filename>
206 </para>
207
208 <indexterm zone="apache-ant apache-ant-config">
209 <primary sortas="e-AA.ant-ant.conf">~/.ant/ant.conf</primary>
210 </indexterm>
211
212 <indexterm zone="apache-ant apache-ant-config">
213 <primary sortas="e-AA.antrc">~/.antrc</primary>
214 </indexterm>
215
216 <indexterm zone="apache-ant apache-ant-config">
217 <primary sortas="e-etc-ant-ant.conf">/etc/ant/ant.conf</primary>
218 </indexterm>
219
220 </sect3>
221
222 <sect3>
223 <title>Configuration Information</title>
224
225 <para>
226 Some packages will require <command>ant</command> to be in the
227 search path and the <envar>ANT_HOME</envar> environment variable
228 defined. Satisfy these requirements by issuing, as the <systemitem
229 class="username">root</systemitem> user:
230 </para>
231
232<screen role="root"><userinput>cat &gt; /etc/profile.d/ant.sh &lt;&lt; EOF
233<literal># Begin /etc/profile.d/ant.sh
234
235pathappend /opt/ant/bin
236export ANT_HOME=/opt/ant
237
238# End /etc/profile.d/ant.sh</literal>
239EOF</userinput></screen>
240
241 <para>
242 The above instructions assume you have configured your system as
243 described in <xref linkend="postlfs-config-profile"/>.
244 </para>
245
246 </sect3>
247
248 </sect2>
249
250 <sect2 role="content">
251 <title>Contents</title>
252
253 <segmentedlist>
254 <segtitle>Installed Programs</segtitle>
255 <segtitle>Installed Libraries</segtitle>
256 <segtitle>Installed Directories</segtitle>
257
258 <seglistitem>
259 <seg>
260 ant, antRun, antRun.pl, complete-ant-cmd.pl, runant.pl, and runant.py </seg>
261 <seg>
262 Numerous <filename>ant*.jar</filename> and dependent libraries in
263 <envar>$ANT_HOME</envar><filename>/lib</filename>
264 </seg>
265 <seg>/opt/ant-&apache-ant-version;</seg>
266 </seglistitem>
267 </segmentedlist>
268
269 <variablelist>
270 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
271 <?dbfo list-presentation="list"?>
272 <?dbhtml list-presentation="table"?>
273
274 <varlistentry id="ant">
275 <term><command>ant</command></term>
276 <listitem>
277 <para>
278 is a <application>Java</application> based build tool used by
279 many packages instead of the conventional <command>make</command>
280 program
281 </para>
282 <indexterm zone="apache-ant ant">
283 <primary sortas="b-ant">ant</primary>
284 </indexterm>
285 </listitem>
286 </varlistentry>
287
288 <varlistentry id="antRun">
289 <term><command>antRun</command></term>
290 <listitem>
291 <para>
292 is a support script used to start <command>ant</command>
293 build scripts in a given directory
294 </para>
295 <indexterm zone="apache-ant antRun">
296 <primary sortas="b-antRun">antRun</primary>
297 </indexterm>
298 </listitem>
299 </varlistentry>
300
301 <varlistentry id="antRun.pl">
302 <term><command>antRun.pl</command></term>
303 <listitem>
304 <para>
305 is a <application>Perl</application> script that provides similar
306 functionality offered by the <command>antRun</command> script
307 </para>
308 <indexterm zone="apache-ant antRun.pl">
309 <primary sortas="b-antRun.pl">antRun.pl</primary>
310 </indexterm>
311 </listitem>
312 </varlistentry>
313
314 <varlistentry id="complete-ant-cmd.pl">
315 <term><command>complete-ant-cmd.pl</command></term>
316 <listitem>
317 <para>
318 is a <application>Perl</application> script that allows
319 <application>Bash</application> to complete an
320 <command>ant</command> command-line
321 </para>
322 <indexterm zone="apache-ant complete-ant-cmd.pl">
323 <primary sortas="b-complete-ant-cmd.pl">complete-ant-cmd.pl</primary>
324 </indexterm>
325 </listitem>
326 </varlistentry>
327
328 <varlistentry id="runant.pl">
329 <term><command>runant.pl</command></term>
330 <listitem>
331 <para>
332 is a <application>Perl</application> wrapper script used to
333 invoke <command>ant</command>
334 </para>
335 <indexterm zone="apache-ant runant.pl">
336 <primary sortas="b-runant.pl">runant.pl</primary>
337 </indexterm>
338 </listitem>
339 </varlistentry>
340
341 <varlistentry id="runant.py">
342 <term><command>runant.py</command></term>
343 <listitem>
344 <para>
345 is a <application>Python</application> wrapper script used to
346 invoke <command>ant</command>
347 </para>
348 <indexterm zone="apache-ant runant.py">
349 <primary sortas="b-runant.py">runant.py</primary>
350 </indexterm>
351 </listitem>
352 </varlistentry>
353
354 <varlistentry id="ant-star">
355 <term><filename class="libraryfile">ant*.jar</filename></term>
356 <listitem>
357 <para>
358 files are the <application>Apache Ant</application>
359 <application>Java</application> class libraries
360 </para>
361 <indexterm zone="apache-ant ant-star">
362 <primary sortas="c-ant-star">ant-*.jar</primary>
363 </indexterm>
364 </listitem>
365 </varlistentry>
366
367 </variablelist>
368
369 </sect2>
370
371</sect1>
Note: See TracBrowser for help on using the repository browser.