Project

Profile

Help

How to connect?
Download (50.1 KB) Statistics
| Branch: | Tag: | Revision:

he / tags / 9.7.0.3 / build / build-j.xml @ cb770b3c

1
<?xml version="1.0" encoding="UTF-8"?>
2

    
3
<project basedir="." default="all" name="Saxon for the Java platform"
4
    xmlns:dn="antlib:org.apache.ant.dotnet" xmlns:if="ant:if" xmlns:unless="ant:unless">
5
    <!-- The use of ant:if and ant:unless requires Ant 1.9.1 -
6
        for IntelliJ the built-in is 1.8.2, but an external Ant can be configured on the Ant menu  -->
7

    
8
    <!-- Build file for Saxon on the Java platform. This build file is designed to be imported
9
         from build.xml -->
10

    
11
    <import file="build-constants.xml"/>
12
    <import file="samples-common.xml"/>
13

    
14
    <!--<property file="ICU.properties"/>-->
15
    <target name="ICU"
16
        description="Generate the necessary modules from ICU to support PE/EE UCA collation and numbering.
17
    These will then eventually be added to the jars">
18
        <echo message="ICU.dir: ${ICU.dir}"/>
19
        <ant dir="${ICU.dir}" target="collator" inheritAll="false"/>
20
        <ant dir="${ICU.dir}" target="format" inheritAll="false"/>
21
    </target>
22

    
23
    <!-- Import of private Saxonica build file for signing the issued JARs (task private-signjars). -->
24
    <!-- This can be replaced by a reference to different signing tool -->
25

    
26
    <import file="build-j-signer.xml"/>
27
    <import file="documentation.xml"/>
28

    
29

    
30

    
31
    <!-- directory holding Java test drivers -->
32
    <property name="drivers-j.dir" value="../MyJava/testcode/test"/>
33

    
34
    <!-- The source preprocessor - see https://code.google.com/p/java-comment-preprocessor/wiki/UsageFromAnt -->
35
    <taskdef resource="com/igormaznitsa/jcp/ant/tasks.properties" classpath="../lib/jcp-5.3.jar"/>
36

    
37
    <!-- following locations are relative to the build file -->
38

    
39
    <property name="services.dir" value="services"/>
40
    <property name="temp-src-j.dir" value="${temp.dir}/j/source"/>
41
    <property name="temp-src-prep0-hej.dir" value="${temp.dir}/preprocessed0/hej/source"/>
42
    <property name="temp-src-prep0-eej.dir" value="${temp.dir}/preprocessed0/eej/source"/>
43
    <property name="temp-src-prep0-pej.dir" value="${temp.dir}/preprocessed0/pej/source"/>
44
    <property name="temp-src-prep-hej.dir" value="${temp.dir}/preprocessed/hej/source"/>
45
    <property name="temp-src-prep-eej.dir" value="${temp.dir}/preprocessed/eej/source"/>
46
    <property name="temp-src-prep-pej.dir" value="${temp.dir}/preprocessed/pej/source"/>
47
    <property name="temp-src-prep-test.dir" value="${temp.dir}/preprocessed/testdriver"/>
48
    <property name="classes-j.dir" value="${temp.dir}/j/classes"/>
49

    
50
    <property name="jar-signer-certificate" value="codesigner.p12"/>
51

    
52
    <!-- following locations are relative to the destination directory -->
53

    
54
    <property name="build-hej.dir" value="${product.dir}/hej"/>
55
    <property name="build-pej.dir" value="${product.dir}/pej"/>
56
    <property name="build-eej.dir" value="${product.dir}/eej"/>
57
    
58

    
59
    <property name="javadoc.dir" value="${build-resources.dir}/doc/javadoc"/>
60

    
61

    
62
    <path id="classpath-j">
63
        <fileset dir="${lib.dir}">
64
            <include name="*.jar"/>
65
        </fileset>
66
    </path>
67

    
68

    
69
    <path id="classpath-samples">
70
        <fileset dir="${lib.dir}">
71
            <include name="*.jar"/>
72
        </fileset>
73
        <fileset dir="${build-eej.dir}">
74
            <include name="*.jar"/>
75
        </fileset>
76
        <!-- Substitute build-hej.dir if there is no requirement to compile the sample applications
77
             that depend on Saxon-EE -->
78
    </path>
79

    
80

    
81
    <target name="create-meta-inf" description="Create contents of META-INF/services files">
82

    
83
        <!-- given the Ant 1.7.0 bug, create the services files here for copying into the JARS -->
84
        <mkdir dir="${services.dir}/saxon9he/META-INF/services"/>
85
        <echo
86
            file="${services.dir}/saxon9he/META-INF/services/javax.xml.transform.TransformerFactory"
87
            message="net.sf.saxon.TransformerFactoryImpl"/>
88
        <mkdir dir="${services.dir}/saxon9he/META-INF/services"/>
89
        <!-- The peculiar format of these files is due to the bug described at
90
             http://markmail.org/message/obgfqbnrkuhzl6wl. The correct format is
91
             just to use the first line: this works for JDK 1.6. But JDK 1.5 incorrectly
92
             expects a properties file, in the form of the subsequent line. The combination
93
             works with both Java releases -->
94
        <!-- See also Saxon bug 1944.
95
             Decided that from 9.6 we will drop the services information for XPath.
96
        echo file="${services.dir}/saxon9he/META-INF/services/javax.xml.xpath.XPathFactory"
97
>net.sf.saxon.xpath.XPathFactoryImpl
98
http\://java.sun.com/jaxp/xpath/dom:    net.sf.saxon.xpath.XPathFactoryImpl
99
http\://saxon.sf.net/jaxp/xpath/om:     net.sf.saxon.xpath.XPathFactoryImpl
100
</echo>-->
101

    
102
        <mkdir dir="${services.dir}/saxon9pe/META-INF/services"/>
103
        <echo
104
            file="${services.dir}/saxon9pe/META-INF/services/javax.xml.transform.TransformerFactory"
105
            message="com.saxonica.config.ProfessionalTransformerFactory"/>
106
        <!--<echo file="${services.dir}/saxon9pe/META-INF/services/javax.xml.xpath.XPathFactory"
107
>com.saxonica.config.ProfessionalXPathFactory
108
http\://java.sun.com/jaxp/xpath/dom:    com.saxonica.config.ProfessionalXPathFactory
109
http\://saxon.sf.net/jaxp/xpath/om:     com.saxonica.config.ProfessionalXPathFactory
110
http\://www.xom.nu/jaxp/xpath/xom:      com.saxonica.config.ProfessionalXPathFactory
111
http\://jdom.org/jaxp/xpath/jdom:       com.saxonica.config.ProfessionalXPathFactory
112
http\://www.dom4j.org/jaxp/xpath/dom4j: com.saxonica.config.ProfessionalXPathFactory
113
</echo>-->
114

    
115

    
116
        <mkdir dir="${services.dir}/saxon9ee/META-INF/services"/>
117
        <echo
118
            file="${services.dir}/saxon9ee/META-INF/services/javax.xml.transform.TransformerFactory"
119
            message="com.saxonica.config.EnterpriseTransformerFactory"/>
120
        <!--<echo file="${services.dir}/saxon9ee/META-INF/services/javax.xml.xpath.XPathFactory"
121
>com.saxonica.config.EnterpriseXPathFactory
122
http\://java.sun.com/jaxp/xpath/dom:    com.saxonica.config.EnterpriseXPathFactory
123
http\://saxon.sf.net/jaxp/xpath/om:     com.saxonica.config.EnterpriseXPathFactory
124
http\://www.xom.nu/jaxp/xpath/xom:      com.saxonica.config.EnterpriseXPathFactory
125
http\://jdom.org/jaxp/xpath/jdom:       com.saxonica.config.EnterpriseXPathFactory
126
http\://www.dom4j.org/jaxp/xpath/dom4j: com.saxonica.config.EnterpriseXPathFactory
127
</echo>-->
128
        <echo file="${services.dir}/saxon9ee/META-INF/services/javax.xml.validation.SchemaFactory"
129
            >com.saxonica.ee.jaxp.SchemaFactoryImpl</echo>
130
        <!--<echo file="${services.dir}/saxon9ee/META-INF/services/javax.xml.validation.SchemaFactory"
131
>com.saxonica.jaxp.SchemaFactoryImpl
132
http\://www.w3.org/2001/XMLSchema: com.saxonica.jaxp.SchemaFactoryImpl
133
http\://www.w3.org/XML/XMLSchema: com.saxonica.jaxp.SchemaFactoryImpl
134
http\://www.w3.org/XML/XMLSchema/v1.0: com.saxonica.jaxp.SchemaFactoryImpl
135
http\://www.w3.org/XML/XMLSchema/v1.1: com.saxonica.jaxp.SchemaFactoryImpl
136
</echo>  -->
137
    </target>
138

    
139
    <target name="expand-icu" unless="ICU-exists">
140
      <echo>Expanding ICU source...</echo>
141
      <untar src="${lib.dir}/icu4j-52_1.tar" dest="${ICU.dir}"/>
142
    </target>
143

    
144
    <target name="prepare-j" depends="create-meta-inf, expand-icu">
145
      <available property="ICU-exists" file="${ICU.dir}" type="dir"/>      
146
    </target>
147

    
148

    
149

    
150
    <target name="copysource-development-j"
151
        description="Copy relevant source files from development directory">
152
        <copy todir="${temp-src-j.dir}">
153
            <fileset dir="${development-data.dir}">
154
                <include name="**/*.*"/>
155
            </fileset>
156
        </copy>
157
    </target>
158

    
159

    
160

    
161
    <target name="copysrc-hej">
162
        <mkdir dir="${temp-src-j.dir}/hej"/>
163
        <copy todir="${temp-src-j.dir}/hej">
164
            <fileset dir="${source-hej.dir}">
165
                <include name="net/sf/saxon/**/*.java"/>
166
                <exclude name="javax/xml/xquery/*.java"/>
167
                <exclude name="**/dotnet/**"/>
168
                <include name="net/sf/saxon/**/package.html"/>
169
                <exclude name="net/sf/saxon/testdriver/**"/>
170
                <exclude name="net/sf/saxon/option/sql/**"/>
171
            </fileset>
172
            <!--<fileset dir="${source-eej.dir}">
173
              <include name="com/saxonica/testdriver/*.java"/> 
174
              <include name="com/saxonica/testdriver/gui/*.java"/>
175
              <exclude name="com/saxonica/testdriver/ActivateSaxon.java"/> 
176
          </fileset> -->
177
            <fileset dir="${development-data.dir}">
178
                <include name="**/*.*"/>
179
                <exclude name="override.xsl"/>
180
                <exclude name="chameleon.xsl"/>
181
                <exclude name="json.xsd"/>
182
                <exclude name="xml-to-json*.xsl"/>
183
            </fileset>
184
        </copy>
185
    </target>
186

    
187
    <target name="copysrc-pej">
188
        <mkdir dir="${temp-src-j.dir}/pej"/>
189
        <copy todir="${temp-src-j.dir}/pej">
190
            <fileset dir="${source-hej.dir}">
191
                <include name="net/sf/saxon/**/*.java"/>
192
                <include name="javax/xml/xquery/*.java"/>
193
                <exclude name="**/dotnet/**"/>
194
                <include name="net/sf/saxon/**/package.html"/>
195
                <exclude name="net/sf/saxon/testdriver/**"/>
196
            </fileset>
197
            <fileset dir="${source-eej.dir}">
198
                <include name="com/saxonica/**/*.java"/>
199
                <exclude name="com/saxonica/testdriver/**"/>
200
                <!-- jwL -->
201
                <exclude name="com/saxonica/testdriver/ee/**/*.java"/>
202
                <exclude name="com/saxonica/testdriver/old/**/*.java"/>
203
                <exclude name="com/saxonica/ee/**"/>
204
                <exclude name="com/saxonica/config/EnterpriseConfiguration.java"/>
205
                <exclude name="com/saxonica/expr/CastToUnion.java"/>
206
                <exclude name="com/saxonica/expr/CastableToUnion.java"/>
207
                <exclude name="com/saxonica/expr/DotNetExtensionFunctionCall.java"/>
208
                <exclude name="com/saxonica/config/ee/**"/>
209
                <!-- jwL -->
210
                <exclude name="com/saxonica/config/DotNetExtensionLibrary.java"/>
211
                <exclude name="com/saxonica/config/DotNetExtensionFunctionFactory.java"/>
212
                <exclude name="com/saxonica/config/DotNetPlatformPE.java"/>
213
                <exclude name="com/saxonica/config/JavaPlatformC.java"/>
214
                <exclude name="com/saxonica/Validate.java"/>
215
                <exclude name="com/saxonica/config/EnterpriseTransformerFactory.java"/>
216
                <exclude name="com/saxonica/config/EnterpriseXPathFactory.java"/>
217
                <exclude name="com/saxonica/config/DynamicLoaderEE.java"/>
218
                <exclude name="com/saxonica/config/StandardSchemaResolver.java"/>
219
                <exclude name="com/saxonica/jaxp/SchemaFactoryImpl11.java"/>
220

    
221
            </fileset>
222
            <fileset dir="${development-data.dir}">
223
                <include name="**/*.*"/>
224
                <exclude name="override.xsl"/>
225
                <exclude name="chameleon.xsl"/>
226
                <exclude name="json.xsd"/>
227
            </fileset>
228
        </copy>
229
    </target>
230

    
231
    <target name="copysrc-eej">
232
        <mkdir dir="${temp-src-j.dir}/eej"/>
233
        <copy todir="${temp-src-j.dir}/eej">
234
            <fileset dir="${source-hej.dir}">
235
                <include name="net/sf/saxon/**/*.java"/>
236
                <include name="javax/xml/xquery/*.java"/>
237
                <exclude name="**/dotnet/**"/>
238
                <include name="net/sf/saxon/**/package.html"/>
239
                <exclude name="net/sf/saxon/testdriver/**"/>
240
            </fileset>
241
            <fileset dir="${source-eej.dir}">
242
                <include name="com/saxonica/**/*.java"/>
243
                <exclude name="com/saxonica/testdriver/**/*.java"/>
244
                <!--<exclude name="com/saxonica/config/pe/**"/>-->
245
                <exclude name="com/saxonica/config/DotNetExtensionFunctionFactory.java"/>
246
                <exclude name="com/saxonica/config/DotNetExtensionLibrary.java"/>
247
                <exclude name="com/saxonica/config/DotNetPlatformPE.java"/>
248
                <exclude name="com/saxonica/config/JavaPlatformC.java"/>
249
                <exclude name="com/saxonica/expr/DotNetExtensionFunctionCall.java"/>
250
                <include name="com/saxonica/**/package.html"/>
251
            </fileset>
252
            <fileset dir="${development-data.dir}">
253
                <include name="**/*.*"/>
254
            </fileset>
255
        </copy>
256
    </target>
257

    
258
    <target name="preprocess-hej" depends="copysrc-hej">
259
        <preprocess source="${temp-src-j.dir}/hej" destination="${temp-src-prep0-hej.dir}"
260
            verbose="false">
261
            <global name="EE" value="false"/>
262
            <global name="PE" value="false"/>
263
            <global name="DOTNET" value="false"/>
264
            <global name="OPT" value="false"/>
265
            <global name="SAXONC" value="false"/>
266
        </preprocess>
267
        <echo>Preprocessing hej complete.</echo>
268
        <copy todir="${temp-src-prep-hej.dir}">
269
           <fileset dir="${temp-src-prep0-hej.dir}"/>
270
           <filterchain>
271
              <linecontains negate="true">
272
                 <contains value="import com.saxonica"/>
273
              </linecontains>
274
           </filterchain>
275
       </copy>
276
        <echo>Import filtering for hej complete!</echo>
277
    </target>
278

    
279
    <target name="preprocess-android" depends="copysrc-eej">
280
        <preprocess source="${temp-src-j.dir}/eej" destination="${temp-src-prep-hej.dir}"
281
            verbose="false">
282
            <global name="HOF" value="true"/>
283
            <global name="STREAM" value="true"/>
284
        </preprocess>
285
        <replaceregexp match="import com\.saxonica\.bytecode(.*)" replace="" byline="yes">
286
            <fileset dir="${temp-src-prep-hej.dir}\net" includes="**/*.java"/>
287
        </replaceregexp>
288
        <replaceregexp match="import com\.saxonica\.bytecode(.*)" replace="" byline="yes">
289
            <fileset dir="${temp-src-prep-hej.dir}\com" includes="**/*.java"/>
290
        </replaceregexp>
291
        <delete dir="${temp-src-prep-hej.dir}/com/saxonica/bytecode"/>
292
        <delete dir="${temp-src-prep-hej.dir}/com/saxonica/testdriver"/>
293
        <echo>Preprocessing Android complete!</echo>
294
    </target>
295

    
296
    <target name="preprocess-pej" depends="copysrc-pej">
297
        <preprocess source="${temp-src-j.dir}/pej" destination="${temp-src-prep0-pej.dir}"
298
            verbose="false">
299
            <global name="DOTNET" value="false"/>
300
            <global name="HOF" value="true"/>
301
            <global name="SAXONC" value="false"/>
302
            <global name="PE" value="true"/>
303
            <global name="EE" value="false"/>
304
            <global name="OPT" value="false"/>
305
        </preprocess>
306
        <echo>Done preprocessing for PEJ.</echo>
307
        <copy todir="${temp-src-prep-pej.dir}">
308
           <fileset dir="${temp-src-prep0-pej.dir}"/>
309
           <filterchain>
310
              <linecontains negate="true">
311
                 <contains value="import com.saxonica.ee"/>
312
              </linecontains>
313
              <linecontains negate="true">
314
                 <contains value="import com.saxonica.config.ee"/>
315
              </linecontains>
316
           </filterchain>
317
        </copy>
318

    
319
       <echo>Import filtering for PEJ complete.</echo>
320

    
321
    </target>
322

    
323
    <target name="preprocess-eej" depends="copysrc-eej">
324
        <preprocess source="${temp-src-j.dir}/eej" destination="${temp-src-prep-eej.dir}"
325
            verbose="false">
326
            <global name="EE" value="true"/>
327
            <global name="PE" value="false"/>
328
            <global name="SAXONC" value="false"/>
329
            <global name="STREAM" value="true"/>
330
            <global name="PACKAGES" value="true"/>
331
            <global name="HOF" value="true"/>
332
            <global name="BYTECODE" value="true"/>
333
            <global name="SCHEMA" value="true"/>
334
            <global name="DOTNET" value="false"/>
335
            <global name="OPT" value="false"/>
336
        </preprocess>
337
    </target>
338

    
339
    <target name="compile-hej" description="Compile Saxon classes for the Java opensource product."
340
        depends="copysource-development-j, preprocess-hej">
341
        <mkdir dir="${classes-j.dir}/he"/>
342

    
343
        <javac debug="${build.debug}" debuglevel="${build.debuglevel}"
344
            deprecation="${build.deprecation}" destdir="${classes-j.dir}/he"
345
            optimize="${build.optimize}" srcdir="${temp-src-prep-hej.dir}"
346
            source="${build.compiler.source}" target="${build.compiler.target}" fork="true"
347
            memoryinitialsize="256m" memorymaximumsize="256m">
348

    
349
            <include name="net/**"/>
350
            <exclude name="net/sf/saxon/option/**/*.java"/>
351
            <!--<include name="com/saxonica/testdriver/**/*.java"/>-->
352

    
353
            <!--<exclude name="**/dotnet/**"/>-->
354
            <!--<exclude name="com/saxonica/validate/DotNetVerifier.java"/>-->
355
            <classpath>
356
                <path refid="classpath-j"/>
357
            </classpath>
358
        </javac>
359
    </target>
360

    
361
    <target name="compile-pej"
362
        description="Compile Saxon classes for the Java professional edition."
363
        depends="copysource-development-j, preprocess-pej, ICU">
364
        <mkdir dir="${classes-j.dir}/pe"/>
365

    
366
        <javac debug="${build.debug}" debuglevel="${build.debuglevel}"
367
            deprecation="${build.deprecation}" destdir="${classes-j.dir}/pe"
368
            optimize="${build.optimize}" srcdir="${temp-src-prep-pej.dir}"
369
            source="${build.compiler.source}" target="${build.compiler.target}" fork="true"
370
            memoryinitialsize="256m" memorymaximumsize="256m">
371

    
372
            <include name="net/**"/>
373
            <include name="javax/xml/xquery/**"/>
374
            <include name="com/saxonica/**"/>
375

    
376
            <classpath>
377
                <path refid="classpath-j"/>
378
            </classpath>
379
        </javac>
380
    </target>
381

    
382
    <target name="compile-eej" description="Compile Saxon classes for the Java enterprise edition."
383
        depends="copysource-development-j, preprocess-eej">
384
        <mkdir dir="${classes-j.dir}/ee"/>
385

    
386
        <javac debug="${build.debug}" debuglevel="${build.debuglevel}"
387
            deprecation="${build.deprecation}" destdir="${classes-j.dir}/ee"
388
            optimize="${build.optimize}" srcdir="${temp-src-prep-eej.dir}"
389
            source="${build.compiler.source}" target="${build.compiler.target}" fork="true"
390
            memoryinitialsize="256m" memorymaximumsize="256m">
391

    
392
            <include name="net/**"/>
393
            <include name="javax/xml/xquery/**"/>
394
            <include name="com/saxonica/**"/>
395

    
396
            <classpath>
397
                <path refid="classpath-j"/>
398
            </classpath>
399
        </javac>
400
    </target>
401

    
402

    
403

    
404

    
405
    <target name="jar-hej" description="Create Saxon-HE jar files for Java" depends="testdrivers-j, compile-hej">
406
        <mkdir dir="${product.dir}/hej"/>
407
        <mkdir dir="${classes-j.dir}/he"/>
408

    
409
        <jar basedir="${classes-j.dir}/he" compress="${build.compress}"
410
            jarfile="${product.dir}/hej/saxon9he.jar">
411
            <include name="net/**/*.class"/>
412
            <exclude name="net/sf/saxon/option/**/*.class"/>
413
            <include name="META-INF/**"/>
414
            <manifest>
415
                <attribute name="Project-Name" value="Saxon-HE"/>
416
                <attribute name="Main-Class" value="net.sf.saxon.Transform"/>
417
            </manifest>
418
            <metainf dir="${services.dir}/saxon9he/META-INF"/>
419
        </jar>
420

    
421
        <!-- add data files -->
422
        <jar basedir="${development-data.dir}" compress="${build.compress}"
423
            jarfile="${product.dir}/hej/saxon9he.jar" update="true">
424
            <include name="**"/>
425
        </jar>
426

    
427
        <mkdir dir="${product.dir}/resources/drivers/java/classes"/>
428
        <javac debug="true" debuglevel="${build.debuglevel}"
429
               destdir="${product.dir}/resources/drivers/java/classes"
430
               srcdir="${product.dir}/resources/drivers/java" source="${build.compiler.source}"
431
               target="${build.compiler.target}">
432
            <include name="net/sf/saxon/testdriver/*.java"/>
433
            <classpath>
434
                <fileset dir="${lib.dir}">
435
                    <include name="*.jar"/>
436
                </fileset>
437
                <fileset dir="${build-hej.dir}">
438
                    <include name="*.jar"/>
439
                </fileset>
440
            </classpath>
441
        </javac>
442

    
443

    
444
        <copyfile dest="${product.dir}/resources/drivers/java/classes/com/saxonica/testdriver/gui/images/saxonica_logo.gif" src="${product.dir}/resources/drivers/java/com/saxonica/testdriver/gui/images/saxonica_logo.gif" />
445

    
446
        <!-- saxon9-test.jar -->
447
        <jar basedir="${product.dir}/resources/drivers/java/classes" compress="${build.compress}"
448
            jarfile="${product.dir}/hej/saxon9-test.jar">
449
            <include name="net/sf/saxon/testdriver/*.class"/>
450
            <!--<include name="com/saxonica/testdriver/gui/*.class"/>-->
451
            <manifest>
452
                <attribute name="Project-Name" value="Saxon-HE-TestDriver"/>
453
                <attribute name="Main-Class" value="com.saxonica.testdriver.gui.TestDriverGui"/>
454
            </manifest>
455
        </jar>
456

    
457
         <jar basedir="${classes-j.dir}/ee" compress="${build.compress}" jarfile="${product.dir}/hej/saxon9-xqj.jar">
458
            <include name="com/saxonica/xqj/**/*.class"/>
459
            <include name="javax/xml/xquery/**/*.class"/>
460
        </jar>
461

    
462
        <!--<jar basedir="${source-eej.dir}" compress="${build.compress}"
463
            jarfile="${product.dir}/hej/saxon9-test.jar" update="true">
464
            <include name="com/saxonica/testdriver/gui/images/**"/>
465
        </jar>-->
466

    
467
    </target>
468

    
469
    <target name="jar-pej" description="Create Saxon-PE jar files for Java"
470
        depends="testdrivers-j, compile-pej, jar-hej">
471
        <mkdir dir="${product.dir}/pej"/>
472
        <mkdir dir="${classes-j.dir}/pe"/>
473

    
474
        <jar basedir="${classes-j.dir}/pe" compress="${build.compress}"
475
            jarfile="${product.dir}/pej/saxon9pe.jar">
476
            <include name="net/**/*.class"/>
477
            <exclude name="net/sf/saxon/ant/*.class"/>
478
            <exclude name="**/sql/**/*.class"/>
479

    
480
            <include name="com/saxonica/**/*.class"/>
481
            <exclude name="com/saxonica/ee/**/*.class"/>
482
            <exclude name="com/saxonica/expr/CastToUnion.class"/>
483
            <exclude name="com/saxonica/expr/CastableToUnion.class"/>
484
            <exclude name="com/saxonica/expr/CastToList.class"/>
485
            <exclude name="com/saxonica/expr/CastableToList.class"/>
486
            <exclude name="com/saxonica/Validate.class"/>
487
            <exclude name="com/saxonica/CompileStylesheet.class"/>
488
            <exclude name="com/saxonica/CompileStylesheet$TracingObjectOutputStream.class"/>
489
            <exclude name="com/saxonica/config/EnterpriseConfiguration.class"/>
490
            <exclude name="com/saxonica/config/EnterpriseConfiguration$SurrogateSchema.class"/>
491
            <exclude name="com/saxonica/config/EnterpriseTransformerFactory.class"/>
492
            <exclude name="com/saxonica/config/EnterpriseXPathFactory.class"/>
493

    
494
            <include name="javax/xml/xquery/*.class"/>
495

    
496
            <manifest>
497
                <attribute name="Project-Name" value="Saxon-PE"/>
498
                <attribute name="Main-Class" value="net.sf.saxon.Transform"/>
499
            </manifest>
500
            <metainf dir="${services.dir}/saxon9pe/META-INF"/>
501

    
502
        </jar>
503
        
504
        <!-- add data files -->
505
        <jar basedir="${development-data.dir}" compress="${build.compress}"
506
            jarfile="${product.dir}/pej/saxon9pe.jar" update="true">
507
            <include name="**"/>
508
        </jar>
509

    
510
        <!-- Include the ICU classes which have been built separately, either in the main JAR or in a subsidiary -->
511
        <jar unless:true="${ICU.separate.JARS}" basedir="${icu4j.classes.dir}"
512
            compress="${build.compress}" jarfile="${product.dir}/pej/saxon9pe.jar" update="true">
513
            <include name="**"/>
514
        </jar>
515
        <jar if:true="${ICU.separate.JARS}" basedir="${icu4j.classes.dir}" compress="${build.compress}"
516
            jarfile="${product.dir}/pej/saxon9-icu.jar">
517
            <include name="**"/>
518
        </jar>
519

    
520
        <!-- <jar basedir="${classes-j.dir}/pe" compress="${build.compress}" jarfile="${product.dir}/pej/saxon9pe.jar" update="true">
521
            <include name="edition.properties"/>
522
        </jar>  -->
523
        <jar basedir="${classes-j.dir}/pe" compress="${build.compress}"
524
            jarfile="${product.dir}/pej/saxon9-sql.jar">
525
            <include name="net/sf/saxon/option/sql/*.class"/>
526
        </jar>
527

    
528
        <jar basedir="${classes-j.dir}/pe" compress="${build.compress}"
529
            jarfile="${product.dir}/pej/saxon9-sql.jar">
530
            <include name="net/sf/saxon/option/sql/*.class"/>
531
        </jar>
532

    
533
        <mkdir dir="${product.dir}/resources/drivers/java/classes"/>
534
        <javac debug="true" debuglevel="${build.debuglevel}"
535
               destdir="${product.dir}/resources/drivers/java/classes"
536
               srcdir="${product.dir}/resources/drivers/java" source="${build.compiler.source}"
537
               target="${build.compiler.target}">
538
            <include name="**/*.java"/>
539
            <classpath>
540
                <path refid="classpath-samples"/>
541
            </classpath>
542
        </javac>
543

    
544

    
545
        <copyfile dest="${product.dir}/resources/drivers/java/classes/com/saxonica/testdriver/gui/images/saxonica_logo.gif" src="${product.dir}/resources/drivers/java/com/saxonica/testdriver/gui/images/saxonica_logo.gif" />
546

    
547
        <!-- saxon9pe-test.jar -->
548
        <jar basedir="${product.dir}/resources/drivers/java/classes" compress="${build.compress}"
549
            jarfile="${product.dir}/pej/saxon9pe-test.jar">
550
            <include name="net/sf/saxon/testdriver/*.class"/>
551
            <include name="com/saxonica/testdriver/gui/*.class"/>
552
            <include name="com/saxonica/testdriver/*.class"/>
553
            <include name="com/saxonica/testdriver/gui/images/**"/>
554
            <manifest>
555
                <attribute name="Project-Name" value="Saxon-PE-TestDriver"/>
556
                <attribute name="Main-Class" value="com.saxonica.testdriver.gui.TestDriverGui"/>
557
            </manifest>
558
        </jar>
559

    
560
        <!-- <jar basedir="${source-eej.dir}" compress="${build.compress}"
561
            jarfile="${product.dir}/pej/saxon9pe-test.jar" update="true">
562
            <include name="com/saxonica/testdriver/gui/images/**"/>
563
        </jar>   -->
564

    
565
    </target>
566

    
567
   
568
    <target name="jar-eej" description="Create Saxon-EE jar files for Java" depends="testdrivers-j, compile-eej">
569
        <mkdir dir="${product.dir}/eej"/>
570
        <mkdir dir="${classes-j.dir}/ee"/>
571

    
572
        <!--<copy todir="${product.dir}/eej">
573
            <fileset dir="${product.dir}/pej">
574
                <include name="saxon9-sql.jar"/>
575
                    <include if:true="${ICU.separate.JARS}" name="saxon9-icu.jar"/>
576
            </fileset>
577
        </copy> -->
578

    
579
        <jar basedir="${classes-j.dir}/ee" compress="${build.compress}"
580
            jarfile="${product.dir}/eej/saxon9-sql.jar">
581
            <include name="net/sf/saxon/option/sql/*.class"/>
582
        </jar>
583

    
584
        <!-- Put the SQL extensions in a separate jar -->
585
        <jar basedir="${classes-j.dir}/ee" compress="${build.compress}"
586
            jarfile="${product.dir}/eej/saxon9-sql.jar">
587
            <include name="net/sf/saxon/option/sql/*.class"/>
588
        </jar>
589
        
590
        <!-- Put the classes and data for StatsTransform in a separate jar -->
591
        <jar basedir="${stats-data.dir}" compress="${build.compress}"
592
            jarfile="${product.dir}/eej/saxon9-stats.jar">
593
            <include name="**"/>
594
        </jar>
595
        <jar basedir="${classes-j.dir}/ee" compress="${build.compress}"
596
            jarfile="${product.dir}/eej/saxon9-stats.jar" update="true">
597
            <include name="com/saxonica/StatsTransform*.class"/>
598
        </jar>
599

    
600
        <!-- Include the ICU classes which have been built separately, either in the main JAR or in a subsidiary -->
601
        <mkdir dir="${icu4j.classes.dir}"/> 
602
        <jar unless:true="${ICU.separate.JARS}" basedir="${icu4j.classes.dir}"
603
                   compress="${build.compress}" jarfile="${product.dir}/eej/saxon9ee.jar" update="true">
604
              <include name="**"/>
605
         </jar>
606
         <jar if:true="${ICU.separate.JARS}" basedir="${icu4j.classes.dir}" compress="${build.compress}"
607
                   jarfile="${product.dir}/eej/saxon9-icu.jar">
608
              <include name="**"/>
609
          </jar>
610

    
611

    
612

    
613

    
614
        <!-- Build EEJ using jarjar to rename the ASM classes into a different package name, to allow coexistence with
615
             other ASM versions -->
616

    
617
        <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
618
            classpath="../lib/jarjar-1.1.jar"/>
619
        <jarjar basedir="${classes-j.dir}/ee" compress="${build.compress}"
620
            jarfile="${product.dir}/eej/saxon9ee.jar">
621
            <include name="net/**/*.class"/>
622
            <exclude name="**/sql/**/*.class"/>
623
            <include name="com/saxonica/**/*.class"/>
624
            <exclude name="com/saxonica/StatsTransform*.class"/>            
625
            <include name="javax/xml/xquery/*.class"/>
626
            <rule pattern="org.objectweb.**" result="com.saxonica.objectweb.@1"/>
627
            <manifest>
628
                <attribute name="Project-Name" value="Saxon-EE"/>
629
                <attribute name="Main-Class" value="net.sf.saxon.Transform"/>
630
            </manifest>
631
            <metainf dir="${services.dir}/saxon9ee/META-INF"/>
632
            <!-- </jar> -->
633
        </jarjar>
634

    
635
        <!-- Include the ICU classes which have been built separately, unless they are in a separate JAR -->
636
        <jar unless:true="${ICU.separate.JARS}" basedir="${icu4j.classes.dir}" compress="${build.compress}"
637
            jarfile="${product.dir}/eej/saxon9ee.jar" update="true">
638
            <include name="**"/>
639
        </jar>
640

    
641
        <!-- Include the ASM library, renamed into Saxonica space to avoid conflict with other versions -->
642
        <jarjar compress="${build.compress}" jarfile="${product.dir}/eej/saxon9ee.jar" update="true">
643
            <zipfileset src="${lib.dir}/asm-${asm.version}.jar"/>
644
            <zipfileset src="${lib.dir}/asm-analysis-${asm.version}.jar"/>
645
            <zipfileset src="${lib.dir}/asm-commons-${asm.version}.jar"/>
646
            <zipfileset src="${lib.dir}/asm-tree-${asm.version}.jar"/>
647
            <zipfileset src="${lib.dir}/asm-util-${asm.version}.jar"/>
648
            <rule pattern="org.objectweb.**" result="com.saxonica.objectweb.@1"/>
649
        </jarjar>
650

    
651
        <!--<jar basedir="${classes-j.dir}/ee" compress="${build.compress}" jarfile="${product.dir}/eej/saxon9ee.jar" update="true">
652
            <include name="edition.properties"/>
653
        </jar>      -->
654
        <jar basedir="${development-data.dir}" compress="${build.compress}"
655
            jarfile="${product.dir}/eej/saxon9ee.jar" update="true">
656
            <include name="**"/>
657
        </jar>
658

    
659
        <mkdir dir="${product.dir}/resources/drivers/java/classes"/>
660
        <javac debug="true" debuglevel="${build.debuglevel}"
661
               destdir="${product.dir}/resources/drivers/java/classes"
662
               srcdir="${product.dir}/resources/drivers/java" source="${build.compiler.source}"
663
               target="${build.compiler.target}">
664
            <include name="**/*.java"/>
665
            <classpath>
666
                <path refid="classpath-samples"/>
667
            </classpath>
668
        </javac>
669

    
670
        <copyfile dest="${product.dir}/resources/drivers/java/classes/com/saxonica/testdriver/gui/images/saxonica_logo.gif" src="${product.dir}/resources/drivers/java/com/saxonica/testdriver/gui/images/saxonica_logo.gif" />
671

    
672
        <!-- saxon9ee-test.jar -->
673
        <jar basedir="${product.dir}/resources/drivers/java/classes" compress="${build.compress}"
674
            jarfile="${product.dir}/eej/saxon9ee-test.jar">
675
            <include name="net/sf/saxon/testdriver/*.class"/>
676
            <include name="com/saxonica/testdriver/gui/*.class"/>
677
            <include name="com/saxonica/testdriver/*.class"/>
678
            <include name="com/saxonica/testdriver/gui/images/**"/>
679
            <manifest>
680
                <attribute name="Project-Name" value="Saxon-EE-TestDriver"/>
681
                <attribute name="Main-Class" value="com.saxonica.testdriver.gui.TestDriverGui"/>
682
            </manifest>
683
        </jar>
684
       <!-- <jar basedir="${product.dir}/resources/drivers/java/com/saxonica/testdriver/gui" compress="${build.compress}"
685
            jarfile="${product.dir}/hej/saxon9he.jar" update="true">
686
            <include name="**"/>
687
        </jar>   -->
688

    
689
    </target>
690

    
691

    
692
    <target name="maven" description="Build files ready for maven" depends="copysource-development-j, jar-eej,compile-hej">
693
       <mkdir dir="${product.dir}/maven" />
694
        <mkdir dir="${product.dir}/maven/javadoc" />
695

    
696
       <copyfile dest="${product.dir}/maven/Saxon-HE-${version.maven}.pom" src="../maven/${version}/Saxon-HE-${version.maven}.pom" />
697
       <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="../lib/jarjar-1.1.jar"/>
698
       <jar basedir="${temp-src-prep-hej.dir}" compress="true" jarfile="${product.dir}/maven/Saxon-HE-${version.maven}-sources.jar">
699
           <include name="net/**/*.java"/>
700
           <include name="net/**/package.html"/>
701
       </jar>
702

    
703

    
704
        <jar basedir="${temp-src-prep-eej.dir}" compress="${build.compress}" jarfile="${product.dir}/maven/Saxon-HE-${version.maven}-sources.jar" update="true">
705
                   <include name="com/saxonica/xqj/**"/>
706
                   <include name="javax/xml/xquery/**"/>
707
        </jar>
708

    
709
        <jar basedir="${development-data.dir}" compress="true" jarfile="${product.dir}/maven/Saxon-HE-${version.maven}-sources.jar" update="true">
710
            <include name="**"/>
711
        </jar>
712

    
713

    
714
      <jar basedir="${classes-j.dir}/he" compress="${build.compress}" jarfile="${product.dir}/maven/Saxon-HE-${version.maven}.jar">
715
            <include name="net/**/*.class"/>
716
            <exclude name="net/sf/saxon/option/**/*.class"/>
717
            <!--<exclude name="**/javax/**/*.class"/>
718
            <exclude name="**/xpath/**/*.class"/>-->
719
            <exclude name="**/xqj/**/*.class"/>
720
            <exclude name="javax/xml/xquery/*.class"/>
721
            <include name="META-INF/**"/>
722
            <manifest>
723
                <attribute name="Project-Name" value="Saxon-HE"/>
724
                <attribute name="Main-Class" value="net.sf.saxon.Transform"/>
725
            </manifest>
726
            <metainf dir="${services.dir}/saxon9he/META-INF"/>
727
            <!--<metainf dir="${services.dir}/saxon9-xpath/META-INF"/>-->
728
            <!--
729
            <service type="javax.xml.transform.TransformerFactory"
730
                provider="net.sf.saxon.TransformerFactoryImpl"/>
731
            -->
732
        </jar>
733

    
734
        <jar basedir="${classes-j.dir}/ee" compress="${build.compress}" jarfile="${product.dir}/maven/Saxon-HE-${version.maven}-xqj.jar">
735
            <include name="com/saxonica/xqj/**/*.class"/>
736
            <include name="javax/xml/xquery/**/*.class"/>
737
        </jar>
738

    
739
        <!-- <jar basedir="${classes-j.dir}/he" compress="${build.compress}" jarfile="${product.dir}/maven/Saxon-HE-${version.maven}.jar" update="true">
740
            <include name="**"/>
741
        </jar> -->
742
  
743

    
744
       <!-- <jar basedir="${classes-j.dir}/he" compress="true" jarfile="${product.dir}/maven/Saxon-HE-${version.maven}-compressed.jar">
745
            <include name="net/**/*.class"/>
746
            <exclude name="net/sf/saxon/option/**/*.class"/>
747

748
            <exclude name="**/xqj/**/*.class"/>
749
            <exclude name="javax/xml/xquery/*.class"/>
750
            <include name="META-INF/**"/>
751
            <manifest>
752
                <attribute name="Project-Name" value="Saxon-HE"/>
753
                <attribute name="Main-Class" value="net.sf.saxon.Transform"/>
754
            </manifest>
755
            <metainf dir="${services.dir}/saxon9he/META-INF"/>
756

757
        </jar>      -->
758

    
759

    
760
        <javadoc bottom="Copyright (c) 2004-2015 Saxonica Limited. All rights reserved."
761
            destdir="${product.dir}/maven/javadoc" doctitle="Saxon9 Java API Documentation" noindex="false"
762
            notree="false" access="protected" maxmemory="512M" source="1.5">
763
            <packageset dir="${temp-src-j.dir}/hej">
764
                <include name="net/**"/>
765

    
766
                <include name="javax/xml/query/**"/>
767
                <exclude name="net/sf/saxon/testdriver/**"/>
768
                <exclude name="**/dotnet/**"/>
769
                <exclude name="**/DotNetVerifier.java"/>
770
            </packageset>
771
            <packageset dir="${repository}/lib/xqj-final/ri/src"/>
772
            <classpath>
773
                <path refid="classpath-j"/>
774
            </classpath>
775

    
776
            <link href="http://download.oracle.com/javase/6/docs/api/"/>
777
            <link href="http://www.xom.nu/apidocs/"/>
778

    
779
            <group title="s9api Interface" packages="net.sf.saxon.s9api"/>
780
            <group title="Other Interfaces">
781
                <package name="net.sf.saxon"/>
782
                <package name="net.sf.saxon.lib"/>
783
                <package name="net.sf.saxon.om"/>
784
                <package name="net.sf.saxon.query"/>
785
                <package name="net.sf.saxon.sxpath"/>
786
                <package name="net.sf.saxon.value"/>
787
                <package name="net.sf.saxon.type"/>
788
                <package name="net.sf.saxon.xpath"/>
789
                <package name="net.sf.saxon.xqj"/>
790

    
791
            </group>
792
            <group title="External Interfaces">
793
                <package name="javax.xml.xquery"/>
794
            </group>
795

    
796

    
797
        </javadoc>
798

    
799
        <copy file="${userdoc.dir}/saxon9/fixed/javadoc/stylesheet.css"
800
            tofile="${product.dir}/maven/javadoc/stylesheet.css" overwrite="true"/>
801

    
802
        <jar basedir="${product.dir}/maven/javadoc" compress="true" jarfile="${product.dir}/maven/Saxon-HE-${version.maven}-javadoc.jar" update="true">
803
            <include name="**/*" />
804
        </jar>
805

    
806
       <delete dir="${product.dir}/maven/javadoc" />
807

    
808
                <!-- add data files -->
809
        <!-- <jar basedir="${development-data.dir}" compress="true" jarfile="${product.dir}/maven/Saxon-HE-${version.maven}-compressed.jar" update="true">
810
            <include name="**"/>
811
        </jar> -->
812

    
813
        <jar basedir="${development-data.dir}" compress="true" jarfile="${product.dir}/maven/Saxon-HE-${version.maven}.jar" update="true">
814
            <include name="**"/>
815
        </jar>
816

    
817
        <echo message="${build.compress}"/>
818
    </target>
819

    
820

    
821
    
822
    <target name="jar-j" depends="jar-eej, jar-hej, jar-pej"/>
823

    
824
    <target name="samples-j" description="Copy and Compile Java Samples"
825
        depends="samples-common">           <!-- Could jar-eej be removed? DL 2014-09-11 -->
826
        <mkdir dir="${product.dir}/resources/samples/java/he"/>
827
        <mkdir dir="${product.dir}/resources/samples/java/classes/he"/>
828
        <mkdir dir="${product.dir}/resources/samples/java/ee"/>
829
        <mkdir dir="${product.dir}/resources/samples/java/classes/ee"/>
830
        <copy todir="${product.dir}/resources/samples/java/he">
831
            <fileset dir="${samples.dir}/java/he">
832
                <include name="ApplyXPathJAXP.java"/>
833
                <include name="ExampleContentHandler.java"/>
834
                <include name="QueryAPIExamples.java"/>
835
                <include name="S9APIExamples.java"/>
836
                <include name="SaxonServlet.java"/>
837
                <include name="JAXPExamples.java"/>
838
                <include name="XPathExample.java"/>
839
                <include name="XPathExampleDOM.java"/>
840
                <include name="XPathExampleServlet.java"/>
841
            </fileset>
842
        </copy>
843
        <javac debug="true" debuglevel="${build.debuglevel}"
844
            destdir="${product.dir}/resources/samples/java/classes"
845
            srcdir="${product.dir}/resources/samples/java/he" source="${build.compiler.source}"
846
            target="${build.compiler.target}" includeantruntime="false">
847
            <include name="*.java"/>
848
            <classpath>
849
                <path refid="classpath-samples"/>
850
            </classpath>
851
        </javac>
852
        <copy todir="${product.dir}/resources/samples/java/ee">
853
            <fileset dir="${samples.dir}/java/ee">
854
                <include name="JDOM2Example.java"/>
855
                <include name="PullExamples.java"/>
856
                <include name="QuickValidator.java"/>
857
                <include name="SaxonSAServlet.java"/>
858
                <include name="SchemaValidatorExample.java"/>
859
                <include name="SchemaValidatorHandlerExample.java"/>
860
                <include name="XMarkBenchmark.java"/>
861
                <include name="XPathExampleSA.java"/>
862
                <include name="XQJExamples.java"/>
863
            </fileset>
864
        </copy>
865
        <javac debug="true" debuglevel="${build.debuglevel}"
866
               destdir="${product.dir}/resources/samples/java/classes"
867
               srcdir="${product.dir}/resources/samples/java/ee" source="${build.compiler.source}"
868
               target="${build.compiler.target}" includeantruntime="false">
869
            <include name="*.java"/>
870
            <classpath>
871
                <path refid="classpath-samples"/>
872
            </classpath>
873
        </javac>
874
    </target>
875

    
876
    <target name="preprocess-testdriver-j">
877
        <mkdir dir="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver"/>
878
        <mkdir dir="${temp-src-prep-test.dir}/pej/com/saxonica/testdriver"/>
879
        <mkdir dir="${temp-src-prep-test.dir}/eej/com/saxonica/testdriver"/>
880
        <copy todir="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver">
881
            <fileset dir="${source-eej.dir}/com/saxonica/testdriver">
882
                <exclude name="com/saxonica/testdriver/FOTestSuiteDriver.java"/>
883
                <exclude name="com/saxonica/testdriver/XQueryTestSuiteDriver.java"/>
884
                <exclude name="com/saxonica/testdriver/XsltTestSuiteDriver.java"/>
885
                <exclude name="com/saxonica/testdriver/XQTSModuleURIResolver.java"/>
886
                <exclude name="com/saxonica/testdriver/XQTSCollectionURIResolver.java"/>
887
                <exclude name="com/saxonica/testdriver/SchemaTestSuiteDriver.java"/>
888
            </fileset>
889
        </copy>
890

    
891
        <copy todir="${temp-src-prep-test.dir}/pej/com/saxonica/testdriver">
892
            <fileset dir="${source-eej.dir}/com/saxonica/testdriver">
893
                <exclude name="com/saxonica/testdriver/XsltTestSuiteDriver.java"/>
894
                <exclude name="com/saxonica/testdriver/XQTSModuleURIResolver.java"/>
895
                <exclude name="com/saxonica/testdriver/XQTSCollectionURIResolver.java"/>
896
                <exclude name="com/saxonica/testdriver/SchemaTestSuiteDriver.java"/>
897
            </fileset>
898
        </copy>
899

    
900
        <copy todir="${temp-src-prep-test.dir}/eej/com/saxonica/testdriver">
901
            <fileset dir="${source-eej.dir}/com/saxonica/testdriver"/>
902

    
903
        </copy>
904
        <!--<preprocess source="${source-eej.dir}/com/saxonica/testdriver"
905
            destination="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver" verbose="true">
906
            <global name="EE" value="false"/>
907
            <global name="PE" value="false"/>
908
            <global name="OPT" value="false"/>
909
            <global name="DOTNET" value="false"/>
910
        </preprocess>
911
        <replaceregexp match="import com\.saxonica\.config\.EnterpriseConfiguration(.*)" replace=""
912
            flags="g">
913
            <fileset dir="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver"
914
                includes="**/*.java"/>
915
        </replaceregexp>
916
        <replaceregexp match="import com\.saxonica(.*)" replace="" flags="g">
917
            <fileset file="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver/Environment.java"
918
                includes="**/*.java"/>
919
        </replaceregexp>
920
        <replaceregexp match="import net\.sf\.saxon\.option(.*)" replace="" flags="g" byline="true">
921
            <fileset dir="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver"
922
                includes="**/*.java"/>
923
        </replaceregexp>
924
        <replaceregexp match="import com\.saxonica\.config\.ProfessionalConfiguration(.*)"
925
            replace="" flags="g">
926
            <fileset dir="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver"
927
                includes="**/*.java"/>
928
        </replaceregexp>
929
        <replaceregexp match="import com\.saxonica\.config\.EnterpriseTransformerFactory(.*)"
930
            replace="" flags="g">
931
            <fileset dir="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver"
932
                includes="**/*.java"/>
933
        </replaceregexp>-->
934
        <delete
935
            file="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver/SchemaTestSuiteDriver.java"/>
936
        <delete
937
            file="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver/UpdateTestSuiteDriver.java"/>
938
        <delete
939
            file="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver/XQueryTestSuiteDriver.java"/>
940
        <delete
941
            file="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver/XsltTestSuiteDriver.java"/>
942
        <delete file="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver/XMarkBenchmark.java"/>
943
        <echo>Preprocessing test-driver-hej complete!</echo>
944

    
945
        <!--<preprocess source="${source-eej.dir}/com/saxonica/testdriver"
946
            destination="${temp-src-prep-test.dir}/pej/com/saxonica/testdriver" verbose="true">
947
            <global name="EE" value="false"/>
948
            <global name="PE" value="true"/>
949
            <global name="OPT" value="true"/>
950
            <global name="DOTNET" value="false"/>
951
        </preprocess>
952
        <replaceregexp match="import com\.saxonica\.config\.EnterpriseConfiguration(.*)" replace=""
953
            flags="g">
954
            <fileset dir="${temp-src-prep-test.dir}/pej/com/saxonica/testdriver"
955
                includes="**/*.java"/>
956
        </replaceregexp>
957
        <replaceregexp match="import com\.saxonica\.config\.EnterpriseTransformerFactory(.*)"
958
            replace="" flags="g">
959
            <fileset dir="${temp-src-prep-test.dir}/pej/com/saxonica/testdriver"
960
                includes="**/*.java"/>
961
        </replaceregexp>-->
962
        <delete
963
            file="${temp-src-prep-test.dir}/pej/com/saxonica/testdriver/SchemaTestSuiteDriver.java"/>
964
        <delete
965
            file="${temp-src-prep-test.dir}/pej/com/saxonica/testdriver/UpdateTestSuiteDriver.java"/>
966
        <delete
967
            file="${temp-src-prep-test.dir}/pej/com/saxonica/testdriver/XQueryTestSuiteDriver.java"/>
968
        <!--<delete file="${temp-src-prep-test.dir}/pej/XQueryTestSuiteDriver.java" />-->
969
        <echo>Preprocessing test-driver-pej complete!</echo>
970

    
971
        <!--<preprocess source="${source-eej.dir}/com/saxonica/testdriver"
972
            destination="${temp-src-prep-test.dir}/eej/com/saxonica/testdriver" verbose="true">
973
            <global name="EE" value="true"/>
974
            <global name="PE" value="true"/>
975
            <global name="OPT" value="true"/>
976
            <global name="DOTNET" value="false"/>
977
        </preprocess>-->
978
        <echo>Preprocessing test-driver-eej complete!</echo>
979
    </target>
980

    
981
    <target name="testdrivers-j" description="Copy Java Test Drivers">
982
        <mkdir dir="${product.dir}/resources/drivers/java"/>
983

    
984
        <copy todir="${product.dir}/resources/drivers/java">
985
            <fileset dir="${source-eej.dir}">
986
                <include name="com/saxonica/testdriver/ee/*.java"/>
987
                <include name="com/saxonica/testdriver/gui/**"/>
988
                <include name="com/saxonica/testdriver/QT3TestDriverPE.java"/>
989
                <include name="com/saxonica/testdriver/XMarkBenchmark.java"/>
990
                <include name="com/saxonica/testdriver/Xslt30TestSuiteDriver.java"/>
991
         <!-- jwL -->     <!--  <include name="com/saxonica/testdriver/TestDriverShell.java"/> -->
992
                <!-- jwL -->       <include name="com/saxonica/testdriver/Licensor.java"/>
993

    
994
            </fileset>
995
            <fileset dir="${source-hej.dir}">
996
                  <include name="net/sf/saxon/testdriver/*.java"/>
997
            </fileset>
998
        </copy>
999

    
1000
    </target>
1001

    
1002

    
1003
    <target name="product-javadoc" description="Generate Javadoc."
1004
        depends="copysource-development-j">
1005
        <javadoc bottom="Copyright (c) 2004-2014 Saxonica Limited. All rights reserved."
1006
            destdir="${javadoc.dir}" doctitle="Saxon9 Java API Documentation" noindex="false"
1007
            notree="false" access="protected" maxmemory="512M" source="1.5">
1008
            <packageset dir="${temp-src-j.dir}/eej">
1009
                <include name="net/**"/>
1010
                <include name="com/**"/>
1011
                <include name="javax/xml/query/**"/>
1012
                <exclude name="com/saxonica/testdriver/**"/>
1013
                <exclude name="**/dotnet/**"/>
1014
                <exclude name="**/DotNetVerifier.java"/>
1015
            </packageset>
1016
            <packageset dir="${repository}/lib/xqj-final/ri/src"/>
1017
            <classpath>
1018
                <path refid="classpath-j"/>
1019
            </classpath>
1020

    
1021
            <link href="http://download.oracle.com/javase/6/docs/api/"/>
1022
            <link href="http://www.xom.nu/apidocs/"/>
1023

    
1024
            <group title="s9api Interface" packages="net.sf.saxon.s9api"/>
1025
            <group title="Other Interfaces">
1026
                <package name="net.sf.saxon"/>
1027
                <package name="net.sf.saxon.lib"/>
1028
                <package name="net.sf.saxon.om"/>
1029
                <package name="net.sf.saxon.query"/>
1030
                <package name="net.sf.saxon.sxpath"/>
1031
                <package name="net.sf.saxon.value"/>
1032
                <package name="net.sf.saxon.type"/>
1033
                <package name="net.sf.saxon.xpath"/>
1034
                <package name="net.sf.saxon.xqj"/>
1035
                <package name="com.saxonica.config"/>
1036
                <package name="com.saxonica.jaxp"/>
1037
                <package name="com.saxonica.schema"/>
1038

    
1039
            </group>
1040
            <group title="External Interfaces">
1041
                <package name="javax.xml.xquery"/>
1042
            </group>
1043

    
1044

    
1045
        </javadoc>
1046
        <copy file="${userdoc.dir}/saxon9/fixed/javadoc/stylesheet.css"
1047
            tofile="${javadoc.dir}/stylesheet.css" overwrite="true"/>
1048
    </target>
1049

    
1050

    
1051

    
1052

    
1053

    
1054
    <target name="signjars" depends="jar-j, copy-notices, maven, private-signjars, private-maven-signjars"
1055
        description="Sign all JAR files">
1056
        <!-- If the private-signjars task is not available, simply delete the dependency -->
1057
    </target>
1058

    
1059

    
1060
    <target name="j" depends="signjars"
1061
        description="Generate Saxon (all three editions) for the Java platform"/>
1062

    
1063
    <target name="release-j" description="Create .ZIP files for release" depends="j">
1064
        <!-- , test-j -->
1065
        <mkdir dir="${issue.dir}"/>
1066
        <zip zipfile="${issue.dir}/SaxonHE${versionh}J.zip">
1067
            <fileset dir="${product.dir}/hej"/>
1068
        </zip>
1069
        <zip zipfile="${issue.dir}/SaxonPE${versionh}J.zip">
1070
            <fileset dir="${product.dir}/pej"/>
1071
        </zip>
1072
        <zip zipfile="${issue.dir}/SaxonEE${versionh}J.zip">
1073
            <fileset dir="${product.dir}/eej"/>
1074
        </zip>
1075
    </target>
1076

    
1077

    
1078
</project>
(2-2/7)