Project

Profile

Help

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

he / latest9.6 / build / build-j.xml @ 02f8308b

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="build-jd.xml"/> -->
28

    
29

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

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

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

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

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

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

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

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

    
60

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

    
67

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

    
79

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

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

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

    
114

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

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

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

    
147

    
148

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

    
158

    
159

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

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

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

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

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

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

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

    
314
       <echo>Import filtering for PEJ complete.</echo>
315

    
316
    </target>
317

    
318
    <target name="preprocess-eej" depends="copysrc-eej">
319
        <preprocess source="${temp-src-j.dir}/eej" destination="${temp-src-prep-eej.dir}"
320
            verbose="false">
321
            <global name="EE" value="true"/>
322
            <global name="PE" value="false"/>
323
            <global name="STREAM" value="true"/>
324
            <global name="PACKAGES" value="true"/>
325
            <global name="HOF" value="true"/>
326
            <global name="BYTECODE" value="true"/>
327
            <global name="SCHEMA" value="true"/>
328
            <global name="DOTNET" value="false"/>
329
            <global name="OPT" value="false"/>
330
        </preprocess>
331
    </target>
332

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

    
337
        <javac debug="${build.debug}" debuglevel="${build.debuglevel}"
338
            deprecation="${build.deprecation}" destdir="${classes-j.dir}/he"
339
            optimize="${build.optimize}" srcdir="${temp-src-prep-hej.dir}"
340
            source="${build.compiler.source}" target="${build.compiler.target}" fork="true"
341
            memoryinitialsize="256m" memorymaximumsize="256m">
342

    
343
            <include name="net/**"/>
344
            <exclude name="net/sf/saxon/option/**/*.java"/>
345
            <!--<include name="com/saxonica/testdriver/**/*.java"/>-->
346

    
347
            <!--<exclude name="**/dotnet/**"/>-->
348
            <!--<exclude name="com/saxonica/validate/DotNetVerifier.java"/>-->
349
            <classpath>
350
                <path refid="classpath-j"/>
351
            </classpath>
352
        </javac>
353
    </target>
354

    
355
    <target name="compile-pej"
356
        description="Compile Saxon classes for the Java professional edition."
357
        depends="copysource-development-j, preprocess-pej, ICU">
358
        <mkdir dir="${classes-j.dir}/pe"/>
359

    
360
        <javac debug="${build.debug}" debuglevel="${build.debuglevel}"
361
            deprecation="${build.deprecation}" destdir="${classes-j.dir}/pe"
362
            optimize="${build.optimize}" srcdir="${temp-src-prep-pej.dir}"
363
            source="${build.compiler.source}" target="${build.compiler.target}" fork="true"
364
            memoryinitialsize="256m" memorymaximumsize="256m">
365

    
366
            <include name="net/**"/>
367
            <include name="javax/xml/xquery/**"/>
368
            <include name="com/saxonica/**"/>
369

    
370
            <classpath>
371
                <path refid="classpath-j"/>
372
            </classpath>
373
        </javac>
374
    </target>
375

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

    
380
        <javac debug="${build.debug}" debuglevel="${build.debuglevel}"
381
            deprecation="${build.deprecation}" destdir="${classes-j.dir}/ee"
382
            optimize="${build.optimize}" srcdir="${temp-src-prep-eej.dir}"
383
            source="${build.compiler.source}" target="${build.compiler.target}" fork="true"
384
            memoryinitialsize="256m" memorymaximumsize="256m">
385

    
386
            <include name="net/**"/>
387
            <include name="javax/xml/xquery/**"/>
388
            <include name="com/saxonica/**"/>
389

    
390
            <classpath>
391
                <path refid="classpath-j"/>
392
            </classpath>
393
        </javac>
394
    </target>
395

    
396

    
397

    
398

    
399
    <target name="jar-hej" description="Create Saxon-HE jar files for Java" depends="compile-hej">
400
        <mkdir dir="${product.dir}/hej"/>
401
        <mkdir dir="${classes-j.dir}/he"/>
402

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

    
415
        <!-- add data files -->
416
        <jar basedir="${development-data.dir}" compress="${build.compress}"
417
            jarfile="${product.dir}/hej/saxon9he.jar" update="true">
418
            <include name="**"/>
419
        </jar>
420

    
421

    
422

    
423
        <!-- saxon9-test.jar -->
424
        <jar basedir="${product.dir}/resources/drivers/java/classes" compress="${build.compress}"
425
            jarfile="${product.dir}/hej/saxon9-test.jar">
426
            <include name="net/sf/saxon/testdriver/*.class"/>
427
            <!--<include name="com/saxonica/testdriver/gui/*.class"/>-->
428
            <manifest>
429
                <attribute name="Project-Name" value="Saxon-HE-TestDriver"/>
430
                <!--<attribute name="Main-Class" value="com.saxonica.testdriver.gui.TestDriverForm"/>-->
431
            </manifest>
432
        </jar>
433

    
434
        <!--<jar basedir="${source-eej.dir}" compress="${build.compress}"
435
            jarfile="${product.dir}/hej/saxon9-test.jar" update="true">
436
            <include name="com/saxonica/testdriver/gui/images/**"/>
437
        </jar>-->
438

    
439
    </target>
440

    
441
    <target name="jar-pej" description="Create Saxon-PE jar files for Java"
442
        depends="compile-pej, jar-hej">
443
        <mkdir dir="${product.dir}/pej"/>
444
        <mkdir dir="${classes-j.dir}/pe"/>
445

    
446
        <copy todir="${product.dir}/pej">
447
            <fileset dir="${product.dir}/hej">
448
                <include name="saxon9-unpack.jar"/>
449
            </fileset>
450
        </copy>
451

    
452
        <jar basedir="${classes-j.dir}/pe" compress="${build.compress}"
453
            jarfile="${product.dir}/pej/saxon9pe.jar">
454
            <include name="net/**/*.class"/>
455
            <exclude name="net/sf/saxon/ant/*.class"/>
456
            <exclude name="**/sql/**/*.class"/>
457

    
458
            <include name="com/saxonica/**/*.class"/>
459
            <exclude name="com/saxonica/ee/**/*.class"/>
460
            <exclude name="com/saxonica/expr/CastToUnion.class"/>
461
            <exclude name="com/saxonica/expr/CastableToUnion.class"/>
462
            <exclude name="com/saxonica/expr/CastToList.class"/>
463
            <exclude name="com/saxonica/expr/CastableToList.class"/>
464
            <exclude name="com/saxonica/Validate.class"/>
465
            <exclude name="com/saxonica/CompileStylesheet.class"/>
466
            <exclude name="com/saxonica/CompileStylesheet$TracingObjectOutputStream.class"/>
467
            <exclude name="com/saxonica/config/EnterpriseConfiguration.class"/>
468
            <exclude name="com/saxonica/config/EnterpriseConfiguration$SurrogateSchema.class"/>
469
            <exclude name="com/saxonica/config/EnterpriseTransformerFactory.class"/>
470
            <exclude name="com/saxonica/config/EnterpriseXPathFactory.class"/>
471

    
472
            <include name="javax/xml/xquery/*.class"/>
473

    
474
            <manifest>
475
                <attribute name="Project-Name" value="Saxon-PE"/>
476
                <attribute name="Main-Class" value="net.sf.saxon.Transform"/>
477
            </manifest>
478
            <metainf dir="${services.dir}/saxon9pe/META-INF"/>
479

    
480
        </jar>
481
        
482
        <!-- add data files -->
483
        <jar basedir="${development-data.dir}" compress="${build.compress}"
484
            jarfile="${product.dir}/pej/saxon9pe.jar" update="true">
485
            <include name="**"/>
486
        </jar>
487

    
488
        <!-- Include the ICU classes which have been built separately, either in the main JAR or in a subsidiary -->
489
        <jar unless:true="${ICU.separate.JARS}" basedir="${icu4j.classes.dir}"
490
            compress="${build.compress}" jarfile="${product.dir}/pej/saxon9pe.jar" update="true">
491
            <include name="**"/>
492
        </jar>
493
        <jar if:true="${ICU.separate.JARS}" basedir="${icu4j.classes.dir}" compress="${build.compress}"
494
            jarfile="${product.dir}/pej/saxon9-icu.jar">
495
            <include name="**"/>
496
        </jar>
497

    
498
        <!-- <jar basedir="${classes-j.dir}/pe" compress="${build.compress}" jarfile="${product.dir}/pej/saxon9pe.jar" update="true">
499
            <include name="edition.properties"/>
500
        </jar>  -->
501
        <jar basedir="${classes-j.dir}/pe" compress="${build.compress}"
502
            jarfile="${product.dir}/pej/saxon9-sql.jar">
503
            <include name="net/sf/saxon/option/sql/*.class"/>
504
        </jar>
505

    
506
        <jar basedir="${classes-j.dir}/pe" compress="${build.compress}"
507
            jarfile="${product.dir}/pej/saxon9-sql.jar">
508
            <include name="net/sf/saxon/option/sql/*.class"/>
509
        </jar>
510

    
511

    
512

    
513
        <!-- saxon9pe-test.jar -->
514
        <jar basedir="${product.dir}/resources/drivers/java/classes" compress="${build.compress}"
515
            jarfile="${product.dir}/pej/saxon9pe-test.jar">
516
            <include name="net/sf/saxon/testdriver/*.class"/>
517
            <include name="com/saxonica/testdriver/gui/*.class"/>
518
            <include name="com/saxonica/testdriver/*.class"/>
519
            <include name="com/saxonica/testdriver/gui/images/**"/>
520
            <manifest>
521
                <attribute name="Project-Name" value="Saxon-PE-TestDriver"/>
522
                <attribute name="Main-Class" value="com.saxonica.testdriver.gui.TestDriverForm"/>
523
            </manifest>
524
        </jar>
525

    
526
        <!-- <jar basedir="${source-eej.dir}" compress="${build.compress}"
527
            jarfile="${product.dir}/pej/saxon9pe-test.jar" update="true">
528
            <include name="com/saxonica/testdriver/gui/images/**"/>
529
        </jar>   -->
530

    
531
    </target>
532

    
533

    
534
    <target name="jar-eej" description="Create Saxon-EE jar files for Java" depends="compile-eej">
535
        <mkdir dir="${product.dir}/eej"/>
536
        <mkdir dir="${classes-j.dir}/ee"/>
537

    
538

    
539
        <!-- saxon9-unpack.jar -->
540
        <jar basedir="${classes-j.dir}/ee" compress="${build.compress}"
541
            jarfile="${product.dir}/eej/saxon9-unpack.jar">
542
            <include name="com/saxonica/ptree/PTreeReader.class"/>
543
            <include name="com/saxonica/ptree/PTreeReader$PTreeException.class"/>
544
            <include name="com/saxonica/ptree/TextMangler.class"/>
545
            <include name="com/saxonica/ptree/TextObfuscator.class"/>
546
            <include name="com/saxonica/ptree/PackageURIResolver.class"/>
547
        </jar>
548

    
549
        <copy todir="${product.dir}/hej" file="${product.dir}/eej/saxon9-unpack.jar" />
550

    
551
        <copy todir="${product.dir}/pej" file="${product.dir}/eej/saxon9-unpack.jar" />
552

    
553

    
554
        <copy todir="${product.dir}/eej">
555
            <fileset dir="${product.dir}/pej">
556
                <include name="saxon9-sql.jar"/>
557
                <include if:true="${ICU.separate.JARS}" name="saxon9-icu.jar"/>
558
            </fileset>
559
        </copy>
560

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

    
564
        <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
565
            classpath="../lib/jarjar-1.1.jar"/>
566
        <jarjar basedir="${classes-j.dir}/ee" compress="${build.compress}"
567
            jarfile="${product.dir}/eej/saxon9ee.jar">
568
            <include name="net/**/*.class"/>
569
            <exclude name="**/sql/**/*.class"/>
570
            <include name="com/saxonica/**/*.class"/>
571
            <include name="javax/xml/xquery/*.class"/>
572
            <rule pattern="org.objectweb.**" result="com.saxonica.objectweb.@1"/>
573
            <manifest>
574
                <attribute name="Project-Name" value="Saxon-EE"/>
575
                <attribute name="Main-Class" value="net.sf.saxon.Transform"/>
576
            </manifest>
577
            <metainf dir="${services.dir}/saxon9ee/META-INF"/>
578
            <!-- </jar> -->
579
        </jarjar>
580

    
581
        <!-- Include the ICU classes which have been built separately, unless they are in a separate JAR -->
582
        <jar unless:true="${ICU.separate.JARS}" basedir="${icu4j.classes.dir}" compress="${build.compress}"
583
            jarfile="${product.dir}/eej/saxon9ee.jar" update="true">
584
            <include name="**"/>
585
        </jar>
586

    
587
        <!-- Include the ASM library, renamed into Saxonica space to avoid conflict with other versions -->
588
        <jarjar compress="${build.compress}" jarfile="${product.dir}/eej/saxon9ee.jar" update="true">
589
            <zipfileset src="${lib.dir}/asm-${asm.version}.jar"/>
590
            <zipfileset src="${lib.dir}/asm-analysis-${asm.version}.jar"/>
591
            <zipfileset src="${lib.dir}/asm-commons-${asm.version}.jar"/>
592
            <zipfileset src="${lib.dir}/asm-tree-${asm.version}.jar"/>
593
            <zipfileset src="${lib.dir}/asm-util-${asm.version}.jar"/>
594
            <rule pattern="org.objectweb.**" result="com.saxonica.objectweb.@1"/>
595
        </jarjar>
596

    
597
        <!--<jar basedir="${classes-j.dir}/ee" compress="${build.compress}" jarfile="${product.dir}/eej/saxon9ee.jar" update="true">
598
            <include name="edition.properties"/>
599
        </jar>      -->
600
        <jar basedir="${development-data.dir}" compress="${build.compress}"
601
            jarfile="${product.dir}/eej/saxon9ee.jar" update="true">
602
            <include name="**"/>
603
        </jar>
604

    
605

    
606
        <!-- saxon9ee-test.jar -->
607
        <jar basedir="${product.dir}/resources/drivers/java/classes" compress="${build.compress}"
608
            jarfile="${product.dir}/eej/saxon9ee-test.jar">
609
            <include name="net/sf/saxon/testdriver/*.class"/>
610
            <include name="com/saxonica/testdriver/gui/*.class"/>
611
            <include name="com/saxonica/testdriver/*.class"/>
612
            <include name="com/saxonica/testdriver/gui/images/**"/>
613
            <manifest>
614
                <attribute name="Project-Name" value="Saxon-EE-TestDriver"/>
615
                <attribute name="Main-Class" value="com.saxonica.testdriver.gui.TestDriverForm"/>
616
            </manifest>
617
        </jar>
618

    
619
    </target>
620

    
621

    
622
    <target name="maven" description="Build files ready for maven" depends="copysource-development-j, jar-eej,compile-hej">
623
       <mkdir dir="${product.dir}/maven" />
624
        <mkdir dir="${product.dir}/maven/javadoc" />
625

    
626
       <copyfile dest="${product.dir}/maven/Saxon-HE-${version.maven}.pom" src="../maven/${version}/Saxon-HE-${version.maven}.pom" />
627
       <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="../lib/jarjar-1.1.jar"/>
628
       <jar basedir="${temp-src-prep-hej.dir}" compress="true" jarfile="${product.dir}/maven/Saxon-HE-${version.maven}-sources.jar">
629
           <include name="net/**/*.java"/>
630
           <include name="net/**/package.html"/>
631
      </jar>
632

    
633
      <jar basedir="${classes-j.dir}" compress="${build.compress}" jarfile="${product.dir}/maven/Saxon-HE-${version.maven}.jar">
634
            <include name="net/**/*.class"/>
635
            <exclude name="net/sf/saxon/option/**/*.class"/>
636
            <!--<exclude name="**/javax/**/*.class"/>
637
            <exclude name="**/xpath/**/*.class"/>-->
638
            <exclude name="**/xqj/**/*.class"/>
639
            <include name="javax/xml/xquery/*.class"/>
640
            <include name="META-INF/**"/>
641
            <manifest>
642
                <attribute name="Project-Name" value="Saxon-HE"/>
643
                <attribute name="Main-Class" value="net.sf.saxon.Transform"/>
644
            </manifest>
645
            <metainf dir="${services.dir}/saxon9he/META-INF"/>
646
            <!--<metainf dir="${services.dir}/saxon9-xpath/META-INF"/>-->
647
            <!--
648
            <service type="javax.xml.transform.TransformerFactory"
649
                provider="net.sf.saxon.TransformerFactoryImpl"/>
650
            -->
651
        </jar>
652

    
653
        <jar basedir="${classes-j.dir}" compress="${build.compress}" jarfile="${product.dir}/maven/Saxon-HE-${version.maven}-xqj.jar">
654
            <include name="**/xqj/**/*.class"/>
655
        </jar>
656

    
657
        <jar basedir="${development-data.dir}" compress="${build.compress}" jarfile="${product.dir}/maven/Saxon-HE-${version.maven}.jar" update="true">
658
            <include name="**"/>
659
        </jar>
660
        <!-- saxon9-unpack.jar -->
661
        <jar basedir="${classes-j.dir}/ee" compress="${build.compress}" jarfile="${product.dir}/maven/Saxon-HE-${version.maven}-unpack.jar" update="true">
662
            <include name="com/saxonica/ptree/PTreeReader.class"/>
663
            <include name="com/saxonica/ptree/PTreeReader$PTreeException.class"/>
664
            <include name="com/saxonica/ptree/TextMangler.class"/>
665
            <include name="com/saxonica/ptree/TextObfuscator.class"/>
666
            <include name="com/saxonica/ptree/PackageURIResolver.class"/>
667
        </jar>
668

    
669
        <jar basedir="${classes-j.dir}" compress="true" jarfile="${product.dir}/maven/Saxon-HE-${version.maven}-compressed.jar">
670
            <include name="net/**/*.class"/>
671
            <exclude name="net/sf/saxon/option/**/*.class"/>
672
            <!--<exclude name="**/javax/**/*.class"/>
673
            <exclude name="**/xpath/**/*.class"/>-->
674
            <exclude name="**/xqj/**/*.class"/>
675
            <include name="javax/xml/xquery/*.class"/>
676
            <include name="META-INF/**"/>
677
            <manifest>
678
                <attribute name="Project-Name" value="Saxon-HE"/>
679
                <attribute name="Main-Class" value="net.sf.saxon.Transform"/>
680
            </manifest>
681
            <metainf dir="${services.dir}/saxon9he/META-INF"/>
682
            <!--<metainf dir="${services.dir}/saxon9-xpath/META-INF"/>-->
683
            <!--
684
            <service type="javax.xml.transform.TransformerFactory"
685
                provider="net.sf.saxon.TransformerFactoryImpl"/>
686
            -->
687
        </jar>
688

    
689

    
690
        <javadoc bottom="Copyright (c) 2004-2014 Saxonica Limited. All rights reserved."
691
            destdir="${product.dir}/maven/javadoc" doctitle="Saxon9 Java API Documentation" noindex="false"
692
            notree="false" access="protected" maxmemory="512M" source="1.5">
693
            <packageset dir="${temp-src-j.dir}/hej">
694
                <include name="net/**"/>
695

    
696
                <include name="javax/xml/query/**"/>
697
                <exclude name="net/sf/saxon/testdriver/**"/>
698
                <exclude name="**/dotnet/**"/>
699
                <exclude name="**/DotNetVerifier.java"/>
700
            </packageset>
701
            <packageset dir="${repository}/lib/xqj-final/ri/src"/>
702
            <classpath>
703
                <path refid="classpath-j"/>
704
            </classpath>
705

    
706
            <link href="http://download.oracle.com/javase/6/docs/api/"/>
707
            <link href="http://www.xom.nu/apidocs/"/>
708

    
709
            <group title="s9api Interface" packages="net.sf.saxon.s9api"/>
710
            <group title="Other Interfaces">
711
                <package name="net.sf.saxon"/>
712
                <package name="net.sf.saxon.lib"/>
713
                <package name="net.sf.saxon.om"/>
714
                <package name="net.sf.saxon.query"/>
715
                <package name="net.sf.saxon.sxpath"/>
716
                <package name="net.sf.saxon.value"/>
717
                <package name="net.sf.saxon.type"/>
718
                <package name="net.sf.saxon.xpath"/>
719
                <package name="net.sf.saxon.xqj"/>
720

    
721
            </group>
722
            <group title="External Interfaces">
723
                <package name="javax.xml.xquery"/>
724
            </group>
725

    
726

    
727
        </javadoc>
728

    
729
        <copy file="${userdoc.dir}/fixed/javadoc/stylesheet.css"
730
            tofile="${product.dir}/maven/javadoc/stylesheet.css" overwrite="true"/>
731

    
732
        <jar basedir="${product.dir}/maven/javadoc" compress="true" jarfile="${product.dir}/maven/Saxon-HE-${version.maven}-javadoc.jar" update="true">
733
            <include name="**/*" />
734
        </jar>
735

    
736
       <delete dir="${product.dir}/maven/javadoc" />
737

    
738
                <!-- add data files -->
739
        <jar basedir="${development-data.dir}" compress="true" jarfile="${product.dir}/maven/Saxon-HE-${version.maven}-compressed.jar" update="true">
740
            <include name="**"/>
741
        </jar>
742
    </target>
743

    
744

    
745
    
746
    <target name="jar-j" depends="jar-hej, jar-pej, jar-eej"/>
747

    
748
    <target name="samples-j" description="Copy and Compile Java Samples"
749
        depends="samples-common">           <!-- Could jar-eej be removed? DL 2014-09-11 -->
750
        <mkdir dir="${product.dir}/resources/samples/java"/>
751
        <mkdir dir="${product.dir}/resources/samples/java/classes"/>
752
        <copy todir="${product.dir}/resources/samples/java">
753
            <fileset dir="${samples.dir}/java">
754
                <include name="ApplyXPathJAXP.java"/>
755
                <include name="ExampleContentHandler.java"/>
756
                <include name="JDOM2Example.java"/>
757
                <include name="PullExamples.java"/>
758
                <include name="QueryAPIExamples.java"/>
759
                <include name="QuickValidator.java"/>
760
                <include name="S9APIExamples.java"/>
761
                <include name="SaxonServlet.java"/>
762
                <include name="SaxonSAServlet.java"/>
763
                <include name="SchemaValidatorExample.java"/>
764
                <include name="SchemaValidatorHandlerExample.java"/>
765
                <include name="JAXPExamples.java"/>
766
                <include name="XMarkBenchmark.java"/>
767
                <include name="XPathExample.java"/>
768
                <include name="XPathExampleDOM.java"/>
769
                <include name="XPathExampleSA.java"/>
770
                <include name="XPathExampleServlet.java"/>
771
                <include name="XQJExamples.java"/>
772
            </fileset>
773
        </copy>
774
        <javac debug="true" debuglevel="${build.debuglevel}"
775
            destdir="${product.dir}/resources/samples/java/classes"
776
            srcdir="${product.dir}/resources/samples/java" source="${build.compiler.source}"
777
            target="${build.compiler.target}" includeantruntime="false">
778
            <include name="*.java"/>
779
            <classpath>
780
                <path refid="classpath-samples"/>
781
            </classpath>
782
        </javac>
783
    </target>
784

    
785
    <target name="preprocess-testdriver-j">
786
        <mkdir dir="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver"/>
787
        <mkdir dir="${temp-src-prep-test.dir}/pej/com/saxonica/testdriver"/>
788
        <mkdir dir="${temp-src-prep-test.dir}/eej/com/saxonica/testdriver"/>
789
        <copy todir="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver">
790
            <fileset dir="${source-eej.dir}/com/saxonica/testdriver">
791
                <exclude name="com/saxonica/testdriver/FOTestSuiteDriver.java"/>
792
                <exclude name="com/saxonica/testdriver/XQueryTestSuiteDriver.java"/>
793
                <exclude name="com/saxonica/testdriver/XsltTestSuiteDriver.java"/>
794
                <exclude name="com/saxonica/testdriver/XQTSModuleURIResolver.java"/>
795
                <exclude name="com/saxonica/testdriver/XQTSCollectionURIResolver.java"/>
796
                <exclude name="com/saxonica/testdriver/SchemaTestSuiteDriver.java"/>
797
            </fileset>
798
        </copy>
799

    
800
        <copy todir="${temp-src-prep-test.dir}/pej/com/saxonica/testdriver">
801
            <fileset dir="${source-eej.dir}/com/saxonica/testdriver">
802
                <exclude name="com/saxonica/testdriver/XsltTestSuiteDriver.java"/>
803
                <exclude name="com/saxonica/testdriver/XQTSModuleURIResolver.java"/>
804
                <exclude name="com/saxonica/testdriver/XQTSCollectionURIResolver.java"/>
805
                <exclude name="com/saxonica/testdriver/SchemaTestSuiteDriver.java"/>
806
            </fileset>
807
        </copy>
808

    
809
        <copy todir="${temp-src-prep-test.dir}/eej/com/saxonica/testdriver">
810
            <fileset dir="${source-eej.dir}/com/saxonica/testdriver"/>
811

    
812
        </copy>
813
        <!--<preprocess source="${source-eej.dir}/com/saxonica/testdriver"
814
            destination="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver" verbose="true">
815
            <global name="EE" value="false"/>
816
            <global name="PE" value="false"/>
817
            <global name="OPT" value="false"/>
818
            <global name="DOTNET" value="false"/>
819
        </preprocess>
820
        <replaceregexp match="import com\.saxonica\.config\.EnterpriseConfiguration(.*)" replace=""
821
            flags="g">
822
            <fileset dir="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver"
823
                includes="**/*.java"/>
824
        </replaceregexp>
825
        <replaceregexp match="import com\.saxonica(.*)" replace="" flags="g">
826
            <fileset file="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver/Environment.java"
827
                includes="**/*.java"/>
828
        </replaceregexp>
829
        <replaceregexp match="import net\.sf\.saxon\.option(.*)" replace="" flags="g" byline="true">
830
            <fileset dir="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver"
831
                includes="**/*.java"/>
832
        </replaceregexp>
833
        <replaceregexp match="import com\.saxonica\.config\.ProfessionalConfiguration(.*)"
834
            replace="" flags="g">
835
            <fileset dir="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver"
836
                includes="**/*.java"/>
837
        </replaceregexp>
838
        <replaceregexp match="import com\.saxonica\.config\.EnterpriseTransformerFactory(.*)"
839
            replace="" flags="g">
840
            <fileset dir="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver"
841
                includes="**/*.java"/>
842
        </replaceregexp>-->
843
        <delete
844
            file="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver/SchemaTestSuiteDriver.java"/>
845
        <delete
846
            file="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver/UpdateTestSuiteDriver.java"/>
847
        <delete
848
            file="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver/XQueryTestSuiteDriver.java"/>
849
        <delete
850
            file="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver/XsltTestSuiteDriver.java"/>
851
        <delete file="${temp-src-prep-test.dir}/hej/com/saxonica/testdriver/XMarkBenchmark.java"/>
852
        <echo>Preprocessing test-driver-hej complete!</echo>
853

    
854
        <!--<preprocess source="${source-eej.dir}/com/saxonica/testdriver"
855
            destination="${temp-src-prep-test.dir}/pej/com/saxonica/testdriver" verbose="true">
856
            <global name="EE" value="false"/>
857
            <global name="PE" value="true"/>
858
            <global name="OPT" value="true"/>
859
            <global name="DOTNET" value="false"/>
860
        </preprocess>
861
        <replaceregexp match="import com\.saxonica\.config\.EnterpriseConfiguration(.*)" replace=""
862
            flags="g">
863
            <fileset dir="${temp-src-prep-test.dir}/pej/com/saxonica/testdriver"
864
                includes="**/*.java"/>
865
        </replaceregexp>
866
        <replaceregexp match="import com\.saxonica\.config\.EnterpriseTransformerFactory(.*)"
867
            replace="" flags="g">
868
            <fileset dir="${temp-src-prep-test.dir}/pej/com/saxonica/testdriver"
869
                includes="**/*.java"/>
870
        </replaceregexp>-->
871
        <delete
872
            file="${temp-src-prep-test.dir}/pej/com/saxonica/testdriver/SchemaTestSuiteDriver.java"/>
873
        <delete
874
            file="${temp-src-prep-test.dir}/pej/com/saxonica/testdriver/UpdateTestSuiteDriver.java"/>
875
        <delete
876
            file="${temp-src-prep-test.dir}/pej/com/saxonica/testdriver/XQueryTestSuiteDriver.java"/>
877
        <!--<delete file="${temp-src-prep-test.dir}/pej/XQueryTestSuiteDriver.java" />-->
878
        <echo>Preprocessing test-driver-pej complete!</echo>
879

    
880
        <!--<preprocess source="${source-eej.dir}/com/saxonica/testdriver"
881
            destination="${temp-src-prep-test.dir}/eej/com/saxonica/testdriver" verbose="true">
882
            <global name="EE" value="true"/>
883
            <global name="PE" value="true"/>
884
            <global name="OPT" value="true"/>
885
            <global name="DOTNET" value="false"/>
886
        </preprocess>-->
887
        <echo>Preprocessing test-driver-eej complete!</echo>
888
    </target>
889

    
890
    <target name="testdrivers-j" description="Copy Java Test Drivers">
891
        <mkdir dir="${product.dir}/resources/drivers/java"/>
892
        <mkdir dir="${product.dir}/resources/drivers/java/classes"/>
893
        <copy todir="${product.dir}/resources/drivers/java">
894
            <fileset dir="${source-eej.dir}">
895
                <include name="com/saxonica/testdriver/ee/*.java"/>
896
                <include name="com/saxonica/testdriver/gui/**"/>
897
                <include name="com/saxonica/testdriver/QT3TestDriverPE.java"/>
898
                <include name="com/saxonica/testdriver/XMarkBenchmark.java"/>
899
                <include name="com/saxonica/testdriver/Xslt30TestSuiteDriver.java"/>
900
         <!-- jwL -->     <!--  <include name="com/saxonica/testdriver/TestDriverShell.java"/> -->
901
                <!-- jwL -->       <include name="com/saxonica/testdriver/Licensor.java"/>
902

    
903
            </fileset>
904
            <fileset dir="${source-hej.dir}">
905
                  <include name="net/sf/saxon/testdriver/*.java"/>
906
            </fileset>
907
        </copy>
908
        <javac debug="true" debuglevel="${build.debuglevel}"
909
            destdir="${product.dir}/resources/drivers/java/classes"
910
            srcdir="${product.dir}/resources/drivers/java" source="${build.compiler.source}"
911
            target="${build.compiler.target}">
912
            <include name="**/*.java"/>
913
            <classpath>
914
                <path refid="classpath-samples"/>
915
            </classpath>
916
        </javac>
917
    </target>
918

    
919

    
920
    <target name="product-javadoc" description="Generate Javadoc."
921
        depends="copysource-development-j">
922
        <javadoc bottom="Copyright (c) 2004-2014 Saxonica Limited. All rights reserved."
923
            destdir="${javadoc.dir}" doctitle="Saxon9 Java API Documentation" noindex="false"
924
            notree="false" access="protected" maxmemory="512M" source="1.5">
925
            <packageset dir="${temp-src-j.dir}/eej">
926
                <include name="net/**"/>
927
                <include name="com/**"/>
928
                <include name="javax/xml/query/**"/>
929
                <exclude name="com/saxonica/testdriver/**"/>
930
                <exclude name="**/dotnet/**"/>
931
                <exclude name="**/DotNetVerifier.java"/>
932
            </packageset>
933
            <packageset dir="${repository}/lib/xqj-final/ri/src"/>
934
            <classpath>
935
                <path refid="classpath-j"/>
936
            </classpath>
937

    
938
            <link href="http://download.oracle.com/javase/6/docs/api/"/>
939
            <link href="http://www.xom.nu/apidocs/"/>
940

    
941
            <group title="s9api Interface" packages="net.sf.saxon.s9api"/>
942
            <group title="Other Interfaces">
943
                <package name="net.sf.saxon"/>
944
                <package name="net.sf.saxon.lib"/>
945
                <package name="net.sf.saxon.om"/>
946
                <package name="net.sf.saxon.query"/>
947
                <package name="net.sf.saxon.sxpath"/>
948
                <package name="net.sf.saxon.value"/>
949
                <package name="net.sf.saxon.type"/>
950
                <package name="net.sf.saxon.xpath"/>
951
                <package name="net.sf.saxon.xqj"/>
952
                <package name="com.saxonica.config"/>
953
                <package name="com.saxonica.jaxp"/>
954
                <package name="com.saxonica.schema"/>
955

    
956
            </group>
957
            <group title="External Interfaces">
958
                <package name="javax.xml.xquery"/>
959
            </group>
960

    
961

    
962
        </javadoc>
963
        <copy file="${userdoc.dir}/fixed/javadoc/stylesheet.css"
964
            tofile="${javadoc.dir}/stylesheet.css" overwrite="true"/>
965
    </target>
966

    
967

    
968

    
969

    
970

    
971
    <target name="signjars" depends="jar-hej, jar-pej, jar-eej, maven, private-signjars, private-maven-signjars"
972
        description="Sign all JAR files">
973
        <!-- If the private-signjars task is not available, simply delete the dependency -->
974
    </target>
975

    
976

    
977
    <target name="j" depends="signjars"
978
        description="Generate Saxon (all three editions) for the Java platform"/>
979

    
980
    <target name="release-j" description="Create .ZIP files for release" depends="j">
981
        <!-- , test-j -->
982
        <mkdir dir="${issue.dir}"/>
983
        <zip zipfile="${issue.dir}/SaxonHE${versionh}J.zip">
984
            <fileset dir="${product.dir}/hej"/>
985
        </zip>
986
        <zip zipfile="${issue.dir}/SaxonPE${versionh}J.zip">
987
            <fileset dir="${product.dir}/pej"/>
988
        </zip>
989
        <zip zipfile="${issue.dir}/SaxonEE${versionh}J.zip">
990
            <fileset dir="${product.dir}/eej"/>
991
        </zip>
992
    </target>
993

    
994

    
995
</project>
(2-2/9)