Project

Profile

Help

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

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

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

    
3
<project basedir="." default="all" name="Saxon 9.8: 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

    
51
    <!-- If building for only one platform,
52
       (a) remove one of the imports below
53
       (b) remove dependencies on targets in that build file, which are always suffixed -j or -n respectively
54
    -->
55

    
56
    <import file="build-j.xml"/>
57
    <import file="build-n.xml"/>
58
    <!--<import file="build-c.xml"/>-->
59
    <import file="test-n.xml"/>
60
    <import file="testing-j.xml"/>
61

    
62

    
63
    <import file="samples-common.xml"/>
64
    <import file="documentation.xml"/>
65
    <import file="jd-build/build-jd.xml"/>
66

    
67

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

    
75

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

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

    
92

    
93

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

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

    
103

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

    
107

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

    
111

    
112

    
113

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

    
133

    
134
    <target name="NO-resources" depends="release-source, release-userdoc"/>
135

    
136
    <!--REMOVE COMMENT to include dotnet <target name="resources" description="Generate contents of released resources file"
137
        depends="product-xsljavadoc, product-dotnetdoc, release-userdoc, product-javadoc,
138
                       samples, testdrivers-j">  -->
139

    
140
    <!-- Generate javadoc-xml (using jd-build/build-jd/product-xsljavadoc target)
141
    and dotnetdoc-xml (using build-n/product-dotnetdoc target) before target release-userdoc -->
142
    <!-- The product-javadoc target then generates the HTML version,
143
     which goes in resources/doc dir -->
144

    
145
    <target name="resources" description="Generate contents of released resources file"
146
            depends="product-xsljavadoc, product-dotnetdoc, release-userdoc, product-javadoc,
147
                       samples, testdrivers-j">
148
        <mkdir dir="${product.dir}/resources/build"/>
149
        <copy todir="${product.dir}/resources/build">
150
            <fileset dir="${basedir}">
151
                <include name="build.xml"/>
152
                <include name="build-n.xml"/>
153
                <include name="build-j.xml"/>
154
                <include name="build-constants.xml"/>
155
                <include name="testing-j.xml"/>
156
                <include name="test-n.xml"/>
157

    
158
            </fileset>
159
        </copy>
160
        <copy todir="${product.dir}/resources">
161
            <fileset dir="${userdoc.dir}/saxon9/welcome">
162
                <include name="notices/**"/>
163
            </fileset>
164
        </copy>
165
    </target>
166

    
167
    <target name="release-resources" description="Create saxon-resources .ZIP file for release"
168
            depends="resources">
169
        <zip zipfile="${issue.dir}/saxon-resources${major.versionh}.zip">
170
            <fileset dir="${product.dir}/resources"/>
171
        </zip>
172
    </target>
173

    
174

    
175
   <!-- REMOVE COMMENT to include dotnet <target name="build" description="Complete Saxon product build" depends="j, n"/> -->
176
    <target name="build" description="Complete Saxon product build" depends="j"/>
177

    
178
    <!-- REMOVE COMMENT to include dotnet <target name="test" description="Run regression tests" depends="test-j, test-n"/> -->
179
  <!--  <target name="test" description="Run regression tests" depends="test-j, test-n"/>-->
180

    
181
    <!--REMOVE COMMENT to include dotnet and resources <target name="release" description="Create .ZIP files for release"
182
        depends="build, release-j, release-n, release-source, release-resources">  -->
183
    <target name="release" description="Create .ZIP files for release"
184
        depends="build, release-j, release-source, release-resources">
185

    
186
        <mkdir dir="${issue.dir}"/>
187
        <!-- <zip zipfile="${issue.dir}/saxonhe${versionh}j.zip">
188
          <fileset dir="${product.dir}/hej"/>
189
        </zip>
190
        <zip zipfile="${issue.dir}/saxonhe${versionh}n.zip">
191
          <fileset dir="${product.dir}/hen"/>
192
        </zip>
193
        <zip zipfile="${issue.dir}/saxonpe${versionh}j.zip">
194
          <fileset dir="${product.dir}/pej"/>
195
        </zip>
196
        <zip zipfile="${issue.dir}/saxonpe${versionh}n.zip">
197
          <fileset dir="${product.dir}/pen"/>
198
        </zip>
199
        <zip zipfile="${issue.dir}/saxonee${versionh}j.zip">
200
          <fileset dir="${product.dir}/eej"/>
201
        </zip>
202
        <zip zipfile="${issue.dir}/saxonee${versionh}n.zip">
203
          <fileset dir="${product.dir}/een"/>
204
        </zip>-->
205
        <copy file="${product.dir}/saxon${versionh}source.zip" todir="${issue.dir}"/>
206
    </target>
207

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

    
280

    
281
</project>
(4-4/5)