2
<!-- Copyright 2002-2005 Elliotte Rusty Harold
4
This library is free software; you can redistribute
5
it and/or modify it under the terms of version 2.1 of
6
the GNU Lesser General Public License as published by
7
the Free Software Foundation.
9
This library is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU Lesser General Public License for more details.
14
You should have received a copy of the GNU Lesser General
15
Public License along with this library; if not, write to the
16
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
17
Boston, MA 02111-1307 USA
19
You can contact Elliotte Rusty Harold by sending e-mail to
20
elharo@metalab.unc.edu. Please include the word "XOM" in the
21
subject line. The XOM home page is http://www.xom.nu/
23
<project name="XOM" default="help" basedir=".">
29
<!-- set global properties for this build -->
32
<property name="Name" value="XOM"/>
33
<property name="name" value="xom"/>
34
<property name="version" value="1.1"/>
35
<property name="year" value="2005"/>
37
<echo message="----------- ${Name} ${version} ------------"/>
39
<property name="debug" value="on"/>
40
<property name="optimize" value="off"/>
41
<property name="deprecation" value="off"/>
43
<property name="src.dir" value="./src"/>
44
<property name="fat.src" value="./fatsrc"/>
45
<property name="src15.dir" value="./src15"/>
46
<property name="lib.dir" value="./lib"/>
47
<property name="lib2.dir" value="./lib2"/>
48
<property name="packages" value="nu.xom.*"/>
50
<property name="build.dir" value="./build"/>
51
<property name="build15.dir" value="./classes15"/>
52
<property name="build.src" value="./build/src"/>
53
<property name="build.dest" value="./build/classes"/>
54
<property name="build.javadocs" value="./build/apidocs"/>
55
<property name="testoutput.dir" value="./testresults"/>
56
<property name="dist.dir" value="./dist"/>
57
<property name="clover.dir" value="./clover"/>
58
<property name="testreports.dir" value="./testreports" />
59
<property name="jaxen.dir" value="${build.dir}/jaxen-classes"/>
61
<property name="xml-apis.jar" value="${lib.dir}/xml-apis.jar"/>
62
<property name="parser.jar" value="${lib.dir}/xercesImpl.jar"/>
63
<property name="xslt.jar" value="${lib.dir}/xalan.jar"/>
64
<property name="serializer.jar" value="${lib.dir}/serializer.jar"/>
65
<property name="tagsoup.jar" value="${lib2.dir}/tagsoup-1.0rc3.jar"/>
66
<property name="junit.jar" value="${lib.dir}/junit.jar"/>
67
<property name="xom.jar" value="${build.dir}/${name}-${version}.jar"/>
68
<property name="xom-core" value="${build.dest}"/>
70
<property name="saxon6.jar" value="${lib2.dir}/saxon.jar"/>
71
<property name="saxon7.jar" value="${lib2.dir}/saxon-aelfred.jar"/>
72
<property name="gnujaxp.jar" value="${lib2.dir}/gnujaxp.jar"/>
73
<property name="resolver.jar" value="${lib2.dir}/resolver.jar"/>
74
<property name="dom4j.jar" value="${lib2.dir}/dom4j-1.5.1.jar"/>
76
<property name="excludes" value=".clover, .DS_Store, **/.DS_Store, **/*.zip, **/.thumbnails/**, clover_html/**, clover/**, xom.gif, data/XInclude-Test-Suite/**, data/xmlconf/**, data/canonical/xmlconf/**, data/oasis*/**, **/testresults/**, **/pantry/**, **/workspace/**, **/junit*properties, **/.nautilus-metafile.xml, website/**, **/.project, **/.classpath, build/**, dist/**, .settings/**, lib2/**, xom.fb, jester*, trademark*"/>
78
<property name="test.outputFormat" value="xml"/>
80
<!-- only needed for servlet samples -->
81
<property name="servlet.jar" value="${lib2.dir}/servlet.jar"/>
82
<condition property="servlet.jar.installed">
84
<available classname="javax.servlet.ServletException" classpath="${servlet.jar}" />
85
<available classname="javax.servlet.SingleThreadModel" classpath="${servlet.jar}" />
86
<available classname="javax.servlet.http.HttpServletRequest" classpath="${servlet.jar}" />
87
<available classname="javax.servlet.http.HttpServletResponse" classpath="${servlet.jar}"/>
88
<available classname="javax.servlet.http.HttpServlet" classpath="${servlet.jar}" />
92
<path id="compile.class.path">
93
<pathelement location="${xml-apis.jar}"/>
94
<pathelement location="${parser.jar}"/>
95
<pathelement location="${junit.jar}"/>
96
<pathelement location="${jaxen.dir}"/>
97
<pathelement location="${servlet.jar}"/>
100
<path id="run.class.path">
101
<pathelement location="${xml-apis.jar}"/>
102
<pathelement location="${parser.jar}"/>
103
<pathelement location="${xom-core}"/>
104
<pathelement location="${jaxen.dir}"/>
105
<pathelement location="${xslt.jar}"/>
106
<pathelement location="${serializer.jar}"/>
109
<path id="test.class.path">
110
<path refid="run.class.path"/>
111
<pathelement location="${junit.jar}"/>
112
<pathelement location="${saxon6.jar}"/>
113
<pathelement location="${saxon7.jar}"/>
114
<pathelement location="${gnujaxp.jar}"/>
115
<pathelement location="${resolver.jar}"/>
116
<pathelement location="${dom4j.jar}"/>
119
<path id="doc.class.path">
120
<path refid="test.class.path"/>
121
<pathelement location="${build.dest}"/>
122
<pathelement location="${tagsoup.jar}"/>
125
<!-- set these properties for debugging -->
126
<property name="compile.classpath" refid="compile.class.path"/>
127
<property name="test.classpath" refid="test.class.path"/>
128
<property name="run.classpath" refid="run.class.path"/>
129
<property name="doc.classpath" refid="doc.class.path"/>
132
<available property="tagsoup.installed" classname="org.ccil.cowan.tagsoup.Parser">
134
<pathelement location="${tagsoup.jar}" />
138
<available property="clover.installed"
139
file="clover.jar" filepath="${ant-home}/lib/clover.jar" />
146
-------------------------------------------------------------
148
available targets are:
150
help --> print this message
151
jar --> build the xom.jar file
152
samples --> build the xom-samples.jar file
153
compile --> compile the source code
154
compile15 --> compile the classes that depend on Java 1.5
155
javadoc --> generate the API documentation
156
betterdoc --> better formatted API documentation (requires Ant 1.6)
157
test --> run JUnit test suite
158
testui --> run Junit test suite in GUI
159
clean --> clean up the build directory
160
dist --> the zip and .tar.gz files
162
Use the option -Dfat=true to make Text objects bigger but faster.
164
-------------------------------------------------------------
168
<target name="prepare" depends="init, prepare-dirs, prepare-fat" />
170
<target name="prepare-dirs" depends="init">
171
<mkdir dir="${dist.dir}"/>
172
<mkdir dir="${testoutput.dir}"/>
173
<mkdir dir="${build.dir}"/>
174
<mkdir dir="${build.dir}/jaxen"/>
175
<mkdir dir="${build.dir}/jaxen-classes"/>
176
<mkdir dir="${build15.dir}"/>
177
<mkdir dir="${build.src}"/>
178
<mkdir dir="${build.dest}"/>
180
<delete file="${build.src}/nu/xom/Text.java" failonerror="false"/>
182
<copy todir="${build.src}">
183
<fileset dir="${src.dir}"/>
188
<!-- use Text.java that stores contents in String -->
189
<target name="prepare-fat" depends="init" if="fat">
190
<copy todir="${build.src}" overwrite="true">
191
<fileset dir="${fat.src}"/>
196
<target name="compile-core" depends="prepare, compile-jaxen"
197
description="Compile the source code">
198
<javac srcdir="${build.src}"
199
destdir="${build.dest}"
201
optimize="${optimize}"
202
deprecation="${deprecation}"
206
excludes="nu/xom/pantry/* nu/xom/tools/* nu/xom/samples/*Servlet.java">
207
<classpath refid="compile.class.path"/>
209
<copy file="${build.src}/nu/xom/characters.dat" tofile="${build.dest}/nu/xom/characters.dat"/>
211
<copy file="${build.src}/nu/xom/compositions.dat" tofile="${build.dest}/nu/xom/compositions.dat" />
213
<!-- This file requires Java 1.5 to generate so we compile it with a
214
different target and copy it over here. -->
215
<copy file="classes15/nu/xom/JDK15XML1_0Parser.class" tofile="${build.dest}/nu/xom/JDK15XML1_0Parser.class"/>
219
<target name="compile" depends="compile-core, compile-servlets"
220
description="Compile the source code" />
222
<target name="compile-servlets" depends="compile-core" if="servlet.jar.installed"
223
description="Compile the source code including the servlet samples">
224
<javac srcdir="${build.src}"
226
destdir="${build.dest}"
228
optimize="${optimize}"
229
deprecation="${deprecation}"
233
<classpath refid="compile.class.path"/>
234
<include name="nu/xom/samples/*Servlet.java" />
239
<!-- This task requires Java 1.5 to complete successfully -->
240
<target name="compile15" depends="prepare" description="Compile the JDK15XML1_0Parser" >
241
<javac srcdir="${src15.dir}"
242
destdir="${build15.dir}"
244
optimize="${optimize}"
245
deprecation="${deprecation}"
250
<classpath refid="compile.class.path"/>
254
<target name="minimal" depends="compile" description="Create xom-minimal.jar">
255
<jar jarfile="${build.dir}/${name}-${version}-minimal.jar"
256
basedir="${build.dest}"
259
includes="nu/xom/* nu/xom/xslt/* nu/xom/xinclude/* nu/xom/converters/* nu/xom/canonical/* nu/xom/tests/XOMTestCase.class"
260
excludes="nu/xom/samples/* nu/xom/benchmarks/* nu/xom/pantry/* nu/xom/tools/*">
262
<attribute name="Sealed" value="true"/>
263
<attribute name="Built-By" value="${user.name}"/>
264
<attribute name="Specification-Title" value="XOM"/>
265
<attribute name="Specification-Version" value="${version}"/>
266
<attribute name="Specification-Vendor" value="Elliotte Rusty Harold"/>
267
<attribute name="Implementation-Title" value="XOM"/>
268
<attribute name="Implementation-Version" value="${version}"/>
269
<attribute name="Implementation-Vendor" value="Elliotte Rusty Harold"/>
270
<attribute name="Main-Class" value="nu.xom.Info"/>
271
<section name="nu/xom/">
272
<attribute name="Specification-Title" value="XOM core classes"/>
273
<attribute name="Implementation-Title" value="nu.xom"/>
275
<section name="nu/xom/xslt/">
276
<attribute name="Specification-Title" value="XOM XSLT interface"/>
277
<attribute name="Implementation-Title" value="nu.xom.xslt"/>
279
<section name="nu/xom/xinclude/">
280
<attribute name="Specification-Title" value="XOM XInclude engine"/>
281
<attribute name="Implementation-Title" value="nu.xom.xinclude"/>
283
<section name="nu/xom/converters/">
284
<attribute name="Specification-Title" value="XOM converters to other object models"/>
285
<attribute name="Implementation-Title" value="nu.xom.converters"/>
287
<section name="nu/xom/canonical/">
288
<attribute name="Specification-Title" value="XOM Canonical XML support"/>
289
<attribute name="Implementation-Title" value="nu.xom.canonical"/>
296
<target name="jar" depends="compile" description="Create xom.jar">
297
<jar jarfile="${build.dir}/${name}-${version}.jar"
298
basedir="${build.dest}"
301
includes="nu/xom/* nu/xom/xslt/* nu/xom/xinclude/* nu/xom/converters/* nu/xom/canonical/* nu/xom/tests/XOMTestCase.class"
302
excludes="nu/xom/samples/* nu/xom/benchmarks/* nu/xom/pantry/* nu/xom/tools/*">
304
<fileset dir="${jaxen.dir}"
305
excludes="**Demo.class **/package.html org/jaxen/xom/** org/jaxen/XPathTestBase.class org/jaxen/jdom/** org/jaxen/dom4j/** org/jaxen/javabean/** org/jaxen/dom/** org/jaxen/**Test.class org/jaxen/saxpath/base/**Test.class org/jaxen/saxpath/helpers/**Test.class org/jaxen/saxpath/helpers/**Test.class org/jaxen/pattern/** org/jaxen/saxpath/SAXPathParseException.class org/jaxen/pattern/PriorityTest.class">
309
<attribute name="Built-By" value="${user.name}"/>
310
<attribute name="Specification-Title" value="XOM"/>
311
<attribute name="Specification-Version" value="${version}"/>
312
<attribute name="Specification-Vendor" value="Elliotte Rusty Harold"/>
313
<attribute name="Implementation-Title" value="XOM"/>
314
<attribute name="Implementation-Version" value="${version}"/>
315
<attribute name="Implementation-Vendor" value="Elliotte Rusty Harold"/>
316
<attribute name="Main-Class" value="nu.xom.Info"/>
317
<section name="nu/xom/">
318
<attribute name="Sealed" value="true"/>
319
<attribute name="Specification-Title" value="XOM core classes"/>
320
<attribute name="Implementation-Title" value="nu.xom"/>
321
<attribute name="Implementation-Version" value="${version}"/>
322
<attribute name="Implementation-Vendor" value="Elliotte Rusty Harold"/>
324
<section name="org/jaxen/">
325
<attribute name="Specification-Title" value="Jaxen XPath engine"/>
326
<attribute name="Implementation-Title" value="org.jaxen"/>
327
<attribute name="Implementation-Version" value="1.1d4"/>
328
<attribute name="Implementation-Vendor" value="CodeHaus"/>
330
<section name="nu/xom/xslt/">
331
<attribute name="Sealed" value="true"/>
332
<attribute name="Specification-Title" value="XOM XSLT interface"/>
333
<attribute name="Implementation-Title" value="nu.xom.xslt"/>
335
<section name="nu/xom/xinclude/">
336
<attribute name="Sealed" value="true"/>
337
<attribute name="Specification-Title" value="XOM XInclude engine"/>
338
<attribute name="Implementation-Title" value="nu.xom.xinclude"/>
340
<section name="nu/xom/converters/">
341
<attribute name="Sealed" value="true"/>
342
<attribute name="Specification-Title" value="XOM converters to other object models"/>
343
<attribute name="Implementation-Title" value="nu.xom.converters"/>
345
<section name="nu/xom/canonical/">
346
<attribute name="Sealed" value="true"/>
347
<attribute name="Specification-Title" value="XOM Canonical XML support"/>
348
<attribute name="Implementation-Title" value="nu.xom.canonical"/>
355
<target name="samples" depends="compile" description="Create xom-samples.jar">
356
<jar jarfile="${build.dir}/${name}-samples.jar"
357
basedir="${build.dest}"
360
includes="nu/xom/samples/* nu/xom/benchmarks/*"
361
excludes="nu/xom/xslt/* nu/xom/xinclude/* nu/xom/tools/* nu/xom/converters/* nu/xom/canonical/* nu/xom/pantry/*">
363
<attribute name="Built-By" value="${user.name}"/>
364
<attribute name="Specification-Title" value="XOM Samples"/>
365
<attribute name="Specification-Version" value="${version}"/>
366
<attribute name="Specification-Vendor" value="Elliotte Rusty Harold"/>
367
<attribute name="Implementation-Title" value="XOM Samples"/>
368
<attribute name="Implementation-Version" value="${version}"/>
369
<attribute name="Implementation-Vendor" value="Elliotte Rusty Harold"/>
370
<!-- I can't get this to work yet
371
<attribute name="Main-Class" value="nu.xom.samples.XMLPrinter"/>
372
<attribute name="Class-Path" value="${name}-${version}.jar"/> -->
378
<target name="javadoc" depends="prepare"
379
description="Generate the API documentation">
381
<mkdir dir="${build.javadocs}"/>
383
<javadoc packagenames="nu.xom.xslt, nu.xom.canonical, nu.xom.xinclude, nu.xom, nu.xom.converters"
384
sourcepath="${build.src}"
385
destdir="${build.javadocs}"
388
overview="overview.html"
392
windowtitle="${Name} ${version} API"
395
link="http://www.junit.org/junit/javadoc/3.8.1"
396
doctitle="${Name} ${version}"
397
bottom="Copyright 2002-${year} <a href='http://www.elharo.com/'>Elliotte Rusty Harold</a>
398
<br /> <a href='mailto:elharo%40metalab%2Eunc%2Eedu?Subject=XOM'>elharo@metalab.unc.edu</a>">
399
<classpath refid="test.class.path"/>
401
<fileset dir="${build.src}" defaultexcludes="yes">
402
<include name="nu/xom/tests/XOMTestCase.java" />
409
<!-- I can never remember the exact target name -->
410
<target name="javadocs" depends="javadoc" />
411
<target name="apidocs" depends="javadoc"/>
412
<target name="apidoc" depends="javadoc"/>
413
<target name="betterdocs" depends="betterdoc"/>
415
<target name="-checkForTagSoup" unless="tagsoup.installed">
417
Better documentation requires TagSoup to be installed
418
in the lib2 directory. You can download it from
419
http://mercury.ccil.org/~cowan/XML/tagsoup/
423
<target name="-checkForClover" unless="clover.installed">
425
The task you are trying to run requires Clover to be installed
426
in the $ANT_HOME/lib directory. You can purchase Clover from
427
http://www.cenqua.com/clover/
431
<!-- This task requires Ant 1.6 and TagSoup -->
432
<target name="betterdoc" depends="compile, -checkForTagSoup" if="tagsoup.installed"
433
description="Generate the API documentation">
434
<mkdir dir="${build.javadocs}"/>
435
<javadoc packagenames="nu.xom.xslt, nu.xom.canonical, nu.xom.xinclude, nu.xom, nu.xom.converters"
436
sourcepath="${build.src}"
437
destdir="${build.javadocs}"
440
overview="overview.html"
444
windowtitle="${Name} ${version} API"
447
noqualifier="java.lang:java.io"
448
link="http://www.junit.org/junit/javadoc/3.8.1"
449
doctitle="${Name} ${version}"
450
bottom="Copyright 2002-${year} <a href='http://www.elharo.com/'>Elliotte Rusty Harold</a>
451
<br/> <a href='mailto:elharo@metalab.unc.edu?Subject=XOM'>elharo@metalab.unc.edu</a>">
452
<classpath refid="test.class.path"/>
454
<fileset dir="${build.src}" defaultexcludes="yes">
455
<include name="nu/xom/tests/XOMTestCase.java" />
459
<javac srcdir="${build.src}"
460
destdir="${build.dest}"
462
optimize="${optimize}"
463
deprecation="${deprecation}"
467
includes="nu/xom/tools/*">
469
<pathelement path="${compile.class.path}"/>
470
<pathelement path="${tagsoup.jar}"/>
474
<java classname="nu.xom.tools.XHTMLJavaDoc" fork="yes">
475
<jvmarg value="-Xbootclasspath/p:lib/xercesImpl.jar:lib/xml-apis.jar:lib/xalan.jar"/>
476
<classpath refid="doc.class.path" />
477
<arg value="build/apidocs"/>
482
<target name="dist" depends="zip, tar.gz, maven" />
484
<target name="zip" depends="jar, betterdoc, samples"
485
description="Build zip file for distro">
487
<zip destfile="${dist.dir}/${name}-${version}-src.zip">
488
<zipfileset prefix="XOM" dir="." excludes="${excludes}"/>
491
<zip destfile="${dist.dir}/${name}-${version}.zip">
492
<zipfileset prefix="XOM" dir="." excludes="${excludes}"/>
493
<zipfileset prefix="XOM/apidocs" dir="./${build.dir}/apidocs"
494
excludes="**/.thumbnails/**, **/.nautilus-metafile.xml, website/**, **/.project, **/.classpath, **/.DS_Store"/>
495
<zipfileset fullpath="XOM/${name}-${version}.jar" dir="./${build.dir}" includes="${name}-${version}.jar"/>
496
<zipfileset fullpath="XOM/${name}-samples.jar" dir="./${build.dir}" includes="${name}-samples.jar"/>
502
<target name="tar" depends="jar, betterdoc, samples"
503
description="Build tar file for distro">
505
<tar destfile="${dist.dir}/${name}-${version}-src.tar">
506
<tarfileset prefix="XOM" dir="."
507
excludes="${excludes}"/>
510
<tar destfile="${dist.dir}/${name}-${version}.tar">
511
<tarfileset prefix="XOM" dir="."
512
excludes="${excludes}"/>
513
<tarfileset prefix="XOM/apidocs" dir="./${build.dir}/apidocs"
514
excludes="**/.thumbnails/**, **/.nautilus-metafile.xml, website/**, **/.project, **/.classpath, **/.DS_Store"/>
515
<tarfileset fullpath="XOM/${name}-${version}.jar" dir="./${build.dir}" includes="${name}-${version}.jar"/>
516
<tarfileset fullpath="XOM/${name}-samples.jar" dir="./${build.dir}" includes="${name}-samples.jar"/>
522
<target name="tar.gz" depends="tar" description="Build tar.gz file for distro">
523
<gzip src="${dist.dir}/${name}-${version}.tar" zipfile="${dist.dir}/${name}-${version}.tar.gz"/>
524
<gzip src="${dist.dir}/${name}-${version}-src.tar" zipfile="${dist.dir}/${name}-${version}-src.tar.gz"/>
528
<!-- This task requires the ANT optional.jar -->
529
<target name="test" depends="compile" description="Run JUnit tests using command line user interface">
531
<junit printsummary="off" fork="yes">
532
<classpath refid="test.class.path" />
533
<formatter type="${test.outputFormat}" />
534
<batchtest fork="yes" todir="${testoutput.dir}">
535
<fileset dir="${build.src}">
536
<include name="**/*Test.java" />
537
<exclude name="**/pantry/*" />
538
<exclude name="**/MegaTest.java" />
539
<exclude name="**/benchmarks/*.java" />
540
<exclude name="**/EBCDICTest.java" />
545
<junitreport todir="${testoutput.dir}">
546
<fileset dir="${testoutput.dir}">
547
<include name="TEST-*.xml" />
549
<report todir="${testoutput.dir}" />
555
<target name="testjar" depends="jar" description="Run JUnit tests using jar file">
556
<junit printsummary="on" fork="no">
558
<pathelement location="${xom.jar}"/>
560
<classpath refid="run.class.path" />
561
<formatter type="${test.outputFormat}" />
562
<batchtest fork="yes" todir="${testoutput.dir}">
563
<fileset dir="${build.src}">
564
<include name="**/*Test.java" />
565
<exclude name="**/pantry/*" />
566
<exclude name="**/MegaTest.java" />
567
<exclude name="**/benchmarks/*.java" />
568
<exclude name="**/EBCDICTest.java" />
575
<target name="testui" depends="compile" description="Run JUnit tests using GUI interface">
576
<java classname="junit.swingui.TestRunner" fork="yes" maxmemory="99m">
577
<sysproperty key="org.xml.sax.driver" value="org.apache.xerces.parsers.SAXParser"/>
578
<classpath refid="test.class.path" />
579
<arg value="nu.xom.tests.XOMTests"/>
584
<target name="clean" depends="init" description="Remove build files">
585
<delete dir="${build.dir}"/>
586
<delete dir="${testoutput.dir}"/>
587
<delete dir=".clover"/>
588
<delete dir="clover"/>
589
<delete dir="clover_html"/>
591
<fileset dir="." includes="junit*properties"/>
596
<!-- These tasks require Clover -->
597
<taskdef resource="clovertasks"/>
599
<target name="with.clover" depends="init, -checkForClover">
600
<mkdir dir="${clover.dir}"/>
601
<clover-setup initString="${clover.dir}/xom_coverage.db">
603
<include name="nu/xom/**"/> <!-- work around Ant 1.6.3 bug #34722 -->
604
<exclude name="nu/xom/UnicodeUtil.java"/>
605
<exclude name="nu/xom/Latin6Writer.java"/>
606
<exclude name="nu/xom/Latin8Writer.java"/>
607
<exclude name="nu/xom/Latin10Writer.java"/>
608
<exclude name="nu/xom/tests/FastTests.java"/>
609
<exclude name="nu/xom/tests/XOMTests.java"/>
610
<exclude name="nu/xom/samples/**"/>
611
<exclude name="nu/xom/pantry/**"/>
612
<exclude name="nu/xom/benchmarks/**"/>
613
<exclude name="nu/xom/tools/**" />
619
<property name="ant-home" value="/opt/ant"/>
621
<target name="clover.html" depends="with.clover">
623
<current outfile="clover_html" title="Clover results for ${Name} ${version}">
624
<format type="html"/>
630
<!-- This task requires the ANT optional.jar. clover.jar, and junit.jar to be installed in ANT_HOME/lib -->
631
<target name="clovertest" depends="compile, -checkForClover" description="Run JUnit tests with clover.jar in classpath">
632
<junit printsummary="on" fork="no">
633
<classpath refid="test.class.path" />
635
<pathelement path="${ant-home}/lib/clover.jar"/>
637
<formatter type="${test.outputFormat}" />
638
<batchtest fork="yes" todir="${testoutput.dir}">
639
<fileset dir="${build.src}">
640
<include name="**/*Test.java" />
641
<exclude name="**/pantry/*.java" />
642
<exclude name="**/MegaTest.java" />
643
<exclude name="**/benchmarks/*.java" />
644
<exclude name="**/tools/*.java" />
645
<exclude name="**/EBCDICTest.java" />
646
<exclude name="nu/xom/tests/FastTests.java"/>
647
<exclude name="nu/xom/tests/XOMTests.java"/>
653
<!-- This task requires the ANT optional.jar. clover.jar, and junit.jar to be installed in ANT_HOME/lib -->
654
<target name="fastclover" depends="compile, -checkForClover" description="Run JUnit tests with clover.jar in classpath">
655
<junit printsummary="on" fork="no">
656
<classpath refid="test.class.path" />
658
<pathelement path="${ant-home}/lib/clover.jar"/>
660
<formatter type="${test.outputFormat}" />
661
<batchtest fork="yes" todir="${testoutput.dir}">
662
<fileset dir="${build.src}">
663
<include name="**/*Test.java" />
664
<exclude name="**/pantry/*.java" />
665
<exclude name="**/EncodingTest.java" />
666
<exclude name="**/XIncludeTest.java" />
667
<exclude name="**/MegaTest.java" />
668
<exclude name="**/benchmarks/*.java" />
669
<exclude name="**/tools/*.java" />
670
<exclude name="**/EBCDICTest.java" />
671
<exclude name="nu/xom/tests/FastTests.java"/>
672
<exclude name="nu/xom/tests/XOMTests.java"/>
678
<!-- Generate a Maven JAR for uploading to the maven
679
bug repository and hence placement onto ibiblio and mirrors.
680
See http://maven.apache.org/repository-upload.html -->
681
<target name="maven" depends="jar" >
682
<property name="pom.template" location="project.xml" />
683
<property name="pom.file" location="${build.dir}/project.xml" />
684
<property name="package.jar"
685
location="${build.dir}/${name}-${version}.jar"/>
686
<property name="license" location="LICENSE.txt" />
687
<property name="xom-maven.jar"
688
location="${dist.dir}/xom-maven-${version}.jar" />
689
<copy file="${pom.template}" tofile="${pom.file}">
691
<filter token="VERSION" value="${version}"/>
694
<jar destFile="${xom-maven.jar}">
695
<fileset file="${pom.file}" />
696
<fileset file="${license}" />
697
<fileset file="${package.jar}" />
701
<target name="compile-jaxen" description="Compile Jaxen" depends="get-jaxen">
702
<javac srcdir="${build.dir}/jaxen/src/java/main"
703
destdir="${build.dir}/jaxen-classes"
705
optimize="${optimize}"
706
deprecation="${deprecation}"
710
includeAntRuntime="no"
711
excludes="org/jaxen/dom/**
715
org/jaxen/javabean/**
717
org/jaxen/function/xslt/**
718
org/jaxen/function/ext/**
719
org/jaxen/saxpath/expr/DefaultPredicated.java
720
org/jaxen/saxpath/helpers/DefaultXPathHandler.java
721
org/jaxen/util/StackedIterator.java
722
org/jaxen/util/XPath2XMLVisitor.java
723
org/jaxen/util/LinkedIterator.java
724
org/jaxen/util/SelfAxisIterator.java
726
<classpath refid="compile.class.path"/>
730
<target name="get-jaxen" description="Download Jaxen source code" depends="prepare">
731
<cvs cvsRoot=":pserver:anonymous@cvs.jaxen.codehaus.org:/home/projects/jaxen/scm"
737
<target name="debug" depends="init" description="Print various Ant properties">
739
<java classname="org.apache.xalan.Version" fork="yes">
740
<classpath refid="test.class.path" />