3
Licensed to the Apache Software Foundation (ASF) under one or more
4
contributor license agreements. See the NOTICE file distributed with
5
this work for additional information regarding copyright ownership.
6
The ASF licenses this file to You under the Apache License, Version 2.0
7
(the "License"); you may not use this file except in compliance with
8
the License. You may obtain a copy of the License at
10
http://www.apache.org/licenses/LICENSE-2.0
12
Unless required by applicable law or agreed to in writing, software
13
distributed under the License is distributed on an "AS IS" BASIS,
14
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
See the License for the specific language governing permissions and
16
limitations under the License.
18
<project name="Tomcat 6.0" default="deploy" basedir=".">
21
<!-- ===================== Initialize Property Values =================== -->
23
<!-- We read customizable properties from the file "build.properties.default" -->
24
<!-- and also from "build.properties" if it exists. -->
25
<!-- The values in "build.properties" have stronger preference. -->
26
<!-- If you want to customize your build, you can either change the values -->
27
<!-- directly in the default file, or create a new build.properties and set -->
28
<!-- the values there. This way you don't have to change a file which is part -->
29
<!-- of the original project source code. -->
30
<!-- See "build.properties.default" in the top level directory for some -->
31
<!-- property values you may customize. -->
32
<property file="${user.home}/build.properties"/>
33
<property file="build.properties"/>
35
<property file="build.properties.default"/>
37
<!-- Project Properties -->
38
<property name="project" value="apache-tomcat" />
39
<property name="name" value="Apache Tomcat" />
41
<format property="year" pattern="yyyy" locale="en"/>
43
<property name="version.major" value="6" />
44
<property name="version.minor" value="0" />
45
<property name="version.build" value="0" />
46
<property name="version.patch" value="0" />
47
<property name="version.suffix" value="-dev" />
49
<property name="version" value="${version.major}.${version.minor}.${version.build}${version.suffix}" />
50
<property name="version.number" value="${version.major}.${version.minor}.${version.build}.${version.patch}" />
51
<property name="version.major.minor" value="${version.major}.${version.minor}" />
53
<property name="final.name" value="${project}-${version}" />
54
<property name="final-src.name" value="${project}-${version}-src" />
56
<!-- Build Defaults -->
57
<property name="tomcat.home" value="${basedir}"/>
58
<property name="tomcat.build" value="${basedir}/output/build"/>
59
<property name="tomcat.classes" value="${basedir}/output/classes"/>
60
<property name="tomcat.dist" value="${basedir}/output/dist"/>
61
<property name="tomcat.manifests" value="${basedir}/output/manifests"/>
62
<property name="test.failonerror" value="true"/>
63
<property name="test.runner" value="junit.textui.TestRunner"/>
65
<!-- Can't be lower - jsp uses templates -->
66
<property name="compile.source" value="1.5"/>
67
<!-- Can't be higher - must run on 1.5 -->
68
<property name="compile.target" value="1.5"/>
70
<!-- Exact spec versions (for the manifests) -->
71
<property name="servlet.revision" value="MR2" />
72
<property name="jsp.revision" value="FR" />
73
<property name="el.revision" value="FR" />
75
<!-- JAR artifacts -->
76
<property name="bootstrap.jar" value="${tomcat.build}/bin/bootstrap.jar"/>
77
<property name="tomcat-juli.jar" value="${tomcat.build}/bin/tomcat-juli.jar"/>
79
<property name="annotations-api.jar" value="${tomcat.build}/lib/annotations-api.jar"/>
80
<property name="servlet-api.jar" value="${tomcat.build}/lib/servlet-api.jar"/>
81
<property name="jsp-api.jar" value="${tomcat.build}/lib/jsp-api.jar"/>
82
<property name="el-api.jar" value="${tomcat.build}/lib/el-api.jar"/>
83
<property name="catalina.jar" value="${tomcat.build}/lib/catalina.jar"/>
84
<property name="catalina-tribes.jar" value="${tomcat.build}/lib/catalina-tribes.jar"/>
85
<property name="catalina-ha.jar" value="${tomcat.build}/lib/catalina-ha.jar"/>
86
<property name="catalina-ant.jar" value="${tomcat.build}/lib/catalina-ant.jar"/>
87
<property name="tomcat-coyote.jar" value="${tomcat.build}/lib/tomcat-coyote.jar"/>
89
<property name="jasper.jar" value="${tomcat.build}/lib/jasper.jar"/>
90
<property name="jasper-el.jar" value="${tomcat.build}/lib/jasper-el.jar"/>
92
<property name="tomcat-dbcp.home" value="${base.path}/tomcat${version.major}-deps/dbcp" />
93
<property name="jasper-jdt.home" value="${base.path}/tomcat${version.major}-deps/jdt" />
94
<property name="tomcat-dbcp.jar" value="${tomcat-dbcp.home}/tomcat-dbcp.jar"/>
95
<property name="jasper-jdt.jar" value="${jasper-jdt.home}/jasper-jdt.jar"/>
96
<available property="tomcat-dbcp.present" file="${tomcat-dbcp.jar}" />
97
<available property="jdk16.present" classname="javax.sql.StatementEvent" />
100
<path id="tomcat.classpath">
101
<pathelement location="${ant.jar}"/>
102
<pathelement location="${jdt.jar}"/>
105
<!-- Version info filter set -->
107
<format property="TODAY" pattern="MMM d yyyy" locale="en"/>
108
<format property="TSTAMP" pattern="hh:mm:ss"/>
110
<filterset id="version.filters">
111
<filter token="YEAR" value="${year}"/>
112
<filter token="VERSION" value="${version}"/>
113
<filter token="VERSION_NUMBER" value="${version.number}"/>
114
<filter token="VERSION_MAJOR" value="${version.major}"/>
115
<filter token="VERSION_MAJOR_MINOR" value="${version.major.minor}"/>
116
<filter token="VERSION_BUILT" value="${TODAY} ${TSTAMP}"/>
119
<!-- Just build Tomcat -->
120
<target name="build-prepare">
122
<available classname="junit.framework.TestCase" property="junit.present" />
124
<mkdir dir="${tomcat.classes}"/>
126
<delete dir="${tomcat.build}/temp" />
127
<delete dir="${tomcat.build}/work" />
129
<mkdir dir="${tomcat.build}"/>
130
<mkdir dir="${tomcat.build}/bin"/>
131
<mkdir dir="${tomcat.build}/conf"/>
132
<mkdir dir="${tomcat.build}/lib"/>
133
<mkdir dir="${tomcat.build}/logs"/>
134
<mkdir dir="${tomcat.build}/temp"/>
135
<mkdir dir="${tomcat.build}/webapps"/>
139
<target name="compile">
141
<!-- Compile internal server components -->
142
<javac srcdir="java" destdir="${tomcat.classes}"
143
debug="${compile.debug}"
144
deprecation="${compile.deprecation}"
145
source="${compile.source}"
146
target="${compile.target}"
147
optimize="${compile.optimize}"
148
excludes="**/CVS/**,**/.svn/**"
149
encoding="ISO-8859-1">
150
<!-- Comment this in to show unchecked warnings:
151
<compilerarg value="-Xlint:unchecked"/>
153
<classpath refid="tomcat.classpath" />
154
<exclude name="org/apache/naming/factory/webservices/**" />
156
<!-- Copy static resource files -->
157
<copy todir="${tomcat.classes}" encoding="ISO-8859-1">
158
<filterset refid="version.filters"/>
160
<include name="**/*.properties"/>
161
<include name="**/*.dtd"/>
162
<include name="**/*.tasks"/>
163
<include name="**/*.xsd"/>
164
<include name="**/*.xml"/>
170
<target name="build-only" depends="build-prepare,compile,package" />
172
<!-- Pattern sets for jar files -->
173
<patternset id="files.annotations-api">
174
<include name="javax/annotation/*" />
175
<include name="javax/annotation/security/*" />
176
<include name="javax/ejb/*" />
177
<include name="javax/persistence/*" />
178
<include name="javax/xml/ws/*" />
181
<patternset id="files.servlet-api">
182
<include name="javax/servlet/*" />
183
<include name="javax/servlet/http/*" />
184
<include name="javax/servlet/resources/*" />
187
<patternset id="files.jsp-api">
188
<include name="javax/servlet/jsp/**" />
191
<patternset id="files.el-api">
192
<include name="javax/el/*" />
195
<patternset id="files.bootstrap">
196
<include name="org/apache/catalina/startup/Bootstrap.*" />
197
<include name="org/apache/catalina/startup/catalina.properties" />
198
<include name="org/apache/catalina/startup/CatalinaProperties.*" />
199
<include name="org/apache/catalina/startup/ClassLoaderFactory.*" />
200
<include name="org/apache/catalina/startup/Tool.*" />
201
<include name="org/apache/catalina/loader/StandardClassLoader*.*" />
202
<include name="org/apache/catalina/loader/Extension.*" />
203
<include name="org/apache/catalina/loader/Reloader.*" />
204
<include name="org/apache/catalina/security/SecurityClassLoad.*" />
205
<include name="org/apache/naming/JndiPermission.*" />
206
<include name="org/apache/tomcat/util/compat/*" />
209
<patternset id="files.tomcat-juli">
210
<include name="org/apache/juli/**" />
213
<patternset id="files.catalina">
214
<include name="org/apache/*" />
215
<include name="org/apache/catalina/**" />
216
<include name="org/apache/naming/**" />
218
<exclude name="org/apache/catalina/ant/**" />
219
<exclude name="org/apache/catalina/cluster/**" />
220
<exclude name="org/apache/catalina/ha/**" />
221
<exclude name="org/apache/catalina/mbeans/JmxRemote*" />
222
<exclude name="org/apache/catalina/tribes/**" />
223
<exclude name="org/apache/catalina/launcher/**" />
224
<exclude name="org/apache/catalina/storeconfig/**" />
225
<exclude name="org/apache/naming/factory/webservices/**" />
228
<patternset id="files.catalina-tribes">
229
<include name="org/apache/catalina/tribes/**" />
232
<patternset id="files.catalina-ha">
233
<include name="org/apache/catalina/ha/**" />
236
<patternset id="files.catalina-ant">
237
<include name="org/apache/catalina/ant/*" />
238
<include name="org/apache/catalina/ant/jmx/*" />
239
<include name="org/apache/catalina/util/Base64.*" />
242
<patternset id="files.tomcat-coyote">
243
<include name="org/apache/coyote/**" />
244
<include name="org/apache/tomcat/jni/**" />
245
<include name="org/apache/jk/**" />
246
<include name="org/apache/tomcat/util/**" />
249
<patternset id="files.jasper">
250
<include name="org/apache/*" />
251
<include name="org/apache/jasper/**" />
254
<patternset id="files.jasper-el">
255
<include name="org/apache/el/**" />
259
<macrodef name="jarIt" description="utility macro for standard JAR packaging">
260
<attribute name="jarfile" description="the name of the JAR file to create"/>
261
<attribute name="filesId" description="the patternset id of the files to use"/>
262
<attribute name="manifest" description="the manifest file use"
263
default="${tomcat.manifests}/default.manifest" />
264
<attribute name="notice" description="the LICENSE file to use"
265
default="${tomcat.manifests}/default.notice" />
266
<attribute name="license" description="the NOTICE file to use"
267
default="${tomcat.manifests}/default.license" />
269
<jar jarfile="@{jarfile}" manifest="@{manifest}">
270
<fileset dir="${tomcat.classes}">
271
<patternset refid="@{filesId}"/>
272
<!-- Javadoc and i18n exclusions -->
273
<exclude name="**/package.html" />
274
<exclude name="**/LocalStrings_*" />
276
<zipfileset file="@{notice}" fullpath="META-INF/NOTICE" />
277
<zipfileset file="@{license}" fullpath="META-INF/LICENSE" />
282
<target name="build-manifests" >
283
<!-- Filtering tokens for JAR manifests-->
284
<filter token="source.jdk" value="${compile.source}"/>
285
<filter token="target.jdk" value="${compile.target}"/>
286
<filter token="servlet.revision" value="${servlet.revision}"/>
287
<filter token="jsp.revision" value="${jsp.revision}"/>
288
<filter token="el.revision" value="${el.revision}"/>
290
<mkdir dir="${tomcat.manifests}" />
291
<copy todir="${tomcat.manifests}" overwrite="yes" filtering="yes"
292
encoding="ISO-8859-1">
293
<filterset refid="version.filters"/>
294
<fileset dir="${tomcat.home}/res/META-INF" >
295
<include name="*.manifest" />
296
<include name="*.license" />
297
<include name="*.notice" />
303
<target name="package" depends="build-manifests" >
304
<!-- Common Annotations 1.0 JAR File -->
305
<jarIt jarfile="${annotations-api.jar}" filesId="files.annotations-api"
306
manifest="${tomcat.manifests}/annotations-api.jar.manifest" />
308
<!-- Servlet 2.5 Implementation JAR File -->
309
<jarIt jarfile="${servlet-api.jar}" filesId="files.servlet-api"
310
manifest="${tomcat.manifests}/servlet-api.jar.manifest" />
312
<!-- JSP 2.1 Implementation JAR File -->
313
<jarIt jarfile="${jsp-api.jar}" filesId="files.jsp-api"
314
manifest="${tomcat.manifests}/jsp-api.jar.manifest" />
317
<!-- JSP 2.1 EL Implementation JAR File -->
318
<jarIt jarfile="${el-api.jar}" filesId="files.el-api"
319
manifest="${tomcat.manifests}/el-api.jar.manifest" />
321
<!-- Bootstrap JAR File -->
322
<jarIt jarfile="${bootstrap.jar}" filesId="files.bootstrap"
323
manifest="${tomcat.manifests}/bootstrap.jar.manifest" />
325
<!-- Tomcat-juli JAR File -->
326
<jarIt jarfile="${tomcat-juli.jar}" filesId="files.tomcat-juli" />
328
<!-- Catalina Main JAR File -->
329
<jarIt jarfile="${catalina.jar}" filesId="files.catalina" />
331
<!-- Catalina GroupCom/Tribes JAR File -->
332
<jarIt jarfile="${catalina-tribes.jar}" filesId="files.catalina-tribes" />
334
<!-- Catalina Cluster/HA JAR File -->
335
<jarIt jarfile="${catalina-ha.jar}" filesId="files.catalina-ha" />
337
<!-- Catalina Ant Tasks JAR File -->
338
<jarIt jarfile="${catalina-ant.jar}" filesId="files.catalina-ant" />
340
<!-- Protocol handlers - Coyote -->
341
<jarIt jarfile="${tomcat-coyote.jar}" filesId="files.tomcat-coyote" />
343
<!-- Jasper Implementation JAR File -->
344
<jarIt jarfile="${jasper.jar}" filesId="files.jasper" />
346
<!-- Jasper EL Implementation JAR File -->
347
<jarIt jarfile="${jasper-el.jar}" filesId="files.jasper-el" />
350
<jar jarfile="${tomcat.build}/lib/tomcat-i18n-es.jar"
351
manifest="${tomcat.manifests}/default.manifest" >
352
<fileset dir="${tomcat.classes}">
353
<include name="**/LocalStrings_es.properties" />
355
<zipfileset file="${tomcat.manifests}/default.notice"
356
fullpath="META-INF/NOTICE" />
357
<zipfileset file="${tomcat.manifests}/default.license"
358
fullpath="META-INF/LICENSE" />
360
<jar jarfile="${tomcat.build}/lib/tomcat-i18n-fr.jar"
361
manifest="${tomcat.manifests}/default.manifest" >
362
<fileset dir="${tomcat.classes}">
363
<include name="**/LocalStrings_fr.properties" />
365
<zipfileset file="${tomcat.manifests}/default.notice"
366
fullpath="META-INF/NOTICE" />
367
<zipfileset file="${tomcat.manifests}/default.license"
368
fullpath="META-INF/LICENSE" />
370
<jar jarfile="${tomcat.build}/lib/tomcat-i18n-ja.jar"
371
manifest="${tomcat.manifests}/default.manifest" >
372
<fileset dir="${tomcat.classes}">
373
<include name="**/LocalStrings_ja.properties" />
375
<zipfileset file="${tomcat.manifests}/default.notice"
376
fullpath="META-INF/NOTICE" />
377
<zipfileset file="${tomcat.manifests}/default.license"
378
fullpath="META-INF/LICENSE" />
383
<target name="build-docs">
385
<copy todir="${tomcat.build}/webapps">
386
<fileset dir="webapps">
387
<include name="docs/images/**"/>
388
<include name="docs/**/*.html"/>
389
<include name="docs/WEB-INF/**"/>
390
<include name="docs/appdev/*.txt"/>
391
<include name="docs/appdev/sample/**"/>
393
<fileset dir="webapps">
394
<include name="docs/architecture/**"/>
395
<exclude name="docs/architecture/*.xml"/>
398
<copy todir="${tomcat.build}/webapps/docs" encoding="ISO-8859-1">
399
<filterset refid="version.filters"/>
401
<include name="BUILDING.txt"/>
402
<include name="RUNNING.txt"/>
405
<copy tofile="${tomcat.build}/webapps/docs/RELEASE-NOTES.txt" file="RELEASE-NOTES" encoding="ISO-8859-1">
406
<filterset refid="version.filters"/>
409
<copy tofile="${tomcat.build}/webapps/docs/appdev/sample/build.xml"
410
file="webapps/docs/appdev/build.xml.txt"/>
412
<mkdir dir="${tomcat.build}/webapps/docs/funcspecs" />
414
<!-- XSL processing -->
415
<xslt basedir="webapps/docs"
416
destdir="${tomcat.build}/webapps/docs"
418
style="webapps/docs/tomcat-docs.xsl"
419
excludes="build.xml project.xml"
421
<param name="relative-path" expression="."/>
423
<xslt basedir="webapps/docs/appdev"
424
destdir="${tomcat.build}/webapps/docs/appdev"
426
style="webapps/docs/tomcat-docs.xsl"
427
excludes="project.xml"
429
<param name="relative-path" expression=".."/>
431
<xslt basedir="webapps/docs/funcspecs"
432
destdir="${tomcat.build}/webapps/docs/funcspecs"
434
style="webapps/docs/tomcat-docs.xsl"
435
excludes="project.xml"
437
<param name="relative-path" expression=".."/>
439
<xslt basedir="webapps/docs/config"
440
destdir="${tomcat.build}/webapps/docs/config"
442
style="webapps/docs/tomcat-docs.xsl"
443
excludes="project.xml"
445
<param name="relative-path" expression=".."/>
447
<xslt basedir="webapps/docs/architecture"
448
destdir="${tomcat.build}/webapps/docs/architecture"
450
style="webapps/docs/tomcat-docs.xsl"
451
excludes="project.xml"
453
<param name="relative-path" expression=".."/>
456
<xslt basedir="webapps/docs/tribes"
457
destdir="${tomcat.build}/webapps/docs/tribes"
459
style="webapps/docs/tomcat-docs.xsl"
460
excludes="project.xml"
462
<param name="relative-path" expression=".."/>
466
<target name="warn.dbcp" unless="tomcat-dbcp.present">
467
<echo>WARNING: tomcat-dbcp.jar not included, this build can't be used
468
in a release. Please run 'ant download' with JDK1.5 if you are
469
building a tomcat release.</echo>
472
<target name="deploy" depends="build-only,build-docs,warn.dbcp">
474
<copy tofile="${tomcat.build}/bin/tomcat-native.tar.gz"
475
file="${tomcat-native.tar.gz}" />
477
<copy todir="${tomcat.build}/bin" file="${commons-daemon.jar}" />
478
<copy todir="${tomcat.build}/bin" file="${commons-daemon.jsvc.tar.gz}" />
480
<!-- Copy scripts -->
481
<copy todir="${tomcat.build}/bin">
483
<exclude name="**/*.launch"/>
484
<exclude name="**/*.sh"/>
485
<exclude name="**/*.bat"/>
488
<copy todir="${tomcat.build}/bin" encoding="ISO-8859-1">
489
<filterset refid="version.filters"/>
491
<include name="**/*.sh"/>
492
<include name="**/*.bat"/>
495
<!-- Copy doesn't retain permissions -->
496
<chmod dir="${tomcat.build}/bin" includes="*.sh" perm="+x"/>
498
<!-- Copy static resource files -->
499
<copy todir="${tomcat.build}/conf" encoding="ISO-8859-1">
500
<filterset refid="version.filters"/>
502
<include name="**/*.policy"/>
503
<include name="**/*.xml"/>
504
<include name="**/*.properties"/>
508
<!-- Copy other regular webapps -->
509
<copy todir="${tomcat.build}/webapps">
510
<fileset dir="webapps">
511
<include name="ROOT/**"/>
512
<exclude name="ROOT/index.html"/>
513
<exclude name="ROOT/index.jsp"/>
514
<include name="examples/**"/>
515
<include name="manager/**"/>
516
<include name="host-manager/**"/>
519
<copy todir="${tomcat.build}/webapps" encoding="ISO-8859-1">
520
<filterset refid="version.filters" />
521
<fileset dir="webapps">
522
<include name="ROOT/index.html"/>
523
<include name="ROOT/index.jsp"/>
527
<copy tofile="${tomcat.build}/webapps/ROOT/RELEASE-NOTES.txt" file="RELEASE-NOTES" encoding="ISO-8859-1">
528
<filterset refid="version.filters"/>
531
<!-- Build classes for examples webapp -->
532
<javac srcdir="webapps/examples/WEB-INF/classes"
533
destdir="${tomcat.build}/webapps/examples/WEB-INF/classes"
534
debug="${compile.debug}" deprecation="${compile.deprecation}"
535
source="${compile.source}"
536
target="${compile.target}"
537
optimize="${compile.optimize}"
538
classpath="${tomcat.classes}"
539
excludes="**/CVS/**,**/.svn/**"
540
encoding="ISO-8859-1">
543
<javac srcdir="webapps/examples/jsp/plugin/applet"
544
destdir="${tomcat.build}/webapps/examples/jsp/plugin/applet"
545
debug="${compile.debug}" deprecation="${compile.deprecation}"
546
source="${compile.source}"
547
target="${compile.target}"
548
optimize="${compile.optimize}"
549
classpath="$tomcat.lcasses}"
550
excludes="**/CVS/**,**/.svn/**"
551
encoding="ISO-8859-1">
554
<!-- Add sources for examples -->
555
<taskdef name="txt2html"
556
classname="org.apache.tomcat.buildutil.Txt2Html"
557
classpath="${tomcat.classes}" />
558
<txt2html todir="${tomcat.build}/webapps/examples/jsp/jsp2/simpletag">
559
<fileset dir="webapps/examples/WEB-INF/classes/jsp2/examples">
560
<include name="BookBean.java"/>
562
<fileset dir="webapps/examples/WEB-INF/classes/jsp2/examples/simpletag">
563
<include name="FindBookSimpleTag.java"/>
564
<include name="RepeatSimpleTag.java"/>
565
<include name="HelloWorldSimpleTag.java"/>
567
<fileset dir="webapps/examples/WEB-INF/classes/jsp2/examples/el">
568
<include name="Functions.java"/>
572
<txt2html todir="${tomcat.build}/webapps/examples/jsp/jsp2/jspattribute">
573
<fileset dir="webapps/examples/WEB-INF/classes/jsp2/examples">
574
<include name="FooBean.java"/>
576
<fileset dir="webapps/examples/WEB-INF/classes/jsp2/examples/simpletag">
577
<include name="ShuffleSimpleTag.java"/>
578
<include name="TileSimpleTag.java"/>
579
<include name="HelloWorldSimpleTag.java"/>
583
<txt2html todir="${tomcat.build}/webapps/examples/jsp/cal">
584
<fileset dir="webapps/examples/WEB-INF/classes/cal">
585
<include name="Entries.java"/>
586
<include name="Entry.java"/>
587
<include name="JspCalendar.java"/>
588
<include name="TableBean.java"/>
592
<txt2html todir="${tomcat.build}/webapps/examples/jsp/jsptoserv">
593
<fileset dir="webapps/examples/WEB-INF/classes">
594
<include name="servletToJsp.java"/>
598
<txt2html todir="${tomcat.build}/webapps/examples/jsp/jsp2/el">
599
<fileset dir="webapps/examples/WEB-INF/classes/jsp2/examples/el">
600
<include name="Functions.java"/>
604
<txt2html todir="${tomcat.build}/webapps/examples/jsp/jsp2/misc">
605
<fileset dir="webapps/examples/WEB-INF/classes/jsp2/examples/simpletag">
606
<include name="EchoAttributesTag.java"/>
610
<txt2html todir="${tomcat.build}/webapps/examples/jsp/jsp2/tagfiles">
611
<fileset dir="webapps/examples/WEB-INF/tags">
612
<include name="**/*.tag" />
616
<txt2html todir="${tomcat.build}/webapps/examples">
617
<fileset dir="webapps/examples">
618
<include name="**/*.jsp" />
619
<include name="**/*.jspx" />
620
<include name="**/*.jspf" />
621
<exclude name="error/errorpge.jsp"/>
622
<exclude name="forward/one.jsp"/>
623
<exclude name="include/foo.jsp"/>
624
<exclude name="jsptoserv/hello.jsp"/>
625
<exclude name="security/protected/error.jsp"/>
626
<exclude name="security/protected/index.jsp"/>
627
<exclude name="security/protected/login.jsp"/>
628
<exclude name="source.jsp"/>
632
<copy file="${tomcat-dbcp.jar}" todir="${tomcat.build}/lib"
633
failonerror="false"/>
634
<copy file="${jasper-jdt.jar}" todir="${tomcat.build}/lib" />
638
<target name="clean-depend"
639
description="Clean depend src components">
640
<delete dir="${tomcat-dbcp.home}"/>
641
<delete dir="${jasper-jdt.home}"/>
644
<target name="clean">
645
<delete dir="${tomcat.classes}" />
646
<delete dir="${tomcat.build}" />
647
<delete dir="${tomcat.manifests}" />
650
<!-- Download and dependency building -->
651
<target name="proxyflags">
652
<!-- check proxy parameters. -->
653
<condition property="useproxy">
654
<equals arg1="${proxy.use}" arg2="on" />
658
<target name="setproxy" depends="proxyflags" if="useproxy">
659
<taskdef name="setproxy"
660
classname="org.apache.tools.ant.taskdefs.optional.net.SetProxy" />
661
<setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"
662
proxyuser="${proxy.user}" proxypassword="${proxy.password}" />
663
<echo message="Using ${proxy.host}:${proxy.port} to download ${sourcefile}"/>
666
<target name="testexist">
667
<echo message="Testing for ${destfile}"/>
668
<available file="${destfile}" property="exist"/>
671
<target name="downloadgz" unless="exist" depends="setproxy,testexist">
672
<!-- Download and extract the package -->
673
<get src="${sourcefile}" dest="${base.path}/file.tar.gz" />
674
<gunzip src="${base.path}/file.tar.gz" dest="${base.path}/file.tar"/>
675
<untar src="${base.path}/file.tar" dest="${base.path}"/>
676
<delete file="${base.path}/file.tar"/>
677
<delete file="${base.path}/file.tar.gz"/>
680
<target name="downloadzip" unless="exist" depends="setproxy,testexist">
681
<!-- Download and extract the package -->
682
<get src="${sourcefile}" dest="${base.path}/file.zip" />
683
<mkdir dir="${destdir}" />
684
<unzip src="${base.path}/file.zip" dest="${destdir}"/>
685
<delete file="${base.path}/file.zip"/>
688
<target name="downloadfile" unless="exist" depends="setproxy,testexist">
689
<!-- Download extract the file -->
690
<mkdir dir="${destdir}" />
691
<get src="${sourcefile}" dest="${destfile}" />
694
<target name="download"
695
description="Download (and build as necessary) dependent components"
696
depends="build-manifests">
698
<antcall target="downloadfile">
699
<param name="sourcefile" value="${tomcat-native.loc}"/>
700
<param name="destfile" value="${tomcat-native.tar.gz}"/>
701
<param name="destdir" value="${tomcat-native.home}"/>
704
<antcall target="downloadfile">
705
<param name="sourcefile" value="${tomcat-native.dll}/win32/tcnative-1.dll"/>
706
<param name="destfile" value="${tomcat-native.home}/tcnative-1.dll.x86"/>
707
<param name="destdir" value="${tomcat-native.home}"/>
710
<antcall target="downloadfile">
711
<param name="sourcefile" value="${tomcat-native.dll}/win64/x64/tcnative-1.dll"/>
712
<param name="destfile" value="${tomcat-native.home}/tcnative-1.dll.x64"/>
713
<param name="destdir" value="${tomcat-native.home}"/>
716
<antcall target="downloadfile">
717
<param name="sourcefile" value="${tomcat-native.dll}/win64/ia64/tcnative-1.dll"/>
718
<param name="destfile" value="${tomcat-native.home}/tcnative-1.dll.i64"/>
719
<param name="destdir" value="${tomcat-native.home}"/>
722
<antcall target="downloadgz">
723
<param name="sourcefile" value="${commons-daemon.loc}"/>
724
<param name="destfile" value="${commons-daemon.jar}"/>
727
<!-- Build Tomcat DBCP bundle -->
728
<antcall target="downloadgz">
729
<param name="sourcefile" value="${commons-pool-src.loc}"/>
730
<param name="destfile" value="${commons-pool.home}/build.xml" />
732
<antcall target="downloadgz">
733
<param name="sourcefile" value="${commons-dbcp-src.loc}"/>
734
<param name="destfile" value="${commons-dbcp.home}/build.xml" />
736
<mkdir dir="${tomcat-dbcp.home}"/>
737
<antcall target="build-tomcat-dbcp">
738
<param name="basedir" value="${tomcat-dbcp.home}" />
741
<!-- Build Jasper JDT bundle -->
742
<antcall target="downloadzip">
743
<param name="sourcefile" value="${jdt.loc}"/>
744
<param name="destfile" value="${jdt.jar}"/>
745
<param name="destdir" value="${base.path}"/>
747
<mkdir dir="${jasper-jdt.home}"/>
748
<antcall target="build-jasper-jdt">
749
<param name="basedir" value="${jasper-jdt.home}" />
752
<antcall target="downloadzip">
753
<param name="sourcefile" value="${nsis.loc}"/>
754
<param name="destfile" value="${nsis.exe}"/>
755
<param name="destdir" value="${nsis.home}/.."/>
760
<target name="build-tomcat-dbcp" unless="jdk16.present"
761
depends="build-manifests">
762
<copy todir="${tomcat-dbcp.home}">
763
<fileset dir="${commons-pool.home}">
764
<include name="**/*.java" />
765
<exclude name="**/test/**" />
767
<fileset dir="${commons-dbcp.home}">
768
<include name="**/*.java" />
769
<exclude name="**/test/**" />
772
<replace dir="${tomcat-dbcp.home}/src/java/org/apache/commons"
773
encoding="ISO-8859-1">
774
<replacefilter token="org.apache.commons"
775
value="org.apache.tomcat.dbcp" />
777
<replace dir="${tomcat-dbcp.home}/src/java/org/apache/commons/pool/impl"
778
encoding="ISO-8859-1">
779
<replacefilter token="enum"
780
value="enumeration" />
783
<mkdir dir="${tomcat-dbcp.home}/src/java/org/apache/tomcat/dbcp" />
784
<move todir="${tomcat-dbcp.home}/src/java/org/apache/tomcat/dbcp">
785
<fileset dir="${tomcat-dbcp.home}/src/java/org/apache/commons" />
787
<mkdir dir="${tomcat-dbcp.home}/classes"/>
788
<javac destdir="${tomcat-dbcp.home}/classes"
790
debug="${compile.debug}"
791
deprecation="${compile.deprecation}"
792
source="${compile.source}"
793
target="${compile.target}"
794
sourcepath="${tomcat-dbcp.home}/src/java"
795
srcdir="${tomcat-dbcp.home}/src/java"
796
encoding="ISO-8859-1">
797
<include name="**" />
799
<jar jarfile="${tomcat-dbcp.jar}"
801
manifest="${tomcat.manifests}/default.manifest">
802
<fileset dir="${tomcat-dbcp.home}/classes">
803
<include name="**/*.class" />
804
<include name="**/*.properties" />
806
<zipfileset file="${tomcat.manifests}/default.notice"
807
fullpath="META-INF/NOTICE" />
808
<zipfileset file="${tomcat.manifests}/default.license"
809
fullpath="META-INF/LICENSE" />
813
<target name="build-jasper-jdt" depends="build-manifests">
814
<unjar src="${jdt.jar}" dest="${jasper-jdt.home}" />
815
<jar destfile="${jasper-jdt.jar}" index="true"
816
manifest="${tomcat.manifests}/default.manifest">
817
<fileset dir="${jasper-jdt.home}">
818
<include name="org/eclipse/jdt/core/compiler/**"/>
819
<include name="org/eclipse/jdt/internal/compiler/**"/>
820
<include name="org/eclipse/jdt/internal/core/util/CommentRecorder*"/>
822
<zipfileset file="${tomcat.manifests}/jasper-jdt.jar.notice"
823
fullpath="META-INF/NOTICE" />
824
<zipfileset file="${tomcat.manifests}/jasper-jdt.jar.license"
825
fullpath="META-INF/LICENSE" />