forked from freemarker/fmpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
591 lines (526 loc) · 23 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
<?xml version="1.0" encoding="ISO-8859-1"?>
<project basedir="." default="jar" name="fmpp" xmlns:b="http://fmpp.sourceforge.org/build">
<!-- You have to keep the contents of these up-to-date manually: -->
<property file="src/main/resources/fmpp/version.properties" />
<property file="build.properties" />
<property name="bootclasspath.path" value="${sun.boot.class.path}" />
<available classpath="${bootclasspath.path}"
classname="java.lang.Object"
ignoresystemclasses="true"
property="bootclasspath.correct"
/>
<property environment="env" />
<property name="ant.jar.path" value="${env.ANT_HOME}/lib/ant.jar" />
<available property="atLeastJDK8" classname="java.util.function.Predicate" />
<path id="classpath.path">
<fileset dir="lib">
<include name="*.jar"/>
<exclude name="fmpp.jar"/>
</fileset>
<pathelement path="${ant.jar.path}" />
</path>
<path id="testClasspath.path">
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
<pathelement path="build/test/classes"/>
</path>
<tstamp>
<format property="timeStamp" pattern="yyyy-MM-dd'T'HH:mm:ss'Z'" timezone="UTC" />
</tstamp>
<filter token="VERSION" value="${version}" />
<filter token="TIMESTAMP" value="${timeStamp}" />
<property name="freemarkerDocs.path"
value="${freemarkerReleases.path}/apache-freemarker-${dependency.freemarker.version}-bin/documentation/_html"
/>
<available file="${freemarkerDocs.path}" type="dir" property="freemarkerDocs.available" />
<property name="dist.dir" value="build/dist/fmpp_${version}" />
<target name="all" description="Build fmpp.jar and the documentation" depends="jar, docs" />
<target name="jar" depends="compile" description="Re-build fmpp.jar">
<mkdir dir="lib" />
<jar basedir="build/classes" jarfile="lib/fmpp.jar">
<manifest>
<attribute name="Main-Class" value="fmpp.tools.CommandLine" />
<attribute name="Class-Path" value="freemarker.jar bsh.jar resolver.jar imageinfo.jar" />
<attribute name="Extension-name" value="fmpp" />
<attribute name="Specification-Title" value="FMPP" />
<attribute name="Specification-Version" value="${version}" />
<attribute name="Specification-Vendor" value="D�niel D�k�ny" />
<attribute name="Implementation-Title" value="FMPP" />
<attribute name="Implementation-Version" value="${version}" />
<attribute name="Implementation-Vendor" value="D�niel D�k�ny" />
</manifest>
</jar>
</target>
<target name="compile" description="Compile Java files and copy resources">
<fail unless="bootclasspath.correct">
<!--
-->The "boot.classpath" property value (${bootclasspath.path}) <!--
-->seems to be an incorrect boot classpath. Please fix it in <!--
-->the <projectDir>/build.properties file, or wherever you <!--
-->set it.<!--
-->
</fail>
<mkdir dir="build/classes" />
<echo>Compling classes using boot classpath ${bootclasspath.path}</echo>
<javac bootclasspath="${bootclasspath.path}"
includeantruntime="false"
srcdir="src/main/java"
destdir="build/classes"
encoding="utf-8"
deprecation="off"
debug="on"
source="1.8"
target="1.8"
>
<classpath refid="classpath.path" />
</javac>
<copy toDir="build/classes">
<fileset dir="src/main/resources" excludes="fmpp/version.properties" />
</copy>
<copy toDir="build/classes" filtering="true" overwrite="true">
<fileset dir="src/main/resources" includes="fmpp/version.properties" />
</copy>
</target>
<target name="docs" depends="docs.preFMPP" description="Generates build/docs directory for offline reading">
<b:docs.fmpp online="false" />
</target>
<target name="docsOnline" depends="docs.preFMPP" description="Generates build/docs directory for online reading">
<b:docs.fmpp online="true" />
</target>
<macrodef name="docs.fmpp" uri="http://fmpp.sourceforge.org/build">
<attribute name="online" />
<sequential>
<mkdir dir="build/docs" />
<!--
The command-line tool is used instead of FMPP Ant task, in a forked VM,
because of the class loading issues caused by the exceptional situation that
we (re)build fmpp.jar in this VM, and also because this task should work
without installing FMPP for Ant.
-->
<java fork="true" jar="${basedir}/lib/fmpp.jar" failonerror="true">
<sysproperty key="fmpp.home" value="${basedir}" />
<arg value="-C${basedir}/docs.fmpp" />
<arg value='-D online:@{online}' />
</java>
</sequential>
</macrodef>
<!-- "jar" is dependency as FMPP will run from fmpp.jar -->
<target name="docs.preFMPP" depends="jar, javadoc, docs.examples, docs.freemarker, docs.gulp" />
<!-- See BUILD.txt about installing node.js and Gulp! -->
<target name="docs.gulp">
<mkdir dir="build/docs/style" />
<exec executable="${nodeJsCommand}" failonerror="true" dir="${basedir}">
<arg value="node_modules/gulp/bin/gulp.js"/>
</exec>
</target>
<target name="docs.examples">
<copy todir="build/docs/examples" includeEmptyDirs="true">
<fileset dir="src/docs/examples">
<exclude name="*/out/" />
<exclude name="*/log.fmpp" />
</fileset>
</copy>
</target>
<target name="docs.freemarker"
depends="docs.freemarker.ifAvailable, docs.freemarker.unlessAvailable"
description="Copy FreeMarker documentation into the docs"
/>
<target name="docs.freemarker.ifAvailable" if="freemarkerDocs.available">
<mkdir dir="build/docs" />
<copy todir="build/docs/freemarker">
<fileset dir="${freemarkerDocs.path}" includes="**" />
</copy>
</target>
<target name="docs.freemarker.unlessAvailable" unless="freemarkerDocs.available">
<fail unless="freemarkerReleases.path">freemarkerReleases.path wasn't set; check build.properties</fail>
<fail unless="dependency.freemarker.version">dependency.freemarker.version wasn't set; check build.properties</fail>
<fail>FreeMarker documentation wasn't found here: ${freemarkerDocs.path}</fail>
</target>
<target name="javadoc" depends="_rawJavadoc, _fixJDK8JavadocCSS" description="Build the JavaDocs" />
<target name="_rawJavadoc">
<mkdir dir="build/docs/api" />
<delete includeEmptyDirs="yes">
<fileset dir="build/docs/api" includes="**/*" />
</delete>
<javadoc sourcepath="src/main/java"
destdir="build/docs/api"
doctitle="FMPP ${version} API"
windowtitle="FMPP ${version} API"
overview="src/main/java/fmpp/overview.html"
classpathref="classpath.path"
use="true"
charset="UTF-8"
docencoding="UTF-8"
locale="en_US"
failonerror="true"
>
<link href="http://docs.oracle.com/javase/8/docs/api/" />
<link href="http://freemarker.org/docs/api/" />
</javadoc>
</target>
<!--
DO NOT EDIT: This was copied from FreeMarker's build.xml. If you fix anything in it,
please do it there, then copy it back here. EXCEPT that the file property value is
different here.
-->
<target name="_fixJDK8JavadocCSS" depends="_rawJavadoc" if="atLeastJDK8">
<property name="file" value="build/docs/api/stylesheet.css" />
<available file="${file}" property="stylesheet.available" />
<fail unless="stylesheet.available">CSS file not found: ${file}</fail>
<echo>Fixing JDK 8 CSS in ${file}</echo>
<!-- Tell that it's modified: -->
<replaceregexp file="${file}"
flags="gs"
encoding="utf-8"
match="/\* (Javadoc style sheet) \*/"
replace="/\* \1 - JDK 8 usability fix regexp substitutions applied \*/"
/>
<!-- Remove broken link: -->
<replaceregexp file="${file}" flags="gs" encoding="utf-8"
match="@import url\('resources/fonts/dejavu.css'\);\s*" replace=""
/>
<!-- Font family fixes: -->
<replaceregexp file="${file}" flags="gsi" encoding="utf-8" match="['"]DejaVu Sans['"]" replace="Arial" />
<replaceregexp file="${file}"
flags="gsi"
encoding="utf-8"
match="['"]DejaVu Sans Mono['"]"
replace="'Courier New'"
/>
<replaceregexp file="${file}" flags="gsi" encoding="utf-8" match="['"]DejaVu Serif['"]" replace="Arial" />
<replaceregexp file="${file}" flags="gsi" encoding="utf-8" match="(?<=[\s,:])serif\b" replace="sans-serif" />
<replaceregexp file="${file}" flags="gsi" encoding="utf-8" match="(?<=[\s,:])Georgia,\s*" replace="" />
<replaceregexp file="${file}"
flags="gsi"
encoding="utf-8"
match="['"]Times New Roman['"],\s*"
replace=""
/>
<replaceregexp file="${file}" flags="gsi" encoding="utf-8" match="(?<=[\s,:])Times,\s*" replace="" />
<replaceregexp file="${file}"
flags="gsi"
encoding="utf-8"
match="(?<=[\s,:])Arial\s*,\s*Arial\b"
replace="Arial"
/>
<!-- "Parameters:", "Returns:", "Throws:", "Since:", "See also:" etc. fixes: -->
<property name="ddSelectorStart"
value="(?:\.contentContainer\s+\.(?:details|description)|\.serializedFormContainer)\s+dl\s+dd\b.*?\{[^\}]*\b"
/>
<property name="ddPropertyEnd" value="\b.+?;" />
<!-- - Put back description (dd) indentation: -->
<replaceregexp file="${file}"
flags="gs"
encoding="utf-8"
match="(${ddSelectorStart})margin${ddPropertyEnd}"
replace="\1margin: 5px 0 10px 20px;"
/>
<!-- - No monospace font for the description (dd) part: -->
<replaceregexp file="${file}"
flags="gs"
encoding="utf-8"
match="(${ddSelectorStart})font-family${ddPropertyEnd}"
replace="\1"
/>
</target>
<target name="dist" description="Build the distribution (release) archives" depends="all">
<fail unless="atLeastJDK8" message="The release should be built with JDK 8+ (you may need to set JAVA_HOME)" />
<mkdir dir="${dist.dir}" />
<copy todir="${dist.dir}">
<fileset dir=".">
<exclude name="**/.*" />
<exclude name="**/.*/" />
<exclude name="build/" />
<exclude name="build.properties" />
<exclude name="node_modules/" />
<exclude name="package-lock.json" />
<exclude name="**/.*/" />
<exclude name="README.*" />
</fileset>
</copy>
<copy todir="${dist.dir}" includeEmptyDirs="true">
<fileset dir="build" includes="docs/" />
</copy>
<copy todir="${dist.dir}" filtering="true">
<fileset dir="." includes="README.*" />
</copy>
<delete file="${dist.dir}.tar.gz" />
<tar tarfile="${dist.dir}.tar" longfile="gnu">
<tarfileset dir="${dist.dir}" mode="755" prefix="fmpp">
<include name="bin/**" />
</tarfileset>
<tarfileset dir="${dist.dir}" prefix="fmpp">
<exclude name="bin/" />
</tarfileset>
</tar>
<gzip src="${dist.dir}.tar" zipfile="${dist.dir}.tar.gz" />
<delete file="${dist.dir}.tar" />
<delete file="${dist.dir}.zip" />
<zip destfile="${dist.dir}.zip" encoding="US-ASCII" whenempty="fail">
<zipfileset dir="${dist.dir}" filemode="755" prefix="fmpp">
<include name="bin/**" />
</zipfileset>
<zipfileset dir="${dist.dir}" prefix="fmpp">
<exclude name="bin/" />
</zipfileset>
</zip>
</target>
<target name="site" depends="docsOnline" description="Build the WWW site -- requires ${dist.dir}.tar.gz">
<mkdir dir="build/site/site_${version}" />
<copy todir="build/site/site_${version}">
<fileset dir="build/docs">
<exclude name="examples/" />
<exclude name="freemarker/" />
</fileset>
</copy>
<!-- Create a tar.gz for quicker uploading -->
<tar tarfile="build/site/site.tar" basedir="build/site/site_${version}" />
<gzip src="build/site/site.tar" zipfile="build/site/site.tar.gz" />
<delete file="build/site/site.tar" />
</target>
<target name="test" depends="jar" description="Run test suite">
<mkdir dir="build/test/classes" />
<javac bootclasspath="${bootclasspath.path}"
includeantruntime="false"
srcdir="src/test/java"
destdir="build/test/classes"
encoding="utf-8"
deprecation="on"
debug="on"
source="1.5"
target="1.5"
>
<classpath refid="testClasspath.path" />
</javac>
<copy toDir="build/test/classes">
<fileset dir="src/test/resources">
<!-- These are read directly from under src/test/resources: -->
<exclude name="tests/**" />
<exclude name="expected/**" />
</fileset>
</copy>
<mkdir dir="build/junit-reports" />
<junit haltonfailure="on" fork="true" forkmode="once">
<classpath refid="testClasspath.path" />
<formatter type="plain" />
<formatter type="xml" />
<batchtest todir="build/junit-reports">
<fileset dir="src/test/java">
<include name="**/*Test.java" />
<include name="**/*TestSuite.java" />
<exclude name="fmpp/testsuite/**" /> <!-- Not JUnit -->
</fileset>
</batchtest>
</junit>
<!-- This wasn't yet converted to JUnit test: -->
<property name="fmpp.testcase" value="" />
<java fork="true"
classname="fmpp.testsuite.TestSuite"
classpath="lib/fmpp.jar;build/test/classes"
failonerror="true"
>
<arg value="${basedir}" />
<arg value="${fmpp.testcase}" />
</java>
</target>
<target name="clean" description="Delete all output files">
<delete dir="build" />
<delete includeEmptyDirs="yes">
<fileset dir="src/docs/examples" includes="*/out/" />
<fileset dir="src/docs/examples" includes="*/fmpp.log" />
<fileset dir="src/docs/examples" includes="*/log.fmpp" />
<fileset dir="src/test/resources/tests" includes="*/out/" />
<fileset dir="src/test/resources/tests" includes="*/fmpp.log" />
<fileset dir="src/test/resources/tests" includes="*/log.fmpp" />
<!-- Ant doesn't allow it: <fileset dir="lib" includes="fmpp.jar"/> -->
</delete>
</target>
<target name="maven-pom">
<fail unless="dependency.freemarker.version">dependency.freemarker.version wasn't set; check build.properties</fail>
<fail unless="dependency.bsh.version">dependency.bsh.version wasn't set; check build.properties</fail>
<fail unless="dependency.xmlResolver.version">dependency.xmlResolver.version wasn't set; check build.properties</fail>
<fail unless="dependency.imageinfo.version">dependency.imageinfo.version wasn't set; check build.properties</fail>
<echo file="build/pom.xml"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>9</version>
</parent>
<groupId>net.sourceforge.fmpp</groupId>
<artifactId>fmpp</artifactId>
<version>${mavenVersion}</version>
<packaging>jar</packaging>
<name>FMPP</name>
<description>General-purpose text file preprocessor tool that uses FreeMarker templates.</description>
<url>http://fmpp.sourceforge.net</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://fmpp.sourceforge.net/license.html</url>
</license>
</licenses>
<scm>
<connection>scm:git:[email protected]:freemarker/fmpp.git</connection>
<developerConnection>scm:git:[email protected]:freemarker/fmpp.git</developerConnection>
<url>[email protected]:freemarker/fmpp.git</url>
</scm>
<dependencies>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>${dependency.freemarker.version}</version>
</dependency>
<dependency>
<groupId>org.beanshell</groupId>
<artifactId>bsh</artifactId>
<version>${dependency.bsh.version}</version>
</dependency>
<dependency>
<groupId>xml-resolver</groupId>
<artifactId>xml-resolver</artifactId>
<version>${dependency.xmlResolver.version}</version>
</dependency>
<dependency>
<groupId>org.devlib.schmidt</groupId>
<artifactId>imageinfo</artifactId>
<version>${dependency.imageinfo.version}</version>
</dependency>
</dependencies>
</project>
]]></echo>
</target>
<target name="maven-dist" depends="maven-pom" description="Releases the already built distro to a Maven repository">
<jar destfile="build/maven-source-attachment.jar">
<fileset dir="${dist.dir}/src/main/java" />
<fileset dir="${dist.dir}/src/main/resources" />
</jar>
<jar destfile="build/maven-javadoc-attachment.jar">
<fileset dir="${dist.dir}/docs/api" />
</jar>
<property name="maven-server-id" value="ossrh" />
<property name="maven-repository-url" value="https://oss.sonatype.org/service/local/staging/deploy/maven2/" />
<!--
Don't deploy to public snapshot repositories here!
It isn't backward compatible as version ranges will pick them up.
-->
<input validargs="y,n" addproperty="mavenUpload.answer">
You are about uploading
${dist.dir}/lib/fmpp.jar
and its attachments to this Maven repository:
${maven-repository-url}
with Maven artifact version number ${mavenVersion}.
Note that it's assumed that you have run `ant dist` just before this.
Proceed? </input>
<condition property="mavenUpload.yes">
<equals arg1="y" arg2="${mavenUpload.answer}" />
</condition>
<fail unless="mavenUpload.yes" message="Task aborted by user." />
<!-- Sign and deploy the main artifact -->
<exec executable="${mvnCommand}">
<arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file" />
<arg value="-Durl=${maven-repository-url}" />
<arg value="-DrepositoryId=${maven-server-id}" />
<arg value="-DpomFile=build/pom.xml" />
<arg value="-Dfile=${dist.dir}/lib/fmpp.jar" />
<arg value="-Pgpg" />
</exec>
<!-- Sign and deploy the sources artifact -->
<exec executable="${mvnCommand}">
<arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file" />
<arg value="-Durl=${maven-repository-url}" />
<arg value="-DrepositoryId=${maven-server-id}" />
<arg value="-DpomFile=build/pom.xml" />
<arg value="-Dfile=build/maven-source-attachment.jar" />
<arg value="-Dclassifier=sources" />
<arg value="-Pgpg" />
</exec>
<!-- Sign and deploy the javadoc artifact -->
<exec executable="${mvnCommand}">
<arg value="org.apache.maven.plugins:maven-gpg-plugin:1.3:sign-and-deploy-file" />
<arg value="-Durl=${maven-repository-url}" />
<arg value="-DrepositoryId=${maven-server-id}" />
<arg value="-DpomFile=build/pom.xml" />
<arg value="-Dfile=build/maven-javadoc-attachment.jar" />
<arg value="-Dclassifier=javadoc" />
<arg value="-Pgpg" />
</exec>
<echo>*****************************************************************</echo>
<echo>Check the above lines for any Maven errors!</echo>
<echo>Now you have to release the staged repo on</echo>
<echo>https://oss.sonatype.org/.</echo>
<echo>*****************************************************************</echo>
</target>
<target name="install" description="Copy the required jar-s into the Ant lib directory.">
<fail unless="env.ANT_HOME"
message="Environment variable ANT_HOME is not set, so I don't know where to copy the .jar-s."
/>
<input validargs="y,n" addproperty="_install_answer"><!--
-->This will copy the .jar files required for FMPP ${version} from the <!--
-->${basedir}/lib directory into the ${env.ANT_HOME}/lib directory. <!--
-->Note that if the same java packages <!--
-->are already installed, but with different jar file names as in the FMPP lib <!--
-->directory (like freemarker-2.3.21.jar instead of freemarker.jar), then it's <!--
-->indeterminable if the newly installed or old classes will be visible, <!--
-->so you must delete the old .jar-s manually. Do you want to continue? <!--
--></input>
<condition property="_install_abort">
<equals arg1="n" arg2="${_install_answer}" />
</condition>
<fail if="_install_abort">Installation aborted by user.</fail>
<antcall target="_install_jar_doit">
<param name="jarName" value="fmpp.jar" />
<param name="_install_reallyDoIt" value="true" />
</antcall>
<antcall target="_install_jar">
<param name="jarName" value="freemarker.jar" />
</antcall>
<antcall target="_install_jar">
<param name="jarName" value="bsh.jar" />
</antcall>
<antcall target="_install_jar">
<param name="jarName" value="resolver.jar" />
</antcall>
<antcall target="_install_jar">
<param name="jarName" value="imageinfo.jar" />
</antcall>
</target>
<target name="_install_jar">
<available file="${env.ANT_HOME}/lib/${jarName}" property="_install_theJarIsAlreadyThere" />
<antcall target="_install_jar_firstinstall" />
<antcall target="_install_jar_overwrite" />
</target>
<target name="_install_jar_overwrite" if="_install_theJarIsAlreadyThere">
<input validargs="y,n" addproperty="_install_jar_overwrite_answer">
<!--
-->${jarName} already exists in the Ant lib directory. <!--
-->Do you want to overwrite it with the version in the FMPP lib directory? <!--
-->
</input>
<condition property="_install_reallyDoIt">
<equals arg1="y" arg2="${_install_jar_overwrite_answer}" />
</condition>
<antcall target="_install_jar_doit" />
<antcall target="_install_jar_dontdoit" />
</target>
<target name="_install_jar_firstinstall" unless="_install_theJarIsAlreadyThere">
<antcall target="_install_jar_doit">
<param name="_install_reallyDoIt" value="true" />
</antcall>
</target>
<target name="_install_jar_doit" if="_install_reallyDoIt">
<echo>*************************************************************</echo>
<echo> Copying ${jarName} into the Ant lib directory...</echo>
<echo>*************************************************************</echo>
<copy file="lib/${jarName}" todir="${env.ANT_HOME}/lib" overwrite="yes" />
</target>
<target name="_install_jar_dontdoit" unless="_install_reallyDoIt">
<echo>*************************************************************</echo>
<echo> You have skipped the copying of ${jarName}.</echo>
<echo>*************************************************************</echo>
</target>
</project>