-
Notifications
You must be signed in to change notification settings - Fork 24
/
dist.xml
681 lines (605 loc) · 26.8 KB
/
dist.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
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
<?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="release" 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.deployer" value="${tomcat.output}/deployer"/>
<property name="tomcat.extras" value="${tomcat.output}/extras"/>
<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"/>
<!-- Version info filter set -->
<filterset id="version.filters">
<filter token="YEAR" value="${year}"/>
<filter token="VERSION" value="${version}"/>
<filter token="VERSION_NUMBER" value="${version.number}"/>
<filter token="VERSION_MAJOR" value="${version.major}"/>
<filter token="VERSION_MAJOR_MINOR" value="${version.major.minor}"/>
</filterset>
<!-- Files that need to have their line endings changed for src distros -->
<patternset id="src.files" >
<include name="**/INSTALLLICENSE"/>
<include name="**/KEYS"/>
<include name="**/LICENSE"/>
<include name="**/NOTICE"/>
<include name="**/RELEASE-NOTES"/>
<include name="**/*.bat"/>
<include name="**/*.classpath"/>
<include name="**/*.dtd"/>
<include name="**/*.htm"/>
<include name="**/*.html"/>
<include name="**/*.ini"/>
<include name="**/*.java"/>
<include name="**/*.jjt"/>
<include name="**/*.jsp"/>
<include name="**/*.jspf"/>
<include name="**/*.jspx"/>
<include name="**/*.license"/>
<include name="**/*.manifest"/>
<include name="**/*.mdl"/>
<include name="**/*.notice"/>
<include name="**/*.nsi"/>
<include name="**/*.policy"/>
<include name="**/*.pom"/>
<include name="**/*.project"/>
<include name="**/*.properties"/>
<include name="**/*.properties.default"/>
<include name="**/*.sh"/>
<include name="**/*.svg"/>
<include name="**/*.tag"/>
<include name="**/*.tagx"/>
<include name="**/*.tasks"/>
<include name="**/*.tld"/>
<include name="**/*.txt"/>
<include name="**/*.xml"/>
<include name="**/*.xsd"/>
<include name="**/*.xsl"/>
</patternset>
<!-- ====================== COMBO: Clean All Directories ================ -->
<target name="clean"
description="Clean all components">
<delete dir="${tomcat.deployer}"/>
<delete dir="${tomcat.dist}" failonerror="false"/>
</target>
<!-- ====================== DIST: Create Directories ==================== -->
<target name="dist-prepare">
<mkdir dir="${tomcat.dist}"/>
<mkdir dir="${tomcat.dist}/bin"/>
<mkdir dir="${tomcat.dist}/conf"/>
<mkdir dir="${tomcat.dist}/lib"/>
<mkdir dir="${tomcat.dist}/logs"/>
<mkdir dir="${tomcat.dist}/temp"/>
<mkdir dir="${tomcat.dist}/webapps"/>
<mkdir dir="${tomcat.dist}/work"/>
<mkdir dir="${tomcat.release}/v${version}/bin" />
<mkdir dir="${tomcat.release}/v${version}/src" />
</target>
<!-- ====================== DIST: Copy Static Files ===================== -->
<target name="dist-static" depends="dist-prepare">
<!-- Copy the top-level documentation files -->
<copy todir="${tomcat.dist}" encoding="ISO-8859-1">
<filterset refid="version.filters"/>
<fileset dir=".">
<include name="INSTALLING.txt"/>
<include name="LICENSE"/>
<include name="NOTICE"/>
<include name="RELEASE-NOTES"/>
<include name="RUNNING.txt"/>
</fileset>
</copy>
<!-- Copy the contents of each "build" directory -->
<copy todir="${tomcat.dist}/bin">
<fileset dir="${tomcat.build}/bin">
</fileset>
</copy>
<copy todir="${tomcat.dist}/lib">
<fileset dir="${tomcat.build}/lib" />
</copy>
<copy todir="${tomcat.dist}/conf">
<fileset dir="${tomcat.build}/conf">
</fileset>
</copy>
<copy todir="${tomcat.dist}/webapps">
<fileset dir="${tomcat.build}/webapps">
<exclude name="**/ROOT/WEB-INF/classes/**" />
<exclude name="**/WEB-INF/src/**" />
</fileset>
</copy>
<touch file="${tomcat.dist}/temp/safeToDelete.tmp" />
<!-- Windows binaries for each platform -->
<!-- 32 bit -->
<copy file="${commons-daemon.home}/windows/prunsrv.exe"
tofile="${tomcat.dist}/bin/tomcat${version.major}.exe" />
<copy file="${commons-daemon.home}/windows/prunmgr.exe"
tofile="${tomcat.dist}/bin/tomcat${version.major}w.exe" />
<!-- 64 bit amd -->
<copy file="${commons-daemon.home}/windows/amd64/prunsrv.exe"
tofile="${tomcat.dist}/bin/x64/tomcat${version.major}.exe" />
<!-- 64 bit ia -->
<copy file="${commons-daemon.home}/windows/ia64/prunsrv.exe"
tofile="${tomcat.dist}/bin/i64/tomcat${version.major}.exe" />
<!-- tc native -->
<copy todir="${tomcat.dist}/bin">
<fileset dir="${tomcat-native.home}/bin">
<include name="*.dll"/>
<include name="**/*.dll"/>
</fileset>
</copy>
<!-- Correct permissions and line endings on "bin" scripts -->
<fixcrlf srcdir="${tomcat.dist}/bin" includes="*.sh" eol="lf" encoding="ISO-8859-1" fixlast="false" />
<fixcrlf srcdir="${tomcat.dist}/bin" includes="*.bat" eol="crlf" encoding="ISO-8859-1" fixlast="false" />
<chmod dir="${tomcat.dist}/bin" includes="*.sh" perm="+x"/>
</target>
<target name="dist-javadoc" depends="dist-source"
description="Create the Tomcat javadoc" >
<javadoc packagenames="org.apache.*"
sourcepath="${tomcat.dist}/src/java"
destdir="${tomcat.dist}/webapps/docs/api"
author="true" version="true"
windowtitle="Apache Tomcat ${version} API Documentation"
doctitle="Apache Tomcat ${version} API"
header="<b>Apache Tomcat ${version}</b>"
bottom="Copyright &#169; 2000-${year} Apache Software Foundation. All Rights Reserved."
additionalparam="-breakiterator"
maxmemory="256m" >
</javadoc>
</target>
<target name="dist-deployer" description="Create the Tomcat deployer binary" >
<!-- Servlet and JSP -->
<copy todir="${tomcat.deployer}/lib">
<fileset dir="${tomcat.build}/lib">
<include name="catalina-ant.jar"/>
<include name="el-api.jar"/>
<include name="jsp-api.jar"/>
<include name="jasper.jar"/>
<include name="jasper-el.jar"/>
<include name="servlet-api.jar"/>
</fileset>
<fileset dir="${tomcat.build}/bin">
<include name="tomcat-juli.jar"/>
</fileset>
</copy>
<!-- Digester and dependencies -->
<jar jarfile="${tomcat.deployer}/lib/catalina-deployer.jar">
<fileset dir="${tomcat.classes}">
<include name="org/apache/catalina/startup/DigesterFactory.class" />
<include name="org/apache/catalina/util/SchemaResolver.class" />
<include name="org/apache/catalina/util/StringManager.class" />
<include name="org/apache/tomcat/util/*" />
<include name="org/apache/tomcat/util/digester/*" />
<exclude name="**/package.html" />
<exclude name="**/LocalStrings_*" />
</fileset>
</jar>
<!-- Main build script -->
<copy todir="${tomcat.deployer}">
<fileset dir="${basedir}/res/deployer" />
</copy>
<!-- Copy deployer documentation -->
<copy todir="${tomcat.deployer}">
<fileset dir="${tomcat.build}/webapps/docs">
<include name="images/asf-logo.gif" />
<include name="images/tomcat.gif" />
</fileset>
</copy>
<copy tofile="${tomcat.deployer}/deployer-howto.html"
file="${tomcat.build}/webapps/docs/deployer-howto.html"/>
</target>
<!-- ====================== DIST: Create Sources ======================== -->
<target name="dist-source">
<mkdir dir="${tomcat.dist}/src"/>
<!-- Tomcat source -->
<copy todir="${tomcat.dist}/src">
<fileset dir="${basedir}">
<exclude name=".*/**"/>
<exclude name="output/**"/>
<exclude name="build.properties"/>
</fileset>
</copy>
</target>
<!-- ================= DIST: Create Windows Installer =================== -->
<target name="installer"
description="Create Windows installer" unless="skip.installer">
<echo message="Builds a Windows installer based on Nullsoft Installer"/>
<copy todir="${tomcat.dist}">
<fileset dir="res">
<include name="INSTALLLICENSE" />
<include name="*.bmp" />
<include name="*.ico" />
<include name="confinstall/**" />
</fileset>
</copy>
<copy file="res/tomcat.nsi" tofile="${tomcat.dist}/tomcat.nsi" overwrite="true" encoding="ISO-8859-1">
<filterset refid="version.filters"/>
</copy>
<copy file="${nsis.installoptions.dll}" todir="${tomcat.dist}" />
<copy file="${nsis.nsexec.dll}" todir="${tomcat.dist}" />
<copy file="${nsis.nsisdl.dll}" todir="${tomcat.dist}" />
<fixcrlf srcdir="${tomcat.dist}" eol="crlf" encoding="ISO-8859-1" fixlast="false">
<include name="*.txt" />
<include name="INSTALLLICENSE" />
<include name="LICENSE" />
<include name="NOTICE" />
<include name="tomcat.nsi" />
<include name="conf/**" />
<!-- Make sure the RELEASE-NOTES has Windows line endings as they may be
displayed post-install -->
<include name="webapps/ROOT/RELEASE-NOTES.txt" />
</fixcrlf>
<exec dir="${tomcat.dist}" executable="${nsis.exe}" osfamily="windows">
<arg value="/DNSISDIR=${nsis.home}" />
<arg value="tomcat.nsi" />
</exec>
<exec dir="${tomcat.dist}" executable="wine" osfamily="unix">
<arg value="${nsis.exe}" />
<arg value="/DNSISDIR=${nsis.home}" />
<arg value="tomcat.nsi" />
</exec>
<!-- Restore original line ending-->
<fixcrlf srcdir="${tomcat.dist}/webapps/ROOT"
includes="RELEASE-NOTES.txt" encoding="ISO-8859-1" fixlast="false" />
<move file="${tomcat.dist}/tomcat-installer.exe" tofile="${tomcat.release}/v${version}/bin/${final.name}.exe" />
<antcall target="md5sum">
<param name="file" value="${tomcat.release}/v${version}/bin/${final.name}.exe" />
</antcall>
</target>
<!-- ==================== RELEASE: Create Release ======================= -->
<target name="release" depends="clean,dist-static,dist-deployer,installer,package-zip,package-winzip,package-tgz,package-deployer-zip,package-deployer-tgz,dist-source,dist-javadoc,package-docs-tgz,package-src-zip,package-src-tgz"
description="Create a Tomcat 6 packaged distribution">
<copy file="KEYS"
todir="${tomcat.release}/v${version}"/>
<copy file="RELEASE-NOTES"
todir="${tomcat.release}/v${version}"
encoding="ISO-8859-1">
<filterset refid="version.filters"/>
</copy>
<copy file="res/welcome.main.html"
tofile="${tomcat.release}/v${version}/README.html"
encoding="ISO-8859-1">
<filterset refid="version.filters"/>
</copy>
<copy file="res/welcome.bin.html"
tofile="${tomcat.release}/v${version}/bin/README.html"
encoding="ISO-8859-1">
<filterset refid="version.filters"/>
</copy>
<mkdir dir="${tomcat.release}/v${version}/bin/extras" />
<copy todir="${tomcat.release}/v${version}/bin/extras">
<fileset dir="${tomcat.extras}">
<include name="*.*"/>
</fileset>
</copy>
</target>
<!-- Packages the core zip distro -->
<target name="package-zip">
<fixcrlf srcdir="${tomcat.dist}" includes="*.txt,LICENSE,NOTICE" eol="crlf" encoding="ISO-8859-1" fixlast="false" />
<fixcrlf srcdir="${tomcat.dist}/conf" eol="crlf" encoding="ISO-8859-1" fixlast="false" />
<zip zipfile="${tomcat.release}/v${version}/bin/${final.name}.zip">
<zipfileset dir="${tomcat.dist}" prefix="${final.name}">
<include name="bin/**"/>
<include name="conf/**"/>
<include name="logs/**"/>
<include name="lib/**"/>
<include name="webapps/**"/>
<include name="work/**"/>
<include name="temp/**"/>
<include name="LICENSE"/>
<include name="NOTICE"/>
<include name="README.txt"/>
<include name="RELEASE-NOTES"/>
<include name="RUNNING.txt"/>
<include name="BENCHMARKS.txt"/>
<exclude name="bin/service.bat"/>
<exclude name="bin/x64/"/>
<exclude name="bin/i64/"/>
<exclude name="bin/*.exe"/>
<exclude name="bin/*.dll"/>
</zipfileset>
</zip>
<antcall target="md5sum">
<param name="file" value="${tomcat.release}/v${version}/bin/${final.name}.zip" />
</antcall>
</target>
<!-- Packages the core windows zip distros -->
<target name="package-winzip">
<fixcrlf srcdir="${tomcat.dist}" includes="*.txt,LICENSE,NOTICE" eol="crlf" encoding="ISO-8859-1" fixlast="false" />
<fixcrlf srcdir="${tomcat.dist}/conf" eol="crlf" encoding="ISO-8859-1" fixlast="false" />
<!-- Windows x86 package -->
<zip zipfile="${tomcat.release}/v${version}/bin/${final.name}-windows-x86.zip">
<zipfileset dir="${tomcat.dist}" prefix="${final.name}">
<include name="bin/**"/>
<include name="conf/**"/>
<include name="logs/**"/>
<include name="lib/**"/>
<include name="webapps/**"/>
<include name="work/**"/>
<include name="temp/**"/>
<include name="LICENSE"/>
<include name="NOTICE"/>
<include name="README.txt"/>
<include name="RELEASE-NOTES"/>
<include name="RUNNING.txt"/>
<include name="BENCHMARKS.txt"/>
<exclude name="bin/x64/"/>
<exclude name="bin/i64/"/>
</zipfileset>
</zip>
<antcall target="md5sum">
<param name="file" value="${tomcat.release}/v${version}/bin/${final.name}-windows-x86.zip" />
</antcall>
<!-- Windows x64 package -->
<zip zipfile="${tomcat.release}/v${version}/bin/${final.name}-windows-x64.zip">
<zipfileset dir="${tomcat.dist}" prefix="${final.name}">
<include name="bin/**"/>
<include name="conf/**"/>
<include name="logs/**"/>
<include name="lib/**"/>
<include name="webapps/**"/>
<include name="work/**"/>
<include name="temp/**"/>
<include name="LICENSE"/>
<include name="NOTICE"/>
<include name="README.txt"/>
<include name="RELEASE-NOTES"/>
<include name="RUNNING.txt"/>
<include name="BENCHMARKS.txt"/>
<exclude name="bin/x64/"/>
<exclude name="bin/i64/"/>
<exclude name="bin/*.dll"/>
<exclude name="bin/tomcat${version.major}.exe"/>
</zipfileset>
<zipfileset dir="${tomcat.dist}/bin/x64" prefix="${final.name}/bin">
<include name="*.dll"/>
<include name="*.exe"/>
</zipfileset>
</zip>
<antcall target="md5sum">
<param name="file" value="${tomcat.release}/v${version}/bin/${final.name}-windows-x64.zip" />
</antcall>
<!-- Windows i64 package -->
<zip zipfile="${tomcat.release}/v${version}/bin/${final.name}-windows-i64.zip">
<zipfileset dir="${tomcat.dist}" prefix="${final.name}">
<include name="bin/**"/>
<include name="conf/**"/>
<include name="logs/**"/>
<include name="lib/**"/>
<include name="webapps/**"/>
<include name="work/**"/>
<include name="temp/**"/>
<include name="LICENSE"/>
<include name="NOTICE"/>
<include name="README.txt"/>
<include name="RELEASE-NOTES"/>
<include name="RUNNING.txt"/>
<include name="BENCHMARKS.txt"/>
<exclude name="bin/x64/"/>
<exclude name="bin/i64/"/>
<exclude name="bin/*.dll"/>
<exclude name="bin/tomcat${version.major}.exe"/>
</zipfileset>
<zipfileset dir="${tomcat.dist}/bin/i64" prefix="${final.name}/bin">
<include name="*.dll"/>
<include name="*.exe"/>
</zipfileset>
</zip>
<antcall target="md5sum">
<param name="file" value="${tomcat.release}/v${version}/bin/${final.name}-windows-i64.zip" />
</antcall>
</target>
<!-- Packages the deployer distribution in zip format -->
<target name="package-deployer-zip">
<zip zipfile="${tomcat.release}/v${version}/bin/${final.name}-deployer.zip">
<zipfileset dir="${tomcat.deployer}" prefix="${final.name}-deployer" includes="**" />
<zipfileset dir="${tomcat.dist}" prefix="${final.name}-deployer" includes="LICENSE" />
<zipfileset dir="${tomcat.dist}" prefix="${final.name}-deployer" includes="NOTICE" />
<zipfileset dir="${tomcat.dist}" prefix="${final.name}-deployer" includes="README.txt" />
<zipfileset dir="${tomcat.dist}" prefix="${final.name}-deployer" includes="RELEASE-NOTES" />
</zip>
<antcall target="md5sum">
<param name="file" value="${tomcat.release}/v${version}/bin/${final.name}-deployer.zip" />
</antcall>
</target>
<!-- Packages the core tar.gz distro -->
<target name="package-tgz">
<fixcrlf srcdir="${tomcat.dist}" includes="*.txt,LICENSE,NOTICE" eol="lf" encoding="ISO-8859-1" fixlast="false" />
<fixcrlf srcdir="${tomcat.dist}/conf" eol="lf" encoding="ISO-8859-1" fixlast="false" />
<tar longfile="gnu" compression="gzip"
tarfile="${tomcat.release}/v${version}/bin/${final.name}.tar.gz">
<tarfileset dir="${tomcat.dist}" mode="755" prefix="${final.name}">
<include name="bin/catalina.sh" />
<include name="bin/daemon.sh" />
<include name="bin/digest.sh" />
<include name="bin/jasper.sh" />
<include name="bin/jspc.sh" />
<include name="bin/setclasspath.sh" />
<include name="bin/startup.sh" />
<include name="bin/shutdown.sh" />
<include name="bin/tool-wrapper.sh" />
<include name="bin/tool-wrapper-using-launcher.sh" />
<include name="bin/shutdown-using-launcher.sh" />
<include name="bin/startup-using-launcher.sh" />
<include name="bin/version.sh" />
</tarfileset>
<tarfileset dir="${tomcat.dist}" mode="600" prefix="${final.name}">
<include name="conf/**" />
</tarfileset>
<tarfileset dir="${tomcat.dist}" prefix="${final.name}">
<include name="bin/**" />
<include name="lib/**" />
<include name="logs/**" />
<include name="temp/**" />
<include name="webapps/**" />
<include name="work/**" />
<include name="LICENSE" />
<include name="NOTICE" />
<include name="README.txt" />
<include name="RELEASE-NOTES" />
<include name="RUNNING.txt" />
<include name="BENCHMARKS.txt" />
<exclude name="bin/catalina.sh" />
<exclude name="bin/daemon.sh" />
<exclude name="bin/digest.sh" />
<exclude name="bin/jasper.sh" />
<exclude name="bin/jspc.sh" />
<exclude name="bin/service.bat"/>
<exclude name="bin/setclasspath.sh" />
<exclude name="bin/startup.sh" />
<exclude name="bin/shutdown.sh" />
<exclude name="bin/tool-wrapper.sh" />
<exclude name="bin/tool-wrapper-using-launcher.sh" />
<exclude name="bin/shutdown-using-launcher.sh" />
<exclude name="bin/startup-using-launcher.sh" />
<exclude name="bin/version.sh" />
<exclude name="conf/**" />
<exclude name="src/**" />
<exclude name="bin/x64/"/>
<exclude name="bin/i64/"/>
<exclude name="bin/*.exe"/>
<exclude name="bin/*.dll"/>
</tarfileset>
</tar>
<antcall target="md5sum">
<param name="file" value="${tomcat.release}/v${version}/bin/${final.name}.tar.gz" />
</antcall>
</target>
<!-- Packages the deployer Tomcat distro in tar.gz format -->
<target name="package-deployer-tgz">
<fixcrlf srcdir="${tomcat.dist}"
includes="*.txt,LICENSE,NOTICE" eol="lf" encoding="ISO-8859-1" fixlast="false" />
<fixcrlf srcdir="${tomcat.deployer}" includes="*.xml" eol="lf" encoding="ISO-8859-1" fixlast="false" />
<tar longfile="gnu" compression="gzip"
tarfile="${tomcat.release}/v${version}/bin/${final.name}-deployer.tar.gz">
<tarfileset dir="${tomcat.dist}" prefix="${final.name}-deployer">
<include name="LICENSE" />
<include name="NOTICE" />
<include name="README.txt" />
<include name="RELEASE-NOTES" />
</tarfileset>
<tarfileset dir="${tomcat.deployer}" prefix="${final.name}-deployer">
<include name="**" />
</tarfileset>
</tar>
<antcall target="md5sum">
<param name="file" value="${tomcat.release}/v${version}/bin/${final.name}-deployer.tar.gz" />
</antcall>
</target>
<!-- Packages the documentation distro in tar.gz format -->
<target name="package-docs-tgz">
<!-- Package gocs -->
<fixcrlf srcdir="${tomcat.dist}" includes="*.txt,LICENSE,NOTICE" eol="lf" encoding="ISO-8859-1" fixlast="false" />
<tar longfile="gnu" compression="gzip"
tarfile="${tomcat.release}/v${version}/bin/${final.name}-fulldocs.tar.gz">
<tarfileset dir="${tomcat.dist}" prefix="tomcat-${version.major.minor}-doc">
<include name="LICENSE" />
<include name="NOTICE" />
<include name="README.txt" />
<include name="RUNNING.txt" />
</tarfileset>
<tarfileset dir="${tomcat.dist}/webapps/docs" prefix="tomcat-${version.major.minor}-doc">
<include name="**" />
</tarfileset>
</tar>
<antcall target="md5sum">
<param name="file" value="${tomcat.release}/v${version}/bin/${final.name}-fulldocs.tar.gz" />
</antcall>
</target>
<!-- Packages the source code distribution in zip format -->
<target name="package-src-zip">
<fixcrlf srcdir="${tomcat.dist}/src" eol="crlf"
encoding="ISO-8859-1" fixlast="false" >
<patternset refid="src.files"/>
</fixcrlf>
<zip zipfile="${tomcat.release}/v${version}/src/${final-src.name}.zip">
<zipfileset dir="${tomcat.dist}/src" prefix="${final-src.name}" />
</zip>
<antcall target="md5sum">
<param name="file" value="${tomcat.release}/v${version}/src/${final-src.name}.zip" />
</antcall>
</target>
<!-- Packages the source code distribution in tar.gz format -->
<target name="package-src-tgz">
<fixcrlf srcdir="${tomcat.dist}/src" eol="lf"
encoding="ISO-8859-1" fixlast="false" >
<patternset refid="src.files"/>
</fixcrlf>
<tar longfile="gnu" compression="gzip"
tarfile="${tomcat.release}/v${version}/src/${final-src.name}.tar.gz">
<tarfileset dir="${tomcat.dist}/src" prefix="${final-src.name}" />
</tar>
<antcall target="md5sum">
<param name="file" value="${tomcat.release}/v${version}/src/${final-src.name}.tar.gz" />
</antcall>
</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>