Project

Profile

Help

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

he / tags / 9.6.0.8 / build / build.xml @ 02f8308b

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" xmlns:if="ant:if" xmlns:unless="ant:unless">
5

    
6
    <!-- note : Ant 1.9.1 is needed for this script -->
7

    
8
    <!-- Ant 1.9.1 supports the use of @ant:if and @ant:unless conditional attributes
9
         which are used for alternatives, currently in ICU building and documentation generation -->
10

    
11
    <!-- The use of ant:if and ant:unless requires Ant 1.9.1 -
12
        for IntelliJ the built-in is 1.8.2, but an external Ant can be configured on the Ant menu  -->
13

    
14
    <!-- note : Ant 1.7 is needed for this script -->
15

    
16
    <!-- Ant 1.7 introduces a <service> element to allow META-INF/services
17
         directories to be created in JAR files. Unfortunately it is broken,
18
         see http://issues.apache.org/bugzilla/show_bug.cgi?id=41201. The relevant
19
         code here is retained in the form of comments, and can be reinstated
20
         when the bug is fixed. Meanwhile the directories are created manually -->
21

    
22
    <!-- Build file for Saxon. This builds all six for the released products:
23
         Saxon-HE, -PE, and -EE, on both the Java and .NET platforms. It also builds
24
         the released resources file. A full build requires access to Saxonica
25
         proprietary source code. The open source Saxon-HE product can be built for
26
         Java using target "hej"; but building Saxon-HE for .NET may require some
27
         disentangling of tasks that depend on Saxon-EE code being present. -->
28

    
29
    <!-- Useful targets:
30
    
31
         prepare      clears temporary directories, generates fixed files
32
         j            builds executables for Saxon on Java
33
         n            builds executables for Saxon on .NET
34
         build        builds all executables
35
         resources    builds samples and documentation
36
         release      builds ZIP files for published downloads, runs regression tests
37
         archive      produces a back-up archive  -->
38

    
39

    
40
    <!-- Naming conventions:
41
         -n   : .NET
42
         -j   : Java
43
         -he  : Home Edition
44
         -pe  : Professional Edition
45
         -ee  : Enterprise Edition
46
         combined as appropriate, so -pej denotes Saxon-PE on the Java platform
47
    -->
48

    
49
    <import file="build-constants.xml"/>
50
    <import file="samples-common.xml"/>
51
    <import file="testing-j.xml"/>
52
    <import file="documentation.xml"/>
53

    
54

    
55

    
56
    <!-- If building for only one platform, 
57
       (a) remove one of the imports below
58
       (b) remove dependencies on targets in that build file, which are always suffixed -j or -n respectively 
59
    -->
60

    
61
    <import file="build-j.xml"/>
62
    <import file="build-n.xml"/>
63
    <import file="test-j.xml"/>
64
    <import file="test-n.xml"/>
65

    
66

    
67
    <!-- Saxon used for some late-stage operations, noteably documentation generation -->
68
    <property name="use.EE" value="true" description="Use -EE for documentation, otherwise PE"/>
69
    <property if:true="${use.EE}" name="saxon.edition" value="Enterprise"
70
        description="Enterprise Saxon"/>
71
    <property unless:true="${use.EE}" name="saxon.edition" value="Professional"
72
        description="Professional Saxon"/>
73

    
74

    
75
    <path id="saxon.class.path">
76
        <fileset if:true="${use.EE}" dir="${product.dir}/eej">
77
            <include name="*.jar"/>
78
        </fileset>
79
        <fileset unless:true="${use.EE}" dir="${product.dir}/pej">
80
            <include name="*.jar"/>
81
        </fileset>
82
        <!-- <pathelement path="${lib.dir}"/>-->
83
        <!--<pathelement path="${product.dir}/eej"/>-->
84
    </path>
85

    
86
    <path id="saxonee.class.path">
87
        <!-- <pathelement path="${lib.dir}"/>-->
88
        <pathelement path="${product.dir}/eej"/>
89
    </path>
90

    
91

    
92

    
93
    <target name="clean" description="Clean all files other than source code and downloaded jars.">
94
        <delete dir="${temp.dir}"/>
95
        <delete dir="${product.dir}"/>
96
        <mkdir dir="${product.dir}"/>
97
    </target>
98

    
99
    <target name="prepare" description="Create 'fixed' files in build libraries"
100
        depends="clean, prepare-n, prepare-j"/>
101

    
102

    
103
    <!-- The Saxonica build creates a cross-platform samples directory, but it's separated
104
         by platform in case a platform-specific build is needed -->
105

    
106

    
107
    <!--REMOVE COMMENT to incldue dotnet  <target name="samples" depends="samples-j, samples-n"/>  -->
108
     <target name="samples" depends="samples-j"/>
109

    
110

    
111

    
112

    
113
   <!-- REMOVE COMMENT to include dotnet  <target name="release-source" description="Generate Zip file containing issued Source Code">
114
        <zip zipfile="${product.dir}/saxon${versionh}source.zip">
115
            <fileset dir="${source-hej.dir}">
116
                <include name="net/**/*.java"/>
117
                <include name="net/**/package.html"/>
118
            </fileset>
119
            <fileset dir="${temp-src-nc.dir}">
120
                <include name="api/**/*.cs"/>
121
                <include name="cmd/**/*.cs"/>
122
            </fileset>
123
        </zip>
124
        <zip zipfile="${repo-priv}/releases/saxonee${versionh}source.zip">
125
            <fileset dir="${source-eej.dir}">
126
                <include name="com/saxonica/**/*.java"/>
127
                <include name="com/saxonica/**/package.html"/>
128
            </fileset>
129
        </zip>
130
    </target>  -->
131

    
132

    
133
     <target name="release-source" description="Generate Zip file containing issued Source Code">
134
        <zip zipfile="${product.dir}/saxon${versionh}source.zip">
135
            <fileset dir="${source-hej.dir}">
136
                <include name="net/**/*.java"/>
137
                <include name="net/**/package.html"/>
138
            </fileset>
139

    
140
        </zip>
141
        <zip zipfile="${repo-priv}/releases/saxonee${versionh}source.zip">
142
            <fileset dir="${source-eej.dir}">
143
                <include name="com/saxonica/**/*.java"/>
144
                <include name="com/saxonica/**/package.html"/>
145
            </fileset>
146
              <fileset dir="${source-hej.dir}">
147
                <include name="net/**/*.java"/>
148
                <include name="net/**/package.html"/>
149
            </fileset>
150
        </zip>
151
    </target>
152

    
153
    <target name="NO-resources" depends="release-source, release-userdoc"/>
154

    
155
    <!--REMOVE COMMENT to include dotnet <target name="resources" description="Generate contents of released resources file"
156
        depends="release-userdoc, product-javadoc, product-dotnetdoc,
157
                       samples, samples-j, testdrivers-j,  release-source">   -->
158

    
159
        <target name="resources" description="Generate contents of released resources file"
160
        depends="release-userdoc, product-javadoc,
161
                       samples, samples-j, testdrivers-j,  release-source">
162
        <!-- samples-n, -->
163
        <mkdir dir="${product.dir}/resources/build"/>
164
        <copy todir="${product.dir}/resources/build">
165
            <fileset dir="${basedir}">
166
                <include name="build.xml"/>
167
                <include name="build-n.xml"/>
168
                <include name="build-j.xml"/>
169
                <include name="build-constants.xml"/>
170
                <include name="test-j.xml"/>
171
                <include name="test-n.xml"/>
172

    
173
            </fileset>
174
        </copy>
175
        <copy todir="${product.dir}/resources">
176
            <fileset dir="${userdoc.dir}/welcome">
177
                <include name="notices/**"/>
178
            </fileset>
179
        </copy>
180
    </target>
181

    
182
   <!-- REMOVE COMMENT to include dotnet <target name="build" description="Complete Saxon product build" depends="j, n"/> -->
183
    <target name="build" description="Complete Saxon product build" depends="j"/>
184

    
185
    <!-- REMOVE COMMENT to include dotnet <target name="test" description="Run regression tests" depends="test-j, test-n"/> -->
186
    <target name="test" description="Run regression tests" depends="test-j, test-n"/>
187

    
188
    <!--REMOVE COMMENT to include dotnet and resources <target name="release" description="Create .ZIP files for release"
189
        depends="build, release-j, release-n, resources">  -->
190
    <target name="release" description="Create .ZIP files for release"
191
        depends="build, release-j">
192

    
193
        <!-- removed "resources" - not used in maintenance releases -->
194
        <!-- TODO add test -->
195

    
196
        <mkdir dir="${issue.dir}"/>
197
        <!-- <zip zipfile="${issue.dir}/saxonhe${versionh}j.zip">
198
          <fileset dir="${product.dir}/hej"/>
199
        </zip>
200
        <zip zipfile="${issue.dir}/saxonhe${versionh}n.zip">
201
          <fileset dir="${product.dir}/hen"/>
202
        </zip>
203
        <zip zipfile="${issue.dir}/saxonpe${versionh}j.zip">
204
          <fileset dir="${product.dir}/pej"/>
205
        </zip>
206
        <zip zipfile="${issue.dir}/saxonpe${versionh}n.zip">
207
          <fileset dir="${product.dir}/pen"/>
208
        </zip>
209
        <zip zipfile="${issue.dir}/saxonee${versionh}j.zip">
210
          <fileset dir="${product.dir}/eej"/>
211
        </zip>
212
        <zip zipfile="${issue.dir}/saxonee${versionh}n.zip">
213
          <fileset dir="${product.dir}/een"/>
214
        </zip>-->
215
        <zip zipfile="${issue.dir}/saxon-resources${major.versionh}.zip">
216
            <fileset dir="${product.dir}/resources"/>
217
        </zip>
218
        <copy file="${product.dir}/saxon${versionh}source.zip" todir="${issue.dir}"/>
219
    </target>
220

    
221
    <target name="archive" description="Archive everything needed for backup">
222
        <mkdir dir="${archive.dir}"/>
223
        <copy file="archive-contents.txt" todir="${archive.dir}"/>
224
        <replace file="${archive.dir}/archive-contents.txt" token="N-N-N-N" value="${version}"
225
            summary="yes"/>
226
        <copy todir="${archive.dir}">
227
            <fileset dir="${issue.dir}"/>
228
            <fileset dir="${source-eej.dir}" includes="saxonee${version}source.zip"/>
229
            <fileset dir="${build-resources.dir}" includes="saxon${version}source.zip"/>
230
        </copy>
231
        <zip zipfile="${archive.dir}/testsuite.zip">
232
            <fileset dir="e:/tests">
233
                <include name="testsuite/**"/>
234
                <include name="gold/**"/>
235
            </fileset>
236
        </zip>
237
        <zip zipfile="${archive.dir}/schematests.zip">
238
            <fileset dir="e:/tests">
239
                <include name="xmlschema2006-11-06/**"/>
240
                <exclude name="xmlschema2006-11-06/msData/**"/>
241
                <exclude name="xmlschema2006-11-06/sunData/**"/>
242
                <exclude name="xmlschema2006-11-06/nistData/**"/>
243
            </fileset>
244
        </zip>
245
        <zip zipfile="${archive.dir}/querytests.zip">
246
            <fileset dir="e:/tests/xqts-extra"/>
247
            <fileset dir="e:/xqts/saxon">
248
                <exclude name="results/**"/>
249
                <exclude name="results.net/**"/>
250
                <exclude name="**/java/**"/>
251
            </fileset>
252
            <fileset dir="e:/xquts/saxon">
253
                <exclude name="results/**"/>
254
                <exclude name="results.net/**"/>
255
            </fileset>
256
        </zip>
257
        <zip zipfile="${archive.dir}/xslttests.zip">
258
            <fileset dir="e:/xslts-extra"/>
259
            <fileset dir="e:/xslt20-test/TestSuiteStagingArea/SaxonResults">
260
                <include name="*.xml"/>
261
                <include name="*.xsl"/>
262
            </fileset>
263
            <fileset dir="e:/xslt20-test/TestSuiteStagingArea/SaxonResults.Net">
264
                <include name="*.xml"/>
265
                <include name="*.xsl"/>
266
            </fileset>
267
        </zip>
268
        <zip zipfile="${archive.dir}/javatests.zip">
269
            <fileset dir="c:/MyJava/testcode"/>
270
        </zip>
271
        <zip zipfile="${archive.dir}/doc.zip">
272
            <fileset dir="c:/MyJava/doc"/>
273
        </zip>
274
        <zip zipfile="${archive.dir}/licensetool.zip">
275
            <fileset dir="c:/MyJava/licensetool"/>
276
        </zip>
277
        <zip zipfile="${archive.dir}/dotnetmake.zip">
278
            <fileset dir="c:/MyDotNet/make"/>
279
        </zip>
280
        <zip zipfile="${archive.dir}/licenses.zip">
281
            <fileset dir="c:/saxon-licenses">
282
                <exclude name="archived-licenses/**"/>
283
                <exclude name="licenses/**"/>
284
            </fileset>
285
        </zip>
286
        <zip zipfile="${archive.dir}/build.zip">
287
            <fileset dir="c:/MyJava/build">
288
                <exclude name="c:/MyJava/build/temp/**"/>
289
            </fileset>
290
        </zip>
291
    </target>
292

    
293

    
294
</project>
(4-4/9)