2
<!-- Copyright 2002-2007, 2009 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.2.1"/>
35
<property name="year" value="2009"/>
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" />
60
<property name="xml-apis.jar" value="${lib.dir}/xml-apis.jar"/>
61
<property name="parser.jar" value="${lib.dir}/dtd-xercesImpl.jar"/>
62
<property name="xslt.jar" value="${lib.dir}/xalan.jar"/>
63
<property name="serializer.jar" value="${lib.dir}/serializer.jar"/>
64
<property name="tagsoup.jar" value="${lib2.dir}/tagsoup-1.2.jar"/>
65
<property name="junit.jar" value="${lib.dir}/junit.jar"/>
66
<property name="xom.jar" value="${build.dir}/${name}-${version}.jar"/>
67
<property name="xom-core" value="${build.dest}"/>
69
<property name="saxon6.jar" value="${lib2.dir}/saxon.jar"/>
70
<property name="saxon7.jar" value="${lib2.dir}/saxon-aelfred.jar"/>
71
<property name="gnujaxp.jar" value="${lib2.dir}/gnujaxp.jar"/>
72
<property name="resolver.jar" value="${lib2.dir}/resolver.jar"/>
73
<property name="dom4j.jar" value="${lib2.dir}/dom4j-1.5.1.jar"/>
75
<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*"/>
77
<property name="test.outputFormat" value="xml"/>
79
<!-- only needed for servlet samples -->
80
<property name="servlet.jar" value="${lib2.dir}/servlet.jar"/>
81
<condition property="servlet.jar.installed">
83
<available classname="javax.servlet.ServletException" classpath="${servlet.jar}" />
84
<available classname="javax.servlet.SingleThreadModel" classpath="${servlet.jar}" />
85
<available classname="javax.servlet.http.HttpServletRequest" classpath="${servlet.jar}" />
86
<available classname="javax.servlet.http.HttpServletResponse" classpath="${servlet.jar}"/>
87
<available classname="javax.servlet.http.HttpServlet" classpath="${servlet.jar}" />
91
<path id="compile.class.path">
92
<pathelement location="${xml-apis.jar}"/>
93
<pathelement location="${parser.jar}"/>
94
<pathelement location="${junit.jar}"/>
95
<pathelement location="${servlet.jar}"/>
98
<path id="run.class.path">
99
<pathelement location="${xml-apis.jar}"/>
100
<pathelement location="${parser.jar}"/>
101
<pathelement location="${xom-core}"/>
102
<pathelement location="${xslt.jar}"/>
103
<pathelement location="${serializer.jar}"/>
106
<path id="test.class.path">
107
<path refid="run.class.path"/>
108
<pathelement location="${junit.jar}"/>
109
<pathelement location="${saxon6.jar}"/>
110
<pathelement location="${saxon7.jar}"/>
111
<pathelement location="${gnujaxp.jar}"/>
112
<pathelement location="${resolver.jar}"/>
113
<pathelement location="${dom4j.jar}"/>
116
<path id="doc.class.path">
117
<path refid="test.class.path"/>
118
<pathelement location="${build.dest}"/>
119
<pathelement location="${tagsoup.jar}"/>
122
<!-- set these properties for debugging -->
123
<property name="compile.classpath" refid="compile.class.path"/>
124
<property name="test.classpath" refid="test.class.path"/>
125
<property name="run.classpath" refid="run.class.path"/>
126
<property name="doc.classpath" refid="doc.class.path"/>
129
<available property="tagsoup.installed" classname="org.ccil.cowan.tagsoup.Parser">
131
<pathelement location="${tagsoup.jar}" />
135
<available property="clover.installed"
136
file="clover.jar" filepath="${ant-home}/lib/clover.jar" />
143
-------------------------------------------------------------
145
available targets are:
147
help --> print this message
148
jar --> build the xom.jar file
149
samples --> build the xom-samples.jar file
150
compile --> compile the source code
151
compile15 --> compile the classes that depend on Java 1.5
152
javadoc --> generate the API documentation
153
betterdoc --> better formatted API documentation (requires Ant 1.6)
154
test --> run JUnit test suite
155
testui --> run Junit test suite in GUI
156
clean --> clean up the build directory
157
dist --> the zip and .tar.gz files
159
Use the option -Dfat=true to make Text objects bigger but faster.
161
-------------------------------------------------------------
165
<target name="prepare" depends="init, prepare-dirs, prepare-fat" />
167
<target name="prepare-dirs" depends="init">
168
<mkdir dir="${dist.dir}"/>
169
<mkdir dir="${testoutput.dir}"/>
170
<mkdir dir="${build.dir}"/>
171
<mkdir dir="${build15.dir}"/>
172
<mkdir dir="${build.src}"/>
173
<mkdir dir="${build.dest}"/>
175
<delete file="${build.src}/nu/xom/Text.java" failonerror="false"/>
177
<copy todir="${build.src}">
178
<fileset dir="${src.dir}"/>
183
<!-- use Text.java that stores contents in String -->
184
<target name="prepare-fat" depends="init" if="fat">
185
<copy todir="${build.src}" overwrite="true">
186
<fileset dir="${fat.src}"/>
191
<target name="compile-core" depends="prepare, compile15"
192
description="Compile the source code">
193
<javac srcdir="${build.src}"
194
destdir="${build.dest}"
196
optimize="${optimize}"
197
deprecation="${deprecation}"
202
excludes="nu/xom/pantry/* nu/xom/tools/* nu/xom/samples/*Servlet.java">
203
<classpath refid="compile.class.path"/>
205
<copy file="${build.src}/nu/xom/characters.dat" tofile="${build.dest}/nu/xom/characters.dat"/>
207
<copy file="${build.src}/nu/xom/compositions.dat" tofile="${build.dest}/nu/xom/compositions.dat" />
209
<!-- This file requires Java 1.5 to generate so we compile it with a
210
different target and copy it over here. -->
211
<copy file="classes15/nu/xom/JDK15XML1_0Parser.class" tofile="${build.dest}/nu/xom/JDK15XML1_0Parser.class"/>
215
<target name="compile" depends="compile-core, compile-servlets"
216
description="Compile the source code" />
218
<target name="compile-servlets" depends="compile-core" if="servlet.jar.installed"
219
description="Compile the source code including the servlet samples">
220
<javac srcdir="${build.src}"
222
destdir="${build.dest}"
224
optimize="${optimize}"
225
deprecation="${deprecation}"
229
<classpath refid="compile.class.path"/>
230
<include name="nu/xom/samples/*Servlet.java" />
235
<!-- This task requires Java 1.5 to complete successfully -->
236
<target name="compile15" depends="prepare" description="Compile the JDK15XML1_0Parser" >
237
<javac srcdir="${src15.dir}"
238
destdir="${build15.dir}"
240
optimize="${optimize}"
241
deprecation="${deprecation}"
246
<classpath refid="compile.class.path"/>
250
<target name="minimal" depends="compile" description="Create xom-minimal.jar">
251
<jar jarfile="${build.dir}/${name}-${version}-minimal.jar"
252
basedir="${build.dest}"
255
includes="nu/xom/* nu/xom/xslt/* nu/xom/xinclude/* nu/xom/converters/* nu/xom/canonical/* nu/xom/tests/XOMTestCase.class"
256
excludes="nu/xom/samples/* nu/xom/benchmarks/* nu/xom/pantry/* nu/xom/tools/*">
258
<attribute name="Sealed" value="true"/>
259
<attribute name="Built-By" value="${user.name}"/>
260
<attribute name="Specification-Title" value="XOM"/>
261
<attribute name="Specification-Version" value="${version}"/>
262
<attribute name="Specification-Vendor" value="Elliotte Rusty Harold"/>
263
<attribute name="Implementation-Title" value="XOM"/>
264
<attribute name="Implementation-Version" value="${version}"/>
265
<attribute name="Implementation-Vendor" value="Elliotte Rusty Harold"/>
266
<attribute name="Main-Class" value="nu.xom.Info"/>
267
<section name="nu/xom/">
268
<attribute name="Specification-Title" value="XOM core classes"/>
269
<attribute name="Implementation-Title" value="nu.xom"/>
271
<section name="nu/xom/xslt/">
272
<attribute name="Specification-Title" value="XOM XSLT interface"/>
273
<attribute name="Implementation-Title" value="nu.xom.xslt"/>
275
<section name="nu/xom/xinclude/">
276
<attribute name="Specification-Title" value="XOM XInclude engine"/>
277
<attribute name="Implementation-Title" value="nu.xom.xinclude"/>
279
<section name="nu/xom/converters/">
280
<attribute name="Specification-Title" value="XOM converters to other object models"/>
281
<attribute name="Implementation-Title" value="nu.xom.converters"/>
283
<section name="nu/xom/canonical/">
284
<attribute name="Specification-Title" value="XOM Canonical XML support"/>
285
<attribute name="Implementation-Title" value="nu.xom.canonical"/>
292
<target name="jar" depends="compile" description="Create xom.jar">
293
<jar jarfile="${build.dir}/${name}-${version}.jar"
294
basedir="${build.dest}"
297
includes="nu/xom/* nu/xom/xslt/* nu/xom/xinclude/* nu/xom/converters/* nu/xom/canonical/* nu/xom/tests/XOMTestCase.class"
298
excludes="nu/xom/samples/* nu/xom/benchmarks/* nu/xom/pantry/* nu/xom/tools/*">
301
<attribute name="Built-By" value="${user.name}"/>
302
<attribute name="Specification-Title" value="XOM"/>
303
<attribute name="Specification-Version" value="${version}"/>
304
<attribute name="Specification-Vendor" value="Elliotte Rusty Harold"/>
305
<attribute name="Implementation-Title" value="XOM"/>
306
<attribute name="Implementation-Version" value="${version}"/>
307
<attribute name="Implementation-Vendor" value="Elliotte Rusty Harold"/>
308
<attribute name="Main-Class" value="nu.xom.Info"/>
309
<section name="nu/xom/">
310
<attribute name="Sealed" value="true"/>
311
<attribute name="Specification-Title" value="XOM core classes"/>
312
<attribute name="Implementation-Title" value="nu.xom"/>
313
<attribute name="Implementation-Version" value="${version}"/>
314
<attribute name="Implementation-Vendor" value="Elliotte Rusty Harold"/>
316
<section name="nu/xom/xslt/">
317
<attribute name="Sealed" value="true"/>
318
<attribute name="Specification-Title" value="XOM XSLT interface"/>
319
<attribute name="Implementation-Title" value="nu.xom.xslt"/>
321
<section name="nu/xom/xinclude/">
322
<attribute name="Sealed" value="true"/>
323
<attribute name="Specification-Title" value="XOM XInclude engine"/>
324
<attribute name="Implementation-Title" value="nu.xom.xinclude"/>
326
<section name="nu/xom/converters/">
327
<attribute name="Sealed" value="true"/>
328
<attribute name="Specification-Title" value="XOM converters to other object models"/>
329
<attribute name="Implementation-Title" value="nu.xom.converters"/>
331
<section name="nu/xom/canonical/">
332
<attribute name="Sealed" value="true"/>
333
<attribute name="Specification-Title" value="XOM Canonical XML support"/>
334
<attribute name="Implementation-Title" value="nu.xom.canonical"/>
341
<target name="samples" depends="compile" description="Create xom-samples.jar">
342
<jar jarfile="${build.dir}/${name}-samples.jar"
343
basedir="${build.dest}"
346
includes="nu/xom/samples/* nu/xom/benchmarks/*"
347
excludes="nu/xom/xslt/* nu/xom/xinclude/* nu/xom/tools/* nu/xom/converters/* nu/xom/canonical/* nu/xom/pantry/*">
349
<attribute name="Built-By" value="${user.name}"/>
350
<attribute name="Specification-Title" value="XOM Samples"/>
351
<attribute name="Specification-Version" value="${version}"/>
352
<attribute name="Specification-Vendor" value="Elliotte Rusty Harold"/>
353
<attribute name="Implementation-Title" value="XOM Samples"/>
354
<attribute name="Implementation-Version" value="${version}"/>
355
<attribute name="Implementation-Vendor" value="Elliotte Rusty Harold"/>
356
<!-- I can't get this to work yet
357
<attribute name="Main-Class" value="nu.xom.samples.XMLPrinter"/>
358
<attribute name="Class-Path" value="${name}-${version}.jar"/> -->
364
<target name="javadoc" depends="prepare"
365
description="Generate the API documentation">
367
<mkdir dir="${build.javadocs}"/>
369
<javadoc packagenames="nu.xom.xslt, nu.xom.canonical, nu.xom.xinclude, nu.xom, nu.xom.converters"
370
sourcepath="${build.src}"
371
destdir="${build.javadocs}"
374
overview="overview.html"
378
windowtitle="${Name} ${version} API"
381
doctitle="${Name} ${version}"
382
bottom="Copyright 2002-${year} <a href='http://www.elharo.com/'>Elliotte Rusty Harold</a>
383
<br /> <a href='mailto:elharo%40metalab%2Eunc%2Eedu?Subject=XOM'>elharo@metalab.unc.edu</a>">
384
<classpath refid="test.class.path"/>
386
<fileset dir="${build.src}" defaultexcludes="yes">
387
<include name="nu/xom/tests/XOMTestCase.java" />
394
<!-- I can never remember the exact target name -->
395
<target name="javadocs" depends="javadoc" />
396
<target name="apidocs" depends="javadoc"/>
397
<target name="apidoc" depends="javadoc"/>
398
<target name="betterdocs" depends="betterdoc"/>
400
<target name="-checkForTagSoup" unless="tagsoup.installed">
402
Better documentation requires TagSoup to be installed
403
in the lib2 directory. You can download it from
404
http://mercury.ccil.org/~cowan/XML/tagsoup/
408
<target name="-checkForClover" unless="clover.installed">
410
The task you are trying to run requires Clover to be installed
411
in the $ANT_HOME/lib directory. You can purchase Clover from
412
http://www.cenqua.com/clover/
416
<!-- This task requires Ant 1.6 and TagSoup -->
417
<target name="betterdoc" depends="compile, -checkForTagSoup" if="tagsoup.installed"
418
description="Generate the API documentation">
419
<mkdir dir="${build.javadocs}"/>
420
<javadoc packagenames="nu.xom.xslt, nu.xom.canonical, nu.xom.xinclude, nu.xom, nu.xom.converters"
421
sourcepath="${build.src}"
422
destdir="${build.javadocs}"
425
overview="overview.html"
429
windowtitle="${Name} ${version} API"
432
noqualifier="java.lang:java.io"
433
link="http://www.junit.org/junit/javadoc/3.8.1"
434
doctitle="${Name} ${version}"
435
bottom="Copyright 2002-${year} <a href='http://www.elharo.com/'>Elliotte Rusty Harold</a>
436
<br/> <a href='mailto:elharo@metalab.unc.edu?Subject=XOM'>elharo@metalab.unc.edu</a>">
437
<classpath refid="test.class.path"/>
439
<fileset dir="${build.src}" defaultexcludes="yes">
440
<include name="nu/xom/tests/XOMTestCase.java" />
444
<javac srcdir="${build.src}"
445
destdir="${build.dest}"
447
optimize="${optimize}"
448
deprecation="${deprecation}"
452
includes="nu/xom/tools/*">
454
<pathelement path="${compile.class.path}"/>
455
<pathelement path="${tagsoup.jar}"/>
459
<java classname="nu.xom.tools.XHTMLJavaDoc" fork="yes">
460
<jvmarg value="-Xbootclasspath/p:lib/dtd-xercesImpl.jar:lib/xml-apis.jar:lib/xalan.jar"/>
461
<classpath refid="doc.class.path" />
462
<arg value="build/apidocs"/>
467
<target name="dist" depends="zip, tar.gz, maven" />
469
<target name="zip" depends="jar, betterdoc, samples"
470
description="Build zip file for distro">
472
<zip destfile="${dist.dir}/${name}-${version}-src.zip">
473
<zipfileset prefix="XOM" dir="." excludes="${excludes}"/>
476
<zip destfile="${dist.dir}/${name}-${version}.zip">
477
<zipfileset prefix="XOM" dir="." excludes="${excludes}"/>
478
<zipfileset prefix="XOM/apidocs" dir="./${build.dir}/apidocs"
479
excludes="**/.thumbnails/**, **/.nautilus-metafile.xml, website/**, **/.project, **/.classpath, **/.DS_Store"/>
480
<zipfileset fullpath="XOM/${name}-${version}.jar" dir="./${build.dir}" includes="${name}-${version}.jar"/>
481
<zipfileset fullpath="XOM/${name}-samples.jar" dir="./${build.dir}" includes="${name}-samples.jar"/>
487
<target name="tar" depends="jar, betterdoc, samples"
488
description="Build tar file for distro">
490
<tar destfile="${dist.dir}/${name}-${version}-src.tar">
491
<tarfileset prefix="XOM" dir="."
492
excludes="${excludes}"/>
495
<tar destfile="${dist.dir}/${name}-${version}.tar">
496
<tarfileset prefix="XOM" dir="."
497
excludes="${excludes}"/>
498
<tarfileset prefix="XOM/apidocs" dir="./${build.dir}/apidocs"
499
excludes="**/.thumbnails/**, **/.nautilus-metafile.xml, website/**, **/.project, **/.classpath, **/.DS_Store"/>
500
<tarfileset fullpath="XOM/${name}-${version}.jar" dir="./${build.dir}" includes="${name}-${version}.jar"/>
501
<tarfileset fullpath="XOM/${name}-samples.jar" dir="./${build.dir}" includes="${name}-samples.jar"/>
507
<target name="tar.gz" depends="tar" description="Build tar.gz file for distro">
508
<gzip src="${dist.dir}/${name}-${version}.tar" zipfile="${dist.dir}/${name}-${version}.tar.gz"/>
509
<gzip src="${dist.dir}/${name}-${version}-src.tar" zipfile="${dist.dir}/${name}-${version}-src.tar.gz"/>
513
<!-- This task requires the ANT optional.jar -->
514
<target name="test" depends="compile" description="Run JUnit tests using command line user interface">
517
<classpath refid="test.class.path" />
518
<formatter type="${test.outputFormat}" />
519
<batchtest fork="yes" todir="${testoutput.dir}">
520
<fileset dir="${build.src}">
521
<include name="**/*Test.java" />
522
<exclude name="**/pantry/*" />
523
<exclude name="**/MegaTest.java" />
524
<exclude name="**/benchmarks/*.java" />
525
<exclude name="**/EBCDICTest.java" />
530
<junitreport todir="${testoutput.dir}">
531
<fileset dir="${testoutput.dir}">
532
<include name="TEST-*.xml" />
534
<report todir="${testoutput.dir}" />
540
<target name="testjar" depends="jar" description="Run JUnit tests using jar file">
541
<junit printsummary="on" fork="no">
543
<pathelement location="${xom.jar}"/>
545
<classpath refid="run.class.path" />
546
<formatter type="${test.outputFormat}" />
547
<batchtest fork="yes" todir="${testoutput.dir}">
548
<fileset dir="${build.src}">
549
<include name="**/*Test.java" />
550
<exclude name="**/pantry/*" />
551
<exclude name="**/MegaTest.java" />
552
<exclude name="**/benchmarks/*.java" />
553
<exclude name="**/EBCDICTest.java" />
560
<target name="testui" depends="compile" description="Run JUnit tests using GUI interface">
561
<java classname="junit.swingui.TestRunner" fork="yes" maxmemory="99m">
562
<sysproperty key="org.xml.sax.driver" value="org.apache.xerces.parsers.SAXParser"/>
563
<classpath refid="test.class.path" />
564
<arg value="nu.xom.tests.XOMTests"/>
569
<target name="clean" depends="init" description="Remove build files">
570
<delete dir="${build.dir}"/>
571
<delete dir="${testoutput.dir}"/>
572
<delete dir=".clover"/>
573
<delete dir="clover"/>
574
<delete dir="clover_html"/>
576
<fileset dir="." includes="junit*properties"/>
578
<delete dir="${dist.dir}"/>
582
<!-- These tasks require Clover -->
583
<taskdef resource="clovertasks"/>
585
<target name="with.clover" depends="init, -checkForClover">
586
<mkdir dir="${clover.dir}"/>
587
<clover-setup initString="${clover.dir}/xom_coverage.db">
589
<include name="nu/xom/**"/> <!-- work around Ant 1.6.3 bug #34722 -->
590
<exclude name="nu/xom/UnicodeUtil.java"/>
591
<exclude name="nu/xom/Latin6Writer.java"/>
592
<exclude name="nu/xom/Latin8Writer.java"/>
593
<exclude name="nu/xom/Latin10Writer.java"/>
594
<exclude name="nu/xom/tests/FastTests.java"/>
595
<exclude name="nu/xom/tests/XOMTests.java"/>
596
<exclude name="nu/xom/samples/**"/>
597
<exclude name="nu/xom/pantry/**"/>
598
<exclude name="nu/xom/benchmarks/**"/>
599
<exclude name="nu/xom/tools/**" />
605
<property name="ant-home" value="/opt/ant"/>
607
<target name="clover.html" depends="with.clover">
609
<current outfile="clover_html" title="Clover results for ${Name} ${version}">
610
<format type="html"/>
616
<!-- This task requires the ANT optional.jar. clover.jar, and junit.jar to be installed in ANT_HOME/lib -->
617
<target name="clovertest" depends="compile, -checkForClover" description="Run JUnit tests with clover.jar in classpath">
618
<junit printsummary="on" fork="no">
619
<classpath refid="test.class.path" />
621
<pathelement path="${ant-home}/lib/clover.jar"/>
623
<formatter type="${test.outputFormat}" />
624
<batchtest fork="yes" todir="${testoutput.dir}">
625
<fileset dir="${build.src}">
626
<include name="**/*Test.java" />
627
<exclude name="**/pantry/*.java" />
628
<exclude name="**/MegaTest.java" />
629
<exclude name="**/benchmarks/*.java" />
630
<exclude name="**/tools/*.java" />
631
<exclude name="**/EBCDICTest.java" />
632
<exclude name="nu/xom/tests/FastTests.java"/>
633
<exclude name="nu/xom/tests/XOMTests.java"/>
639
<!-- This task requires the ANT optional.jar. clover.jar, and junit.jar to be installed in ANT_HOME/lib -->
640
<target name="fastclover" depends="compile, -checkForClover" description="Run JUnit tests with clover.jar in classpath">
641
<junit printsummary="on" fork="no">
642
<classpath refid="test.class.path" />
644
<pathelement path="${ant-home}/lib/clover.jar"/>
646
<formatter type="${test.outputFormat}" />
647
<batchtest fork="yes" todir="${testoutput.dir}">
648
<fileset dir="${build.src}">
649
<include name="**/*Test.java" />
650
<exclude name="**/pantry/*.java" />
651
<exclude name="**/EncodingTest.java" />
652
<exclude name="**/XIncludeTest.java" />
653
<exclude name="**/MegaTest.java" />
654
<exclude name="**/benchmarks/*.java" />
655
<exclude name="**/tools/*.java" />
656
<exclude name="**/EBCDICTest.java" />
657
<exclude name="nu/xom/tests/FastTests.java"/>
658
<exclude name="nu/xom/tests/XOMTests.java"/>
664
<!-- Generate a Maven JAR for uploading to the maven
665
bug repository and hence placement onto ibiblio and mirrors.
666
See http://maven.apache.org/repository-upload.html -->
667
<target name="maven" depends="jar" >
668
<property name="pom.template" location="project.xml" />
669
<property name="pom.file" location="${build.dir}/project.xml" />
670
<property name="package.jar"
671
location="${build.dir}/${name}-${version}.jar"/>
672
<property name="license" location="LICENSE.txt" />
673
<property name="xom-maven.jar"
674
location="${dist.dir}/xom-maven-${version}.jar" />
675
<copy file="${pom.template}" tofile="${pom.file}">
677
<filter token="VERSION" value="${version}"/>
680
<jar destFile="${xom-maven.jar}">
681
<fileset file="${pom.file}" />
682
<fileset file="${license}" />
683
<fileset file="${package.jar}" />
687
<target name="debug" depends="init" description="Print various Ant properties">
689
<java classname="org.apache.xalan.Version" fork="yes">
690
<classpath refid="test.class.path" />
694
<target name="website" depends="init" description="Print various Ant properties">
695
<ant antfile="build.xml" dir="website"/>