Project

Profile

Help

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

he / tags / 9.2.0.5 / build / build.xml @ c74fd4aa

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
    <!--TODO: 1: ensure saxon9api.netmodule is included in the build
7
           2: remove the archive target before shipping this file-->
8
    
9
    <!-- note : Ant 1.7 is needed for this script -->
10
    
11
    <!-- Ant 1.7 introduces a <service> element to allow META-INF/services
12
         directories to be created in JAR files. Unfortunately it is broken,
13
         see http://issues.apache.org/bugzilla/show_bug.cgi?id=41201. The relevant
14
         code here is retained in the form of comments, and can be reinstated
15
         when the bug is fixed. Meanwhile the directories are created manually -->
16
    
17
    <!-- Build file for Saxon. This builds all six for the released products:
18
         Saxon-HE, -PE, and -EE, on both the Java and .NET platforms. It also builds
19
         the released resources file. A full build requires access to Saxonica
20
         proprietary source code. The open source Saxon-HE product can be built for
21
         Java using target "hej"; but building Saxon-HE for .NET may require some
22
         disentangling of tasks that depend on Saxon-EE code being present. -->
23
         
24
    <!-- Useful targets:
25
    
26
         prepare      clears temporary directories, generates fixed files
27
         j            builds executables for Saxon on Java
28
         n            builds executables for Saxon on .NET
29
         build        builds all executables
30
         resources    builds samples and documentation
31
         release      builds ZIP files for published downloads
32
         archive      produces a back-up archive  -->
33
             
34
         
35
    <!-- Naming conventions:
36
         -n   : .NET
37
         -j   : Java
38
         -he  : Home Edition
39
         -pe  : Professional Edition
40
         -ee  : Enterprise Edition
41
         combined as appropriate, so -pej denotes Saxon-PE on the Java platform
42
    -->
43
    
44
    <import file="build-constants.xml"/>
45
    
46
    <!-- If building for only one platform, 
47
       (a) remove one of the imports below
48
       (b) remove dependencies on targets in that build file, which are always suffixed -j or -n respectively 
49
    -->
50
       
51
    <import file="build-j.xml"/>
52
    <import file="build-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.1.jar" dest="${lib.dir}/xom-1.1.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/play.xsl"/>
104
          <include name="styles/identity.xsl"/>
105
          <include name="styles/books-csv.xsl"/>
106
          <include name="styles/books-sa.xsl"/>
107
          <include name="styles/books-sql.xsl"/>
108
          <include name="styles/tour.xsl"/>
109
          <include name="styles/summarize.xsl"/>
110
          <include name="trax/xml/**/*.xml"/>
111
          <include name="trax/xsl/**/*.xsl"/>
112
          <include name="trax/xsl/**/preamble.txt"/>
113
          <include name="trax/xsl/**/postamble.txt"/>
114
        </fileset>
115
      </copy>
116
    </target>
117
    
118
    <!-- The Saxonica build creates a cross-platform samples directory, but it's separated
119
         by platform in case a platform-specific build is needed -->
120
    
121
    
122
    <target name="samples" depends="samples-j, samples-n"/>
123
    
124

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