Project

Profile

Help

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

he / latest9.3 / build / build.xml @ 34aee363

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

    
3
<project basedir="." default="all" name="Saxon: The XSLT and XQuery Processor"
4
         xmlns:dn="antlib:org.apache.ant.dotnet">
5
    
6
    
7
    <!-- note : Ant 1.7 is needed for this script -->
8
    
9
    <!-- Ant 1.7 introduces a <service> element to allow META-INF/services
10
         directories to be created in JAR files. Unfortunately it is broken,
11
         see http://issues.apache.org/bugzilla/show_bug.cgi?id=41201. The relevant
12
         code here is retained in the form of comments, and can be reinstated
13
         when the bug is fixed. Meanwhile the directories are created manually -->
14
    
15
    <!-- Build file for Saxon. This builds all six for the released products:
16
         Saxon-HE, -PE, and -EE, on both the Java and .NET platforms. It also builds
17
         the released resources file. A full build requires access to Saxonica
18
         proprietary source code. The open source Saxon-HE product can be built for
19
         Java using target "hej"; but building Saxon-HE for .NET may require some
20
         disentangling of tasks that depend on Saxon-EE code being present. -->
21
         
22
    <!-- Useful targets:
23
    
24
         prepare      clears temporary directories, generates fixed files
25
         j            builds executables for Saxon on Java
26
         n            builds executables for Saxon on .NET
27
         build        builds all executables
28
         resources    builds samples and documentation
29
         release      builds ZIP files for published downloads, runs regression tests
30
         archive      produces a back-up archive  -->
31
             
32
         
33
    <!-- Naming conventions:
34
         -n   : .NET
35
         -j   : Java
36
         -he  : Home Edition
37
         -pe  : Professional Edition
38
         -ee  : Enterprise Edition
39
         combined as appropriate, so -pej denotes Saxon-PE on the Java platform
40
    -->
41
    
42
    <import file="build-constants.xml"/>
43
    
44
    <!-- If building for only one platform, 
45
       (a) remove one of the imports below
46
       (b) remove dependencies on targets in that build file, which are always suffixed -j or -n respectively 
47
    -->
48
       
49
    <import file="build-j.xml"/>
50
    <import file="build-n.xml"/>     
51
    <import file="test-j.xml"/>
52
    <import file="test-n.xml"/>     
53
    
54

    
55
    
56
    <target name="clean" description="Clean all files other than source code and downloaded jars.">
57
        <delete dir="${temp.dir}"/>
58
        <delete dir="${product.dir}"/>
59
        <mkdir dir="${product.dir}"/>
60
    </target>
61
    
62
    <target name="prepare" description="Create 'fixed' files in build libraries"
63
      depends="clean, prepare-n, prepare-j"/>
64
      
65
    
66
    <target name="download" description="Download third-party jar files.">
67
        <get src="http://mirrors.ibiblio.org/pub/mirrors/maven2/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar"
68
            dest="${lib.dir}/dom4j-1.6.1.jar" verbose="true"/>
69

    
70
        <get src="http://www.ibiblio.org/maven/jdom/jars/jdom-1.0.jar"
71
            dest="${lib.dir}/jdom-1.0.jar" verbose="true"/>
72

    
73
        <get src="http://www.cafeconleche.org/XOM/xom-1.2.6.jar" dest="${lib.dir}/xom-1.2.6.jar"
74
            verbose="true"/>
75
            
76
        <get src="http://dist.codehaus.org/stax/jars/stax-api-1.0.1.jar" dest="${lib.dir}/stax-api-1.0.1.jar"
77
            verbose="true"/> 
78
            
79
            <!-- TODO: add servlet.jar, ant.jar -->   
80
            
81
    </target>                   
82
    
83
    <target name="samples-common" description="Assemble Cross-Platform Samples and Use-Cases">
84
            <mkdir dir="${build-resources.dir}/samples"/>
85
      <copy todir="${product.dir}/resources/use-cases">
86
        <fileset dir="${usecases.dir}"/>
87
      </copy>
88
      <copy todir="${product.dir}/resources/samples">
89
        <fileset dir="${samples.dir}">
90
          <!-- stuff tends to gather in samples, so only select what's needed to be issued -->
91
          <include name="analysis/timing-profile.xsl"/>
92
          <include name="config/config.xml"/>
93
          <include name="data/books.xml"/>
94
          <include name="data/othello.xml"/>
95
          <include name="data/books.xsd"/>
96
          <include name="data/books.dtd"/>
97
          <include name="data/play.dtd"/>
98
          <include name="query/tour.xq"/>
99
          <include name="query/books.xq"/>
100
          <include name="query/books-to-html.xq"/>
101
          <include name="scm/scmschema.*"/>
102
          <include name="styles/books.xsl"/>
103
          <include name="styles/books.txt"/>
104
          <include name="styles/play.xsl"/>
105
          <include name="styles/identity.xsl"/>
106
          <include name="styles/books-csv.xsl"/>
107
          <include name="styles/books-sa.xsl"/>
108
          <include name="styles/books-sql.xsl"/>
109
          <include name="styles/tour.xsl"/>
110
          <include name="styles/summarize.xsl"/>
111
          <include name="trax/xml/**/*.xml"/>
112
          <include name="trax/xsl/**/*.xsl"/>
113
          <include name="trax/xsl/**/preamble.txt"/>
114
          <include name="trax/xsl/**/postamble.txt"/>
115
        </fileset>
116
      </copy>
117
    </target>
118
    
119
    <!-- The Saxonica build creates a cross-platform samples directory, but it's separated
120
         by platform in case a platform-specific build is needed -->
121
    
122
    
123
    <target name="samples" depends="samples-j, samples-n"/>
124
    
125

    
126
   
127
    
128
    <target name="release-userdoc" description="Generate User Documentation">
129
          <copy todir="${build-resources.dir}/doc">
130
        <fileset dir="${userdoc.dir}/fixed"/>
131
      </copy>
132
      <copy todir="${build-resources.dir}/doc">
133
        <fileset dir="${userdoc.dir}/style">
134
            <include name="make-menu.xsl"/>
135
        </fileset>
136
      </copy> 
137
          <copy todir="${product.dir}/hej">
138
        <fileset dir="${userdoc.dir}/welcome">
139
          <include name="doc/**"/>
140
          <include name="notices/CERN.txt"/>
141
          <include name="notices/JAMESCLARK.txt"/>
142
          <include name="notices/LEGAL.txt"/>
143
          <include name="notices/LICENSE.txt"/>
144
          <include name="notices/THAI.txt"/>
145
          <include name="notices/UNICODE.txt"/>
146
        </fileset>
147
      </copy>
148
      <copy todir="${product.dir}/pej">
149
        <fileset dir="${userdoc.dir}/welcome">
150
          <include name="doc/**"/>
151
          <include name="notices/CERN.txt"/>
152
          <include name="notices/JAMESCLARK.txt"/>
153
          <include name="notices/LEGAL.txt"/>
154
          <include name="notices/LICENSE.txt"/>
155
          <include name="notices/THAI.txt"/>
156
          <include name="notices/UNICODE.txt"/>
157
        </fileset>
158
      </copy>
159
      <copy todir="${product.dir}/eej">
160
        <fileset dir="${userdoc.dir}/welcome">
161
          <include name="doc/**"/>
162
          <include name="notices/CERN.txt"/>
163
          <include name="notices/JAMESCLARK.txt"/>
164
          <include name="notices/LEGAL.txt"/>
165
          <include name="notices/LICENSE.txt"/>
166
          <include name="notices/THAI.txt"/>
167
          <include name="notices/UNICODE.txt"/>
168
        </fileset>
169
      </copy>
170
      <copy todir="${product.dir}/hen">
171
        <fileset dir="${userdoc.dir}/welcome">
172
          <include name="doc/**"/>
173
          <include name="notices/CERN.txt"/>
174
          <include name="notices/JAMESCLARK.txt"/>
175
          <include name="notices/LEGAL.txt"/>
176
          <include name="notices/LICENSE.txt"/>
177
          <include name="notices/THAI.txt"/>
178
          <include name="notices/UNICODE.txt"/>
179
          <include name="notices/APACHE-XERCES.txt"/>
180
          <include name="notices/FRIJTERS.txt"/>
181
          <include name="notices/GPL+CLASSPATH.txt"/>
182
        </fileset>
183
      </copy>
184
      <copy todir="${product.dir}/pen">
185
        <fileset dir="${userdoc.dir}/welcome">
186
          <include name="doc/**"/>
187
          <include name="notices/CERN.txt"/>
188
          <include name="notices/JAMESCLARK.txt"/>
189
          <include name="notices/LEGAL.txt"/>
190
          <include name="notices/LICENSE.txt"/>
191
          <include name="notices/THAI.txt"/>
192
          <include name="notices/UNICODE.txt"/>
193
          <include name="notices/APACHE-XERCES.txt"/>
194
          <include name="notices/FRIJTERS.txt"/>
195
          <include name="notices/GPL+CLASSPATH.txt"/>
196
        </fileset>
197
      </copy>
198
      <copy todir="${product.dir}/een">
199
        <fileset dir="${userdoc.dir}/welcome">
200
          <include name="doc/**"/>
201
          <include name="notices/CERN.txt"/>
202
          <include name="notices/JAMESCLARK.txt"/>
203
          <include name="notices/LEGAL.txt"/>
204
          <include name="notices/LICENSE.txt"/>
205
          <include name="notices/THAI.txt"/>
206
          <include name="notices/UNICODE.txt"/>
207
          <include name="notices/APACHE-XERCES.txt"/>
208
          <include name="notices/FRIJTERS.txt"/>
209
          <include name="notices/GPL+CLASSPATH.txt"/>
210
        </fileset>
211
      </copy>
212
      <dependset>
213
        <!-- rerun the XSLT transformations if any input files have changed -->
214
        <srcfilelist
215
           dir   = "${userdoc.dir}/src/"
216
           files = "*.xml"/>
217
        <srcfilelist
218
           dir   = "${userdoc.dir}/style/"
219
           files = "*.xsl"/>
220
        <targetfileset
221
           dir      = "${product.dir}/resources/doc/"
222
           includes = "dummy.html"/>
223
        <targetfileset
224
           dir      = "${userdoc.dir}/src/"
225
           includes = "functions.xml"/>
226
        <targetfileset
227
           dir      = "${userdoc.dir}/src/"
228
           includes = "index-entries.xml, FeatureKeysDoc.xml"/>
229
    </dependset>  
230
      <xslt in="${userdoc.dir}/src/function-data2.xml"
231
            style="${userdoc.dir}/style/preprocess-functions2.xsl"
232
            out="${userdoc.dir}/src/functions.xml"
233
            classpath="e:\saxon-build\9.2.1.5\eej\saxon9ee.jar;c:\saxon-licenses">
234
            <factory name="com.saxonica.config.EnterpriseTransformerFactory">
235
                <attribute name="http://saxon.sf.net/feature/xsltSchemaAware" value="true"/>
236
                <attribute name="http://saxon.sf.net/feature/schema-validation-mode" value="strict"/>
237
                <attribute name="http://saxon.sf.net/feature/xsd-version" value="1.1"/>
238
            </factory>
239
      </xslt>
240
      <xslt in="${userdoc.dir}/src/catalog.xml"
241
            style="${userdoc.dir}/style/index-builder.xsl"
242
            out="${userdoc.dir}/src/index-entries.xml"
243
            classpath="e:\saxon-build\9.2.1.5\eej\saxon9ee.jar;c:\saxon-licenses">
244
            <factory name="com.saxonica.config.EnterpriseTransformerFactory">
245
                <attribute name="http://saxon.sf.net/feature/xsltSchemaAware" value="true"/>
246
                <attribute name="http://saxon.sf.net/feature/schema-validation-mode" value="strict"/>
247
                <attribute name="http://saxon.sf.net/feature/xsd-version" value="1.1"/>
248
            </factory>
249
      </xslt>
250
      <xslt in="${userdoc.dir}/src/FeatureKeys.xml"
251
            style="${userdoc.dir}/style/FeatureKeysToDoc.xsl"
252
            out="${userdoc.dir}/src/FeatureKeysDoc.xml"
253
            classpath="e:\saxon-build\9.2.1.5\eej\saxon9ee.jar;c:\saxon-licenses">
254
            <factory name="com.saxonica.config.EnterpriseTransformerFactory">
255
                <attribute name="http://saxon.sf.net/feature/xsltSchemaAware" value="true"/>
256
                <attribute name="http://saxon.sf.net/feature/schema-validation-mode" value="lax"/>
257
                <attribute name="http://saxon.sf.net/feature/xsd-version" value="1.1"/>
258
            </factory>
259
      </xslt>
260
      <xslt in="${userdoc.dir}/src/catalog.xml"
261
            style="${userdoc.dir}/style/page-splitter.xsl"
262
            out="${product.dir}/resources/doc/dummy.html"
263
            classpath="e:\saxon-build\9.2.1.2\eej\saxon9ee.jar;c:\saxon-licenses">
264
            <factory name="com.saxonica.config.EnterpriseTransformerFactory">
265
                <attribute name="http://saxon.sf.net/feature/xsltSchemaAware" value="true"/>
266
                <attribute name="http://saxon.sf.net/feature/timing" value="true"/>
267
                <attribute name="http://saxon.sf.net/feature/schema-validation-mode" value="lax"/>
268
                <attribute name="http://saxon.sf.net/feature/xsd-version" value="1.1"/>
269
                <attribute name="http://saxon.sf.net/feature/recognize-uri-query-parameters" value="true"/>
270
            </factory>
271
      </xslt>
272
 
273
          <zip zipfile="${build-resources.dir}/source-userdoc.zip">
274
                  <fileset dir="${userdoc.dir}">
275
                    <include name="**/*.xml"/>
276
                    <include name="**/*.xsl"/>
277
                    <include name="**/*.xsd"/>
278
                    <include name="**/*.css"/>
279
                    <include name="fixed/**"/>
280
                    <include name="welcome/**"/>
281
                  </fileset>
282
         </zip>                               
283
    </target>
284
    
285
    <target name="release-source" description="Generate Zip file containing issued Source Code">
286
      <zip zipfile="${product.dir}/saxon${versionh}source.zip">
287
        <fileset dir="${source-hej.dir}">
288
           <include name="net/**/*.java"/>
289
           <include name="net/**/package.html"/>
290
        </fileset>
291
        <fileset dir="${temp-src-nc.dir}">
292
           <include name="api/**/*.cs"/>
293
           <include name="cmd/**/*.cs"/>
294
        </fileset>   
295
      </zip>
296
      <zip zipfile="e:/repo/src/ee/releases/saxonee${versionh}source.zip">
297
        <fileset dir="${source-eej.dir}">
298
           <include name="com/saxonica/**/*.java"/>
299
           <include name="com/saxonica/**/package.html"/>
300
        </fileset>
301
      </zip>
302
    </target>
303
    
304
    <target name="resources" description="Generate contents of released resources file"
305
              depends="release-userdoc, product-javadoc, product-dotnetdoc,
306
                       samples, samples-j, testdrivers-j,  release-source">  <!-- samples-n, -->
307
      <mkdir dir="${product.dir}/resources/build"/>
308
      <copy todir="${product.dir}/resources/build">
309
        <fileset dir="${basedir}">
310
          <include name="build.xml"/>
311
          <include name="ikvmc.cmd"/>
312
          <include name="csharp-compile.cmd"/>
313
        </fileset>  
314
      </copy>
315
      <copy todir="${product.dir}/resources">
316
        <fileset dir="${userdoc.dir}/welcome">
317
          <include name="notices/**"/>
318
        </fileset>
319
      </copy>
320
    </target>  
321
      
322
    <target name="build" description="Complete Saxon product build"
323
              depends="j, n"/> 
324
      
325
    <target name="test" description="Run regression tests"
326
        depends="test-j, test-n"/>           
327
      
328
    <target name="release" description="Create .ZIP files for release"
329
        depends="build, release-source, release-j, release-n"
330
        >  
331
        <!-- add test -->
332
        <!-- omits "resources" for maintenance releases -->
333
        
334
      <mkdir dir="${issue.dir}"/> 
335
      <!-- <zip zipfile="${issue.dir}/saxonhe${versionh}j.zip">
336
        <fileset dir="${product.dir}/hej"/>
337
      </zip>
338
      <zip zipfile="${issue.dir}/saxonhe${versionh}n.zip">
339
        <fileset dir="${product.dir}/hen"/>
340
      </zip>
341
      <zip zipfile="${issue.dir}/saxonpe${versionh}j.zip">
342
        <fileset dir="${product.dir}/pej"/>
343
      </zip>                     
344
      <zip zipfile="${issue.dir}/saxonpe${versionh}n.zip">
345
        <fileset dir="${product.dir}/pen"/>
346
      </zip>
347
          <zip zipfile="${issue.dir}/saxonee${versionh}j.zip">
348
        <fileset dir="${product.dir}/eej"/>
349
      </zip>                     
350
      <zip zipfile="${issue.dir}/saxonee${versionh}n.zip">
351
        <fileset dir="${product.dir}/een"/>
352
      </zip>-->
353
      <zip zipfile="${issue.dir}/saxon-resources${major.versionh}.zip">
354
        <fileset dir="${product.dir}/resources"/>
355
      </zip>
356
      <copy file="${product.dir}/saxon${versionh}source.zip" todir="${issue.dir}"/>
357
    </target>
358
    
359
    <target name="archive" description="Archive everything needed for backup"> 
360
      <mkdir dir="${archive.dir}"/>
361
      <copy file="archive-contents.txt" todir="${archive.dir}"/>
362
      <replace file="${archive.dir}/archive-contents.txt"
363
                 token="N-N-N-N"
364
                 value="${version}"
365
                 summary="yes"/>
366
      <copy todir="${archive.dir}">
367
       <fileset dir="${issue.dir}"/>
368
       <fileset dir="${source-eej.dir}" includes="saxonee${version}source.zip"/>
369
       <fileset dir="${build-resources.dir}" includes="saxon${version}source.zip"/>
370
      </copy>
371
      <zip zipfile="${archive.dir}/testsuite.zip">
372
        <fileset dir="e:/tests">
373
          <include name="testsuite/**"/>
374
          <include name="gold/**"/>
375
        </fileset>
376
      </zip>        
377
      <zip zipfile="${archive.dir}/schematests.zip">
378
        <fileset dir="e:/tests">
379
          <include name="xmlschema2006-11-06/**"/>
380
          <exclude name="xmlschema2006-11-06/msData/**"/>
381
          <exclude name="xmlschema2006-11-06/sunData/**"/>
382
          <exclude name="xmlschema2006-11-06/nistData/**"/>
383
        </fileset>
384
      </zip>
385
      <zip zipfile="${archive.dir}/querytests.zip">
386
        <fileset dir="e:/tests/xqts-extra"/>
387
        <fileset dir="e:/xqts/saxon">
388
          <exclude name="results/**"/>
389
          <exclude name="results.net/**"/>
390
          <exclude name="**/java/**"/>
391
        </fileset>
392
        <fileset dir="e:/xquts/saxon">
393
          <exclude name="results/**"/>
394
          <exclude name="results.net/**"/>
395
        </fileset>
396
      </zip>
397
      <zip zipfile="${archive.dir}/xslttests.zip">
398
        <fileset dir="e:/xslts-extra"/>
399
        <fileset dir="e:/xslt20-test/TestSuiteStagingArea/SaxonResults">
400
          <include name="*.xml"/>
401
          <include name="*.xsl"/>
402
        </fileset>
403
        <fileset dir="e:/xslt20-test/TestSuiteStagingArea/SaxonResults.Net">
404
          <include name="*.xml"/>
405
          <include name="*.xsl"/>
406
        </fileset>
407
      </zip>
408
      <zip zipfile="${archive.dir}/javatests.zip">
409
        <fileset dir="c:/MyJava/testcode"/>
410
      </zip>
411
      <zip zipfile="${archive.dir}/doc.zip">
412
        <fileset dir="c:/MyJava/doc"/>
413
      </zip>
414
      <zip zipfile="${archive.dir}/licensetool.zip">
415
        <fileset dir="c:/MyJava/licensetool"/>
416
      </zip>
417
      <zip zipfile="${archive.dir}/dotnetmake.zip">
418
        <fileset dir="c:/MyDotNet/make"/>
419
      </zip>      
420
      <zip zipfile="${archive.dir}/licenses.zip">
421
        <fileset dir="c:/saxon-licenses">
422
            <exclude name="archived-licenses/**"/>
423
            <exclude name="licenses/**"/>
424
        </fileset>    
425
      </zip>
426
      <zip zipfile="${archive.dir}/build.zip">
427
        <fileset dir="c:/MyJava/build">
428
          <exclude name="c:/MyJava/build/temp/**"/>
429
        </fileset>
430
      </zip>
431
    </target>  
432
      
433
       
434
    
435
</project>
(4-4/6)