Project

Profile

Help

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

he / latest9.2 / build / build.xml @ 5c432fa8

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

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

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

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

    
132
   
133
    
134
    <target name="release-userdoc" description="Generate User Documentation">
135
          <taskdef name="saxon-xslt" 
136
                                 classname="net.sf.saxon.ant.AntTransform" 
137
                                 classpath="e:\saxon-build\9.1.0.6\saj\saxon9sa.jar;e:\saxon-build\9.1.0.6\bj\saxon9-ant.jar;c:\saxon-licenses"/>
138
                        <!-- actually, putting the license file on the classpath here doesn't seem to work. It has to be in the classpath
139
                               used to invoke Ant in the first place - specifically, in the CLASSPATH environment variable -->
140
          <copy todir="${build-resources.dir}/doc">
141
        <fileset dir="${userdoc.dir}/fixed"/>
142
      </copy> 
143
          <copy todir="${product.dir}/hej">
144
        <fileset dir="${userdoc.dir}/welcome">
145
          <include name="doc/**"/>
146
          <include name="notices/**"/>
147
        </fileset>
148
      </copy>
149
      <copy todir="${product.dir}/pej">
150
        <fileset dir="${userdoc.dir}/welcome">
151
          <include name="doc/**"/>
152
          <include name="notices/**"/>
153
        </fileset>
154
      </copy>
155
      <copy todir="${product.dir}/eej">
156
        <fileset dir="${userdoc.dir}/welcome">
157
          <include name="doc/**"/>
158
          <include name="notices/**"/>
159
        </fileset>
160
      </copy>
161
      <copy todir="${product.dir}/hen">
162
        <fileset dir="${userdoc.dir}/welcome">
163
          <include name="doc/**"/>
164
          <include name="notices/**"/>
165
        </fileset>
166
      </copy>
167
      <copy todir="${product.dir}/een">
168
        <fileset dir="${userdoc.dir}/welcome">
169
          <include name="doc/**"/>
170
          <include name="notices/**"/>
171
        </fileset>
172
      </copy>
173
   <!--
174
      NO USER DOCUMENTATION FOR MAINTENANCE BUILDS             
175
                        <saxon-xslt in="${userdoc.dir}/catalog.xml" 
176
                                    style="${userdoc.dir}/render-page2.xsl"
177
                                    schemaAware="true"
178
                                    xmlVersion="1.0"
179
                                    schemaValidation="strict"
180
                                    out="${product.dir}/resources/doc/dummy.html"><!~~validation="strict" ~~>
181
                          <param name="destination" expression="offline"/>
182
                        </saxon-xslt> 
183
                        <zip zipfile="${build-resources.dir}/source-userdoc.zip">
184
                          <fileset dir="${userdoc.dir}">
185
                            <include name="**/*.xml"/>
186
                            <include name="**/*.xsl"/>
187
                            <include name="**/*.xsd"/>
188
                            <include name="**/*.css"/>
189
                            <include name="fixed/**"/>
190
                            <include name="welcome/**"/>
191
                          </fileset>
192
                        </zip> -->                              
193
    </target>
194
    
195
    <target name="release-source" description="Generate Zip file containing issued Source Code">
196
      <zip zipfile="${build-resources.dir}/saxon${versionh}source.zip">
197
        <fileset dir="${source-hej.dir}">
198
           <include name="net/**/*.java"/>
199
           <include name="net/**/package.html"/>
200
        </fileset>
201
        <fileset dir="${temp-src-nc.dir}">
202
           <include name="api/**/*.cs"/>
203
           <include name="cmd/**/*.cs"/>
204
        </fileset>   
205
      </zip>
206
      <zip zipfile="${source-eej.dir}/../releases/saxonee${versionh}source.zip">
207
        <fileset dir="${source-eej.dir}">
208
           <include name="com/saxonica/**/*.java"/>
209
           <include name="com/saxonica/**/package.html"/>
210
        </fileset>
211
      </zip>
212
    </target>
213
    
214
    <target name="resources" description="Generate contents of released resources file"
215
              depends="release-userdoc, product-javadoc, product-dotnetdoc,
216
                       samples, samples-j, testdrivers-j,  release-source">  <!-- samples-n, -->
217
      <mkdir dir="${product.dir}/resources/build"/>
218
      <copy todir="${product.dir}/resources/build">
219
        <fileset dir="${basedir}">
220
          <include name="build.xml"/>
221
          <include name="ikvmc.cmd"/>
222
          <include name="csharp-compile.cmd"/>
223
        </fileset>  
224
      </copy>
225
      <copy todir="${product.dir}/resources">
226
        <fileset dir="${userdoc.dir}/welcome">
227
          <include name="notices/**"/>
228
        </fileset>
229
      </copy>
230
    </target>  
231
      
232
    <target name="build" description="Complete Saxon product build"
233
              depends="j, n"/>
234
              
235
    <target name="test" description="Run regression tests"
236
        depends="test-j, test-n"/>           
237
      
238
    <target name="release" description="Create .ZIP files for release"
239
        depends="build, resources, test"
240
        >  <!-- -->
241
      <mkdir dir="${issue.dir}"/> 
242
      <zip zipfile="${issue.dir}/saxonhe${versionh}j.zip">
243
        <fileset dir="${product.dir}/hej"/>
244
      </zip>
245
      <zip zipfile="${issue.dir}/saxonhe${versionh}n.zip">
246
        <fileset dir="${product.dir}/hen"/>
247
      </zip>
248
      <zip zipfile="${issue.dir}/saxonpe${versionh}j.zip">
249
        <fileset dir="${product.dir}/pej"/>
250
      </zip>                     
251
      <zip zipfile="${issue.dir}/saxonpe${versionh}n.zip">
252
        <fileset dir="${product.dir}/pen"/>
253
      </zip>
254
          <zip zipfile="${issue.dir}/saxonee${versionh}j.zip">
255
        <fileset dir="${product.dir}/eej"/>
256
      </zip>                     
257
      <zip zipfile="${issue.dir}/saxonee${versionh}n.zip">
258
        <fileset dir="${product.dir}/een"/>
259
      </zip>
260
      <zip zipfile="${issue.dir}/saxon-resources${versionh}.zip">
261
        <fileset dir="${product.dir}/resources"/>
262
      </zip>
263
    </target>
264
    
265
    <target name="archive" description="Archive everything needed for backup"> 
266
      <mkdir dir="${archive.dir}"/>
267
      <copy file="archive-contents.txt" todir="${archive.dir}"/>
268
      <replace file="${archive.dir}/archive-contents.txt"
269
                 token="N-N-N-N"
270
                 value="${version}"
271
                 summary="yes"/>
272
      <copy todir="${archive.dir}">
273
       <fileset dir="${issue.dir}"/>
274
       <fileset dir="${development-j.dir}" includes="sa-source.zip"/>
275
       <fileset dir="${build-resources.dir}" includes="source.zip"/>
276
      </copy>
277
      <zip zipfile="${archive.dir}/testsuite.zip">
278
        <fileset dir="e:/tests">
279
          <include name="testsuite/**"/>
280
          <include name="gold/**"/>
281
        </fileset>
282
      </zip>        
283
      <zip zipfile="${archive.dir}/schematests.zip">
284
        <fileset dir="e:/tests">
285
          <include name="xmlschema2006-11-06/**"/>
286
          <exclude name="xmlschema2006-11-06/msData"/>
287
          <exclude name="xmlschema2006-11-06/sunData"/>
288
          <exclude name="xmlschema2006-11-06/nistData"/>
289
        </fileset>
290
      </zip>
291
      <zip zipfile="${archive.dir}/querytests.zip">
292
        <fileset dir="e:/tests/xqts-extra"/>
293
        <fileset dir="e:/xqts/saxon">
294
          <exclude name="results/**"/>
295
        </fileset>
296
        <fileset dir="e:/xquts/saxon">
297
          <exclude name="results/**"/>
298
        </fileset>
299
      </zip>
300
      <zip zipfile="${archive.dir}/xslttests.zip">
301
        <fileset dir="e:/xslts-extra"/>
302
        <fileset dir="e:/xslt20-test/TestSuiteStagingArea/SaxonResults">
303
          <include name="*.xml"/>
304
          <include name="*.xsl"/>
305
        </fileset>
306
        <fileset dir="e:/xslt20-test/TestSuiteStagingArea/SaxonResults.Net">
307
          <include name="*.xml"/>
308
          <include name="*.xsl"/>
309
        </fileset>
310
      </zip>
311
      <zip zipfile="${archive.dir}/javatests.zip">
312
        <fileset dir="c:/MyJava/testcode"/>
313
      </zip>
314
      <zip zipfile="${archive.dir}/doc.zip">
315
        <fileset dir="c:/MyJava/doc"/>
316
      </zip>
317
      <zip zipfile="${archive.dir}/licensetool.zip">
318
        <fileset dir="c:/MyJava/licensetool"/>
319
      </zip>
320
      <zip zipfile="${archive.dir}/dotnetmake.zip">
321
        <fileset dir="c:/MyDotNet/make"/>
322
      </zip>      
323
      <zip zipfile="${archive.dir}/licenses.zip">
324
        <fileset dir="c:/saxon-licenses"/>
325
      </zip>
326
      <zip zipfile="${archive.dir}/build.zip">
327
        <fileset dir="c:/MyJava/build">
328
          <exclude name="c:/MyJava/build/temp"/>
329
        </fileset>
330
      </zip>
331
    </target>  
332
      
333
       
334
    
335
</project>
(4-4/6)