-
Notifications
You must be signed in to change notification settings - Fork 24
/
extras.xml
392 lines (335 loc) · 16.2 KB
/
extras.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="Tomcat 6.0" default="extras" basedir=".">
<!-- ===================== Initialize Property Values =================== -->
<!-- We read customizable properties from the file "build.properties.default" -->
<!-- and also from "build.properties" if it exists. -->
<!-- The values in "build.properties" have stronger preference. -->
<!-- If you want to customize your build, you can either change the values -->
<!-- directly in the default file, or create a new build.properties and set -->
<!-- the values there. This way you don't have to change a file which is part -->
<!-- of the original project source code. -->
<!-- See "build.properties.default" in the top level directory for some -->
<!-- property values you may customize. -->
<property file="${user.home}/build.properties"/>
<property file="build.properties"/>
<property file="build.properties.default"/>
<!-- Project Properties -->
<property name="project" value="apache-tomcat" />
<property name="name" value="Apache Tomcat" />
<tstamp>
<format property="year" pattern="yyyy" locale="en"/>
</tstamp>
<property name="version.major" value="6" />
<property name="version.minor" value="0" />
<property name="version.build" value="0" />
<property name="version.patch" value="0" />
<property name="version.suffix" value="-dev" />
<property name="version" value="${version.major}.${version.minor}.${version.build}${version.suffix}" />
<property name="version.number" value="${version.major}.${version.minor}.${version.build}.${version.patch}" />
<property name="version.major.minor" value="${version.major}.${version.minor}" />
<property name="final.name" value="${project}-${version}" />
<property name="final-src.name" value="${project}-${version}-src" />
<!-- Build Defaults -->
<property name="tomcat.output" value="${basedir}/output"/>
<property name="tomcat.build" value="${tomcat.output}/build"/>
<property name="tomcat.classes" value="${tomcat.output}/classes"/>
<property name="tomcat.dist" value="${tomcat.output}/dist"/>
<property name="tomcat.extras" value="${tomcat.output}/extras"/>
<property name="tomcat.manifests" value="${tomcat.output}/manifests"/>
<property name="tomcat.deployer" value="${tomcat.output}/deployer"/>
<property name="tomcat.release" value="${tomcat.output}/release"/>
<property name="test.failonerror" value="true"/>
<property name="test.runner" value="junit.textui.TestRunner"/>
<!-- constant to declare a file binary for md5sum -->
<property name="md5sum.binary-prefix" value=" *" />
<!-- Can't be lower - jsp uses templates -->
<property name="compile.source" value="1.5"/>
<!-- JAR artifacts -->
<property name="bootstrap.jar" value="${tomcat.build}/bin/bootstrap.jar"/>
<property name="annotations-api.jar" value="${tomcat.build}/lib/annotations-api.jar"/>
<property name="servlet-api.jar" value="${tomcat.build}/lib/servlet-api.jar"/>
<property name="jsp-api.jar" value="${tomcat.build}/lib/jsp-api.jar"/>
<property name="el-api.jar" value="${tomcat.build}/lib/el-api.jar"/>
<property name="catalina.jar" value="${tomcat.build}/lib/catalina.jar"/>
<property name="catalina-ant.jar" value="${tomcat.build}/lib/catalina-ant.jar"/>
<property name="tomcat-coyote.jar" value="${tomcat.build}/lib/tomcat-coyote.jar"/>
<property name="jasper.jar" value="${tomcat.build}/lib/jasper.jar"/>
<property name="jasper-el.jar" value="${tomcat.build}/lib/jasper-el.jar"/>
<property name="tomcat-dbcp.home" value="${base.path}/tomcat${version.major}-deps/dbcp" />
<property name="tomcat-dbcp.jar" value="${tomcat-dbcp.home}/tomcat-dbcp.jar"/>
<property name="tomcat-juli.jar" value="${tomcat.extras}/tomcat-juli.jar"/>
<property name="tomcat-juli-adapters.jar" value="${tomcat.extras}/tomcat-juli-adapters.jar"/>
<property name="catalina-ws.jar" value="${tomcat.extras}/catalina-ws.jar"/>
<property name="catalina-jmx-remote.jar" value="${tomcat.extras}/catalina-jmx-remote.jar"/>
<!-- Classpath -->
<path id="tomcat.classpath">
<pathelement location="${tomcat.classes}"/>
</path>
<target name="prepare">
<mkdir dir="${tomcat.extras}"/>
<mkdir dir="${tomcat.extras}/logging"/>
<mkdir dir="${tomcat.extras}/webservices"/>
</target>
<target name="clean">
<delete dir="${tomcat.extras}"/>
</target>
<target name="commons-logging-prepare"
depends="prepare"
description="Prepare to build web services extras package">
<antcall target="downloadfile-2">
<param name="sourcefile.1" value="${commons-logging-src.loc.1}"/>
<param name="sourcefile.2" value="${commons-logging-src.loc.2}"/>
<param name="destfile" value="${commons-logging-src.tar.gz}"/>
<param name="destdir" value="${commons-logging.home}"/>
</antcall>
<antcall target="downloadfile">
<param name="sourcefile" value="${avalon-framework.loc}"/>
<param name="destfile" value="${avalon-framework.jar}"/>
<param name="destdir" value="${avalon-framework.home}"/>
</antcall>
<antcall target="downloadfile">
<param name="sourcefile" value="${log4j.loc}"/>
<param name="destfile" value="${log4j.jar}"/>
<param name="destdir" value="${log4j.home}"/>
</antcall>
<antcall target="downloadfile">
<param name="sourcefile" value="${logkit.loc}"/>
<param name="destfile" value="${logkit.jar}"/>
<param name="destdir" value="${logkit.home}"/>
</antcall>
<antcall target="downloadfile">
<param name="sourcefile" value="${servletapi.loc}"/>
<param name="destfile" value="${servletapi.jar}"/>
<param name="destdir" value="${servletapi.home}"/>
</antcall>
</target>
<target name="commons-logging"
depends="commons-logging-prepare"
description="Build JULI for log4j extras package">
<gunzip src="${commons-logging-src.tar.gz}"
dest="${tomcat.extras}/logging/commons-logging-src.tar"/>
<untar src="${tomcat.extras}/logging/commons-logging-src.tar"
dest="${tomcat.extras}/logging/"/>
<replace dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/src/java/org/apache/commons"
encoding="ISO-8859-1">
<replacefilter token="org.apache.commons"
value="org.apache.juli" />
</replace>
<mkdir dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/src/java/org/apache/juli" />
<move todir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/src/java/org/apache/juli">
<fileset dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/src/java/org/apache/commons" />
</move>
<replace dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src"
encoding="ISO-8859-1">
<replacefilter token="org.apache.commons"
value="org.apache.juli" />
<replacefilter token="org/apache/commons/"
value="org/apache/juli/" />
</replace>
<copy tofile="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/build2.xml"
file="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/build.xml" />
<copy todir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src">
<fileset file="${avalon-framework.jar}" />
<fileset file="${log4j.jar}" />
<fileset file="${logkit.jar}" />
<fileset file="${servletapi.jar}" />
</copy>
<ant antfile="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/build2.xml"
dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src"
target="compile" />
<jar jarfile="${tomcat-juli.jar}"
manifest="${tomcat.manifests}/default.manifest" >
<fileset dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/target/classes">
<include name="org/apache/juli/logging/*.class" />
<include name="org/apache/juli/logging/impl/LogFactoryImpl*.class" />
<include name="org/apache/juli/logging/impl/WeakHashtable*.class" />
<include name="org/apache/juli/logging/impl/SimpleLog*.class" />
<include name="org/apache/juli/logging/impl/NoOpLog*.class" />
<include name="org/apache/juli/logging/impl/Jdk14Logger.class" />
<!-- Javadoc and i18n exclusions -->
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
</fileset>
<fileset dir="${tomcat.classes}">
<include name="org/apache/juli/*" />
<!-- Javadoc and i18n exclusions -->
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
</fileset>
<zipfileset file="${tomcat.manifests}/default.notice"
fullpath="META-INF/NOTICE" />
<zipfileset file="${tomcat.manifests}/default.license"
fullpath="META-INF/LICENSE" />
</jar>
<antcall target="md5sum">
<param name="file" value="${tomcat-juli.jar}" />
</antcall>
<jar jarfile="${tomcat-juli-adapters.jar}"
manifest="${tomcat.manifests}/default.manifest" >
<fileset dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/target/classes">
<include name="org/apache/juli/logging/impl/**.class" />
<exclude name="org/apache/juli/logging/impl/WeakHashtable*.class" />
<exclude name="org/apache/juli/logging/impl/LogFactoryImpl.class" />
<!-- Javadoc and i18n exclusions -->
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
</fileset>
<zipfileset file="${tomcat.manifests}/default.notice"
fullpath="META-INF/NOTICE" />
<zipfileset file="${tomcat.manifests}/default.license"
fullpath="META-INF/LICENSE" />
</jar>
<antcall target="md5sum">
<param name="file" value="${tomcat-juli-adapters.jar}" />
</antcall>
</target>
<target name="webservices-prepare"
depends="prepare"
description="Prepare to build web services extras package">
<antcall target="downloadfile">
<param name="sourcefile" value="${jaxrpc-lib.loc}"/>
<param name="destfile" value="${jaxrpc-lib.jar}"/>
<param name="destdir" value="${jaxrpc-lib.home}"/>
</antcall>
<antcall target="downloadfile">
<param name="sourcefile" value="${wsdl4j-lib.loc}"/>
<param name="destfile" value="${wsdl4j-lib.jar}"/>
<param name="destdir" value="${wsdl4j-lib.home}"/>
</antcall>
<copy file="${jaxrpc-lib.jar}"
tofile="${tomcat.extras}/webservices/jaxrpc.jar" />
<copy file="${wsdl4j-lib.jar}"
tofile="${tomcat.extras}/webservices/wsdl4j.jar" />
</target>
<target name="webservices"
depends="webservices-prepare"
description="Build web services extras package">
<!-- Classpath -->
<path id="tomcat.webservices.classpath">
<pathelement path="${tomcat.classpath}"/>
<fileset dir="${tomcat.extras}/webservices">
<include name="jaxrpc.jar"/>
<include name="wsdl4j.jar"/>
</fileset>
</path>
<!-- Compile internal server components -->
<javac srcdir="java" destdir="${tomcat.classes}"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
source="${compile.source}"
optimize="${compile.optimize}"
encoding="ISO-8859-1">
<classpath refid="tomcat.webservices.classpath" />
<include name="org/apache/naming/factory/webservices/**" />
</javac>
<!-- Catalina Main JAR File -->
<jar jarfile="${catalina-ws.jar}"
manifest="${tomcat.manifests}/default.manifest">
<fileset dir="${tomcat.classes}">
<include name="org/apache/naming/factory/webservices/**" />
<!-- Javadoc and i18n exclusions -->
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
</fileset>
<zipfileset file="${tomcat.manifests}/default.notice"
fullpath="META-INF/NOTICE" />
<zipfileset file="${tomcat.manifests}/default.license"
fullpath="META-INF/LICENSE" />
</jar>
<antcall target="md5sum">
<param name="file" value="${catalina-ws.jar}" />
</antcall>
</target>
<target name="jmx-remote" >
<!-- Create the JAR file -->
<jar jarfile="${catalina-jmx-remote.jar}"
manifest="${tomcat.manifests}/default.manifest" >
<fileset dir="${tomcat.classes}">
<include name="org/apache/catalina/mbeans/JmxRemote*" />
</fileset>
<zipfileset file="${tomcat.manifests}/default.notice"
fullpath="META-INF/NOTICE" />
<zipfileset file="${tomcat.manifests}/default.license"
fullpath="META-INF/LICENSE" />
</jar>
<antcall target="md5sum">
<param name="file" value="${catalina-jmx-remote.jar}" />
</antcall>
</target>
<target name="extras"
depends="commons-logging,webservices,jmx-remote">
</target>
<!-- Download and dependency building -->
<target name="proxyflags">
<!-- check proxy parameters. -->
<condition property="useproxy">
<equals arg1="${proxy.use}" arg2="on" />
</condition>
</target>
<target name="setproxy" depends="proxyflags" if="useproxy">
<taskdef name="setproxy"
classname="org.apache.tools.ant.taskdefs.optional.net.SetProxy" />
<setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"
proxyuser="${proxy.user}" proxypassword="${proxy.password}" />
<echo message="Using ${proxy.host}:${proxy.port} to download ${sourcefile}"/>
</target>
<target name="testexist">
<echo message="Testing for ${destfile}"/>
<available file="${destfile}" property="exist"/>
</target>
<target name="downloadfile" unless="exist" depends="setproxy,testexist">
<!-- Download extract the file -->
<mkdir dir="${destdir}" />
<get src="${sourcefile}" dest="${destfile}" />
</target>
<target name="downloadfile-2" unless="exist" depends="testexist">
<!-- Download the file from the two alternative locations -->
<mkdir dir="${destdir}" />
<antcall target="trydownload">
<param name="sourcefile" value="${sourcefile.1}" />
</antcall>
<antcall target="trydownload">
<param name="sourcefile" value="${sourcefile.2}" />
</antcall>
<available file="${destfile}" property="exist"/>
<fail unless="exist" message="Failed to download [${destfile}]. All download sources are unavailable." />
</target>
<target name="trydownload.check" depends="setproxy">
<condition property="trydownload.run">
<and>
<not>
<available file="${destfile}" />
</not>
<http url="${sourcefile}" />
</and>
</condition>
</target>
<target name="trydownload" if="trydownload.run" depends="trydownload.check">
<!-- Downloads a file if not yet downloaded and the source URL is available -->
<get src="${sourcefile}" dest="${destfile}" />
</target>
<!-- Helper target, used to create a md5 checksum file -->
<!-- Requires 'file' as a parameter. -->
<target name="md5sum">
<fail unless="file" />
<fail if="filename" />
<fail if="value" />
<basename file="${file}" property="filename" />
<checksum file="${file}" property="value" />
<echo file="${file}.md5" message="${value}${md5sum.binary-prefix}${filename}" />
</target>
</project>