forked from apache/tomcat
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
4294 lines (3847 loc) · 181 KB
/
build.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
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<!--
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 11.0" default="deploy" basedir="."
xmlns:if="ant:if"
xmlns:unless="ant:unless"
xmlns:jacoco="antlib:org.jacoco.ant"
>
<!-- ===================== Initialize Property Values ==================== -->
<!-- We read customizable properties from "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.release"/>
<property file="build.properties.default"/>
<!-- Check Ant Version -->
<fail message="Ant version ${ant.version.required} or newer is required (${ant.version} is installed)">
<condition>
<not><antversion atleast="${ant.version.required}" /></not>
</condition>
</fail>
<!-- Project Name -->
<property name="project" value="apache-tomcat" />
<!-- Version numbers -->
<!-- Keep in sync with webapps/docs/tomcat-docs.xsl -->
<property name="version" value="${version.major}.${version.minor}.${version.build}${version.suffix}${version.dev}" />
<property name="version.number" value="${version.major}.${version.minor}.${version.build}.${version.patch}" />
<property name="version.major.minor" value="${version.major}.${version.minor}" />
<!-- constant to declare a file binary for md5sum -->
<property name="md5sum.binary-prefix" value=" *" />
<!-- Exact spec versions (for the manifests etc.) -->
<property name="servlet.spec.version" value="6.1" />
<property name="servlet.revision" value="-SNAPSHOT" />
<property name="jsp.spec.version" value="4.0" />
<property name="jsp.revision" value="-SNAPSHOT" />
<property name="el.spec.version" value="6.0" />
<property name="el.revision" value="-SNAPSHOT" />
<property name="websocket.spec.version" value="2.2" />
<property name="websocket.revision" value="-SNAPSHOT" />
<property name="jaspic.spec.version" value="3.1" />
<property name="jaspic.revision" value="-SNAPSHOT" />
<property name="annotation.spec.version" value="3.0" />
<property name="annotation.revision" value="-SNAPSHOT" />
<!-- Release artifact base names -->
<property name="final.name" value="${project}-${version}" />
<property name="final-src.name" value="${project}-${version}-src" />
<!-- Locations to create build artifacts -->
<property name="tomcat.home" value="${basedir}"/>
<property name="tomcat-nb.home" value="${basedir}/nbproject" />
<property name="tomcat.output" value="${basedir}/output"/>
<property name="tomcat.bnd" value="${basedir}/res/bnd"/>
<property name="tomcat.build" value="${tomcat.output}/build"/>
<property name="tomcat.classes" value="${tomcat.output}/classes"/>
<property name="tomcat.deployer" value="${tomcat.output}/deployer"/>
<property name="tomcat.dist" value="${tomcat.output}/dist"/>
<property name="tomcat.embed" value="${tomcat.output}/embed"/>
<property name="tomcat.embed.sources" value="${tomcat.output}/embed-src-jars"/>
<property name="tomcat.graal" value="${tomcat.output}/graal"/>
<property name="tomcat.i18n" value="${tomcat.output}/i18n"/>
<property name="tomcat.manifests" value="${tomcat.output}/manifests"/>
<property name="tomcat.release" value="${tomcat.output}/release"/>
<property name="tomcat.release.verify" value="${tomcat.output}/verify" />
<property name="tomcat.src.jars" value="${tomcat.output}/src-jars"/>
<property name="test.classes" value="${tomcat.output}/testclasses"/>
<property name="test.run.classes" value="${tomcat.output}/classes"/>
<property name="test.temp" value="${tomcat.output}/test-tmp"/>
<property name="test.basedir" value="${tomcat.build}"/>
<property name="test.reports" value="${test.basedir}/logs"/>
<property name="test.apr.loc" value="${test.basedir}/bin"/>
<!-- base directory for jdbc-pool -->
<property name="tomcat.jdbc.dir" value="${basedir}/modules/jdbc-pool"/>
<!-- build output directory for jdbc-pool -->
<property name="tomcat.pool" value="${tomcat.output}/jdbc-pool"/>
<!-- build output directory for generated reflectionless code -->
<property name="tomcat.xreflect" value="${tomcat.output}/xreflect"/>
<!-- Jakarta EE 11 platform requires Java 17+ -->
<!-- Keep in sync with webapps/docs/tomcat-docs.xsl -->
<property name="compile.release" value="17"/>
<property name="min.java.version" value="17"/>
<property name="build.java.version" value="17"/>
<property name="release.java.version" value="22"/>
<!-- Check Java Build Version -->
<fail message="Java version ${build.java.version} or newer is required (${java.version} is installed)">
<condition>
<not><javaversion atleast="${build.java.version}" /></not>
</condition>
</fail>
<!-- Locations to create the JAR artifacts -->
<!-- Standard JARs -->
<property name="bootstrap.jar" value="${tomcat.build}/bin/bootstrap.jar"/>
<property name="tomcat-juli.jar" value="${tomcat.build}/bin/tomcat-juli.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="websocket-api.jar" value="${tomcat.build}/lib/websocket-api.jar"/>
<property name="websocket-client-api.jar" value="${tomcat.build}/lib/websocket-client-api.jar"/>
<property name="jaspic-api.jar" value="${tomcat.build}/lib/jaspic-api.jar"/>
<property name="tomcat-websocket.jar" value="${tomcat.build}/lib/tomcat-websocket.jar"/>
<property name="catalina.jar" value="${tomcat.build}/lib/catalina.jar"/>
<property name="catalina-tribes.jar" value="${tomcat.build}/lib/catalina-tribes.jar"/>
<property name="catalina-ssi.jar" value="${tomcat.build}/lib/catalina-ssi.jar"/>
<property name="catalina-ha.jar" value="${tomcat.build}/lib/catalina-ha.jar"/>
<property name="catalina-ant.jar" value="${tomcat.build}/lib/catalina-ant.jar"/>
<property name="catalina-storeconfig.jar" value="${tomcat.build}/lib/catalina-storeconfig.jar"/>
<property name="tomcat-coyote.jar" value="${tomcat.build}/lib/tomcat-coyote.jar"/>
<property name="tomcat-dbcp.jar" value="${tomcat.build}/lib/tomcat-dbcp.jar"/>
<property name="tomcat-jni.jar" value="${tomcat.build}/lib/tomcat-jni.jar"/>
<property name="tomcat-api.jar" value="${tomcat.build}/lib/tomcat-api.jar"/>
<property name="tomcat-util.jar" value="${tomcat.build}/lib/tomcat-util.jar"/>
<property name="tomcat-util-scan.jar" value="${tomcat.build}/lib/tomcat-util-scan.jar"/>
<property name="jasper.jar" value="${tomcat.build}/lib/jasper.jar"/>
<property name="jasper-el.jar" value="${tomcat.build}/lib/jasper-el.jar"/>
<!-- Standard Source JARs -->
<property name="bootstrap-src.jar" value="${tomcat.src.jars}/bootstrap-src.jar"/>
<property name="tomcat-juli-src.jar" value="${tomcat.src.jars}/tomcat-juli-src.jar"/>
<property name="annotations-api-src.jar" value="${tomcat.src.jars}/annotations-api-src.jar"/>
<property name="servlet-api-src.jar" value="${tomcat.src.jars}/servlet-api-src.jar"/>
<property name="jsp-api-src.jar" value="${tomcat.src.jars}/jsp-api-src.jar"/>
<property name="el-api-src.jar" value="${tomcat.src.jars}/el-api-src.jar"/>
<property name="websocket-api-src.jar" value="${tomcat.src.jars}/websocket-api-src.jar"/>
<property name="websocket-client-api-src.jar" value="${tomcat.src.jars}/websocket-client-api-src.jar"/>
<property name="jaspic-api-src.jar" value="${tomcat.src.jars}/jaspic-api-src.jar"/>
<property name="tomcat-websocket-src.jar" value="${tomcat.src.jars}/tomcat-websocket-src.jar"/>
<property name="catalina-src.jar" value="${tomcat.src.jars}/catalina-src.jar"/>
<property name="catalina-tribes-src.jar" value="${tomcat.src.jars}/catalina-tribes-src.jar"/>
<property name="catalina-ssi-src.jar" value="${tomcat.src.jars}/catalina-ssi-src.jar"/>
<property name="catalina-ha-src.jar" value="${tomcat.src.jars}/catalina-ha-src.jar"/>
<property name="catalina-ant-src.jar" value="${tomcat.src.jars}/catalina-ant-src.jar"/>
<property name="catalina-storeconfig-src.jar" value="${tomcat.src.jars}/catalina-storeconfig-src.jar"/>
<property name="tomcat-jni-src.jar" value="${tomcat.src.jars}/tomcat-jni-src.jar"/>
<property name="tomcat-coyote-src.jar" value="${tomcat.src.jars}/tomcat-coyote-src.jar"/>
<property name="tomcat-dbcp-src.jar" value="${tomcat.src.jars}/tomcat-dbcp-src.jar"/>
<property name="tomcat-api-src.jar" value="${tomcat.src.jars}/tomcat-api-src.jar"/>
<property name="tomcat-util-src.jar" value="${tomcat.src.jars}/tomcat-util-src.jar"/>
<property name="tomcat-util-scan-src.jar" value="${tomcat.src.jars}/tomcat-util-scan-src.jar"/>
<property name="jasper-src.jar" value="${tomcat.src.jars}/jasper-src.jar"/>
<property name="jasper-el-src.jar" value="${tomcat.src.jars}/jasper-el-src.jar"/>
<!-- Embedded JARs & source JARs -->
<property name="tomcat-embed-core.jar" value="${tomcat.embed}/tomcat-embed-core.jar"/>
<property name="tomcat-embed-programmatic.jar" value="${tomcat.embed}/tomcat-embed-programmatic.jar"/>
<property name="tomcat-embed-jasper.jar" value="${tomcat.embed}/tomcat-embed-jasper.jar"/>
<property name="tomcat-embed-el.jar" value="${tomcat.embed}/tomcat-embed-el.jar"/>
<property name="tomcat-embed-websocket.jar" value="${tomcat.embed}/tomcat-embed-websocket.jar"/>
<property name="tomcat-embed-core-sources.jar" value="${tomcat.embed.sources}/tomcat-embed-core-src.jar"/>
<property name="tomcat-embed-programmatic-sources.jar" value="${tomcat.embed.sources}/tomcat-embed-programmatic-src.jar"/>
<property name="tomcat-embed-jasper-sources.jar" value="${tomcat.embed.sources}/tomcat-embed-jasper-src.jar"/>
<property name="tomcat-embed-el-sources.jar" value="${tomcat.embed.sources}/tomcat-embed-el-src.jar"/>
<property name="tomcat-embed-websocket-sources.jar" value="${tomcat.embed.sources}/tomcat-embed-websocket-src.jar"/>
<!-- jdbc-pool JARs & source JARs -->
<property name="tomcat-jdbc.jar" value="${tomcat.pool}/tomcat-jdbc.jar"/>
<property name="tomcat-jdbc-src.jar" value="${tomcat.pool}/tomcat-jdbc-src.jar"/>
<!-- Tests To Run -->
<property name="test.name" value="**/Test*.java"/>
<property name="test.formatter" value="-Dorg.apache.juli.formatter=java.util.logging.SimpleFormatter"/>
<property name="test.relaxTiming" value="false"/>
<!-- Code coverage settings -->
<property name="coverage.out" value="${tomcat.output}/coverage"/>
<property name="coverage.datafile" value="${coverage.out}/jacoco.exec"/>
<!-- SpotBugs settings -->
<property name="spotbugs.out" value="${tomcat.output}/spotbugs"/>
<property name="spotbugs.report.format" value="html"/>
<property name="spotbugs.report.level" value="low"/>
<!-- Workaround against http://bugs.sun.com/view_bug.do?bug_id=6202721 -->
<available file="/dev/urandom" property="test.jvmarg.egd" value="-Djava.security.egd=file:/dev/./urandom"/>
<!-- JREs may fail to start with an empty argument so provide a dummy -->
<!-- value here for those cases, such as Windows, where no value will be -->
<!-- set above. -->
<property name="test.jvmarg.egd" value="-Dignore" />
<!-- Location of OpenSSL binary (file name, not directory) -->
<!-- The OpenSSL tests cases be disabled by specifying an invalid path here -->
<property name="test.openssl.path" value="" />
<!-- Include .gitignore in src distributions. -->
<!-- .git and .gitignore are in defaultexcludes since Ant 1.8.2 -->
<defaultexcludes add="**/.git" />
<defaultexcludes add="**/.git/**" />
<defaultexcludes remove="**/.gitignore" />
<!--<defaultexcludes echo="true" />-->
<!-- Classpaths -->
<path id="compile.classpath">
<pathelement location="${bnd.jar}"/>
<pathelement location="${jdt.jar}"/>
<pathelement location="${migration-lib.jar}"/>
</path>
<path id="tomcat.classpath">
<pathelement path="${test.run.classes}"/>
</path>
<path id="tomcat.test.classpath">
<pathelement location="${test.basedir}/webapps/examples/WEB-INF/classes"/>
<pathelement location="${test.classes}"/>
<pathelement location="${tomcat.i18n}"/>
<pathelement location="${junit.jar}"/>
<pathelement location="${hamcrest.jar}"/>
<pathelement location="${easymock.jar}"/>
<pathelement location="${cglib.jar}"/>
<pathelement location="${objenesis.jar}"/>
<pathelement location="${unboundid.jar}"/>
<pathelement location="${derby.jar}"/>
<pathelement location="${derby-shared.jar}"/>
<pathelement location="${derby-tools.jar}"/>
<path refid="compile.classpath" />
<path refid="tomcat.classpath" />
</path>
<!-- Classpath filter set -->
<filterset id="classpath.filters">
<filter token="ANT_JAR" value="${ant.home}/lib/ant.jar"/>
<filter token="JDT_JAR" value="${jdt.jar}"/>
<filter token="EASYMOCK_JAR" value="${easymock.jar}"/>
<filter token="HAMCREST_JAR" value="${hamcrest.jar}"/>
<filter token="CGLIB_JAR" value="${cglib.jar}"/>
<filter token="OBJENESIS_JAR" value="${objenesis.jar}"/>
<filter token="BND_JAR" value="${bnd.jar}"/>
<filter token="MIGRATION_JAR" value="${migration-lib.jar}"/>
<filter token="UNBOUNDID_JAR" value="${unboundid.jar}"/>
<filter token="JUNIT_JAR" value="${junit.jar}"/>
<filter token="OUTPUT_DIR" value="${tomcat.output}"/>
</filterset>
<!-- Version info filter set -->
<tstamp>
<format property="year" pattern="yyyy" locale="en" timezone="UTC"/>
<format property="today" pattern="MMM d yyyy" locale="en" timezone="UTC"/>
<format property="today-iso-8601" pattern="yyyy-MM-dd" locale="en" timezone="UTC"/>
<format property="tstamp" pattern="HH:mm:ss" locale="en" timezone="UTC"/>
<format property="tstamp.file" pattern="yyyy-MM-dd HH:mm:ss" timezone="UTC"/>
<format property="tstamp.iso.release" pattern="yyyy-MM-dd'T'HH:mm:ssX" timezone="UTC"/>
</tstamp>
<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}"/>
<filter token="VERSION_BUILT" value="${today} ${tstamp} UTC"/>
<filter token="JDT_VERSION" value="${jdt.version}"/>
<filter token="GIT_BRANCH" value="${git.branch}"/>
<filter token="MIN_JAVA_VERSION" value="${min.java.version}"/>
<filter token="BUILD_JAVA_VERSION" value="${build.java.version}"/>
<filter token="ANT_VERSION_REQUIRED" value="${ant.version.required}"/>
<filter token="SERVLET_SPEC_VERSION" value="${servlet.spec.version}"/>
<filter token="JSP_SPEC_VERSION" value="${jsp.spec.version}"/>
<filter token="EL_SPEC_VERSION" value="${el.spec.version}"/>
<filter token="WEBSOCKET_SPEC_VERSION" value="${websocket.spec.version}"/>
<filter token="JASPIC_SPEC_VERSION" value="${jaspic.spec.version}"/>
</filterset>
<!-- Files to change line endings for depending on target platform -->
<patternset id="text.files" >
<include name="**/INSTALLLICENSE"/>
<include name="**/KEYS"/>
<include name="**/LICENSE"/>
<include name="**/NOTICE"/>
<include name="**/RELEASE-NOTES"/>
<include name="**/jakarta.el.ExpressionFactory"/>
<include name="**/jakarta.servlet.ServletContainerInitializer"/>
<include name="**/jakarta.websocket.ContainerProvider"/>
<include name="**/jakarta.websocket.server.ServerEndpointConfig$Configurator"/>
<include name="**/.gitignore"/>
<include name="**/*.bnd"/>
<include name="**/*.classpath"/>
<include name="**/*.conf"/>
<include name="**/*.css"/>
<include name="**/*.dtd"/>
<include name="**/*.editorconfig"/>
<include name="**/*.h"/>
<include name="**/*.header"/>
<include name="**/*.htm"/>
<include name="**/*.html"/>
<include name="**/*.iml"/>
<include name="**/*.ini"/>
<include name="**/*.java"/>
<include name="**/*.jj"/>
<include name="**/*.jjt"/>
<include name="**/*.json"/>
<include name="**/*.jsp"/>
<include name="**/*.jspf"/>
<include name="**/*.jspx"/>
<include name="**/*.launch"/>
<include name="**/*.license"/>
<include name="**/*.manifest"/>
<include name="**/*.md"/>
<include name="**/*.mdl"/>
<include name="**/*.MF"/>
<include name="**/*.notice"/>
<include name="**/*.nsi"/>
<include name="**/*.pem"/>
<include name="**/*.pl"/>
<include name="**/*.policy"/>
<include name="**/*.pom"/>
<include name="**/*.project"/>
<include name="**/*.properties"/>
<include name="**/*.properties.default"/>
<include name="**/*.properties.release"/>
<include name="**/*.shtml"/>
<include name="**/*.svg"/>
<include name="**/*.tag"/>
<include name="**/*.tagx"/>
<include name="**/*.tasks"/>
<include name="**/*.tld"/>
<include name="**/*.txt"/>
<include name="**/*.xhtml"/>
<include name="**/*.xml"/>
<include name="**/*.xsd"/>
<include name="**/*.xsl"/>
<include name="**/*.xslt"/>
<include name="**/*.yaml"/>
<include name="**/*.yml"/>
<include name="**/Dockerfile"/>
<!-- Exclude files that use 16-bit encodings. -->
<!-- This prevents fixcrlf corrupting them during a release -->
<exclude name="**/bom-none-prolog-utf16?e.jspx"/>
<exclude name="**/bom-utf16?e-prolog-*.jsp*"/>
</patternset>
<!-- ========= Pattern sets used to control content of JAR files ========= -->
<!-- Pattern sets for jar files in standard distributions -->
<patternset id="files.annotations-api">
<include name="jakarta/annotation/**" />
</patternset>
<patternset id="files.servlet-api">
<include name="jakarta/servlet/*" />
<include name="jakarta/servlet/annotation/**" />
<include name="jakarta/servlet/descriptor/**" />
<include name="jakarta/servlet/http/**" />
<include name="jakarta/servlet/resources/**" />
<exclude name="jakarta/servlet/jsp"/>
</patternset>
<patternset id="files.jsp-api">
<include name="jakarta/servlet/jsp/**" />
</patternset>
<patternset id="files.el-api">
<include name="jakarta/el/**" />
</patternset>
<patternset id="files.websocket-api">
<include name="jakarta/websocket/server/*" />
</patternset>
<patternset id="files.websocket-client-api">
<include name="jakarta/websocket/*" />
</patternset>
<patternset id="files.jaspic-api">
<include name="jakarta/security/auth/message/**" />
</patternset>
<patternset id="files.tomcat-websocket">
<include name="org/apache/tomcat/websocket/**" />
</patternset>
<!-- This duplicates some classes in files.catalina -->
<!-- Duplicating a few classes in bootstrap.jar is simpler than excluding -->
<!-- them from files.catalina and having to manually add them to -->
<!-- files.tomcat-embed-core because of an include/exclude conflict -->
<!-- between files.catalina and files.bootstrap. -->
<patternset id="files.bootstrap">
<include name="org/apache/catalina/startup/Bootstrap.*" />
<include name="org/apache/catalina/startup/catalina.properties" />
<include name="org/apache/catalina/startup/CatalinaProperties.*" />
<include name="org/apache/catalina/startup/ClassLoaderFactory.*" />
<include name="org/apache/catalina/startup/ClassLoaderFactory$*.*" />
<include name="org/apache/catalina/startup/Constants.*" />
<include name="org/apache/catalina/startup/SafeForkJoinWorkerThreadFactory.*" />
<include name="org/apache/catalina/startup/SafeForkJoinWorkerThreadFactory$*.*" />
<include name="org/apache/catalina/startup/Tool.*" />
<include name="org/apache/catalina/security/SecurityClassLoad.*" />
<include name="org/apache/catalina/webresources/war/**" />
<include name="org/apache/tomcat/util/buf/UriUtil.*" />
</patternset>
<patternset id="files.tomcat-juli">
<include name="org/apache/juli/**" />
</patternset>
<patternset id="files.tomcat-api">
<include name="org/apache/tomcat/*" />
<exclude name="org/apache/tomcat/buildutil" />
<exclude name="org/apache/tomcat/dbcp" />
<exclude name="org/apache/tomcat/jni" />
<exclude name="org/apache/tomcat/util" />
<exclude name="org/apache/tomcat/websocket" />
</patternset>
<patternset id="files.tomcat-util">
<include name="org/apache/tomcat/util/buf/**" />
<include name="org/apache/tomcat/util/codec/**" />
<include name="org/apache/tomcat/util/collections/**" />
<include name="org/apache/tomcat/util/compat/**" />
<include name="org/apache/tomcat/util/file/**" />
<include name="org/apache/tomcat/util/res/**" />
<include name="org/apache/tomcat/util/security/**" />
<include name="org/apache/tomcat/util/threads/**" />
<include name="org/apache/tomcat/util/json/**" />
<include name="org/apache/tomcat/util/*" />
<exclude name="org/apache/tomcat/util/bcel" />
<exclude name="org/apache/tomcat/util/descriptor" />
<exclude name="org/apache/tomcat/util/digester" />
<exclude name="org/apache/tomcat/util/http" />
<exclude name="org/apache/tomcat/util/log" />
<exclude name="org/apache/tomcat/util/modeler" />
<exclude name="org/apache/tomcat/util/net" />
<exclude name="org/apache/tomcat/util/openssl"/>
<exclude name="org/apache/tomcat/util/scan" />
</patternset>
<patternset id="files.tomcat-util-scan">
<include name="org/apache/tomcat/util/descriptor/**" />
<include name="org/apache/tomcat/util/digester/**" />
<include name="org/apache/tomcat/util/scan/**" />
</patternset>
<patternset id="files.catalina">
<include name="org/apache/catalina/**" />
<include name="org/apache/naming/**" />
<!-- Modules -->
<exclude name="org/apache/catalina/ant/**" />
<exclude name="org/apache/catalina/ha/**" />
<exclude name="org/apache/catalina/tribes/**" />
<exclude name="org/apache/catalina/storeconfig/**" />
<exclude name="org/apache/catalina/ssi/**" />
</patternset>
<patternset id="files.tomcat-embed-programmatic">
<patternset refid="files.jaspic-api" />
<patternset refid="files.tomcat-juli" />
<!-- Servlet -->
<include name="jakarta/servlet/**" />
<include name="jakarta/servlet/annotation/**" />
<include name="jakarta/servlet/http/**" />
<exclude name="jakarta/servlet/descriptor/**" />
<exclude name="jakarta/servlet/jsp/**"/>
<exclude name="jakarta/servlet/resources/**" />
<!-- AprLifecycleListener is configured by default -->
<include name="**/AprLifecycleListener.*"/>
<include name="**/AprStatus.*"/>
<!-- Remove dynamic mbean descriptors -->
<exclude name="**/mbeans-descriptors.xml"/>
<exclude name="**/mbeans-descriptors.dtd"/>
<!-- No JMX Support - But we can't remove the classes -->
<include name="org/apache/tomcat/util/modeler/LocalStrings.properties" />
<include name="org/apache/tomcat/util/modeler/AttributeInfo*" />
<include name="org/apache/tomcat/util/modeler/BaseModelMBean*" />
<include name="org/apache/tomcat/util/modeler/FeatureInfo*" />
<include name="org/apache/tomcat/util/modeler/ManagedBean*" />
<include name="org/apache/tomcat/util/modeler/NoDescriptorRegistry*" />
<include name="org/apache/tomcat/util/modeler/NotificationInfo*" />
<include name="org/apache/tomcat/util/modeler/Registry*" />
<include name="org/apache/tomcat/util/modeler/RegistryMBean*" />
<include name="org/apache/tomcat/util/modeler/Util*" />
<include name="org/apache/tomcat/util/modeler/modules/ModelerSource*" />
<!-- Apache Tomcat Core Code -->
<include name="org/apache/catalina/*"/>
<include name="org/apache/catalina/authenticator/**"/>
<include name="org/apache/catalina/connector/**"/>
<include name="org/apache/catalina/core/**"/>
<include name="org/apache/catalina/deploy/**"/>
<include name="org/apache/catalina/filters/**"/>
<include name="org/apache/catalina/loader/**"/>
<include name="org/apache/catalina/mapper/**"/>
<include name="org/apache/catalina/mbeans/**"/>
<include name="org/apache/catalina/realm/**"/>
<include name="org/apache/catalina/security/**"/>
<include name="org/apache/catalina/session/**"/>
<include name="org/apache/catalina/startup/**"/>
<include name="org/apache/catalina/util/**"/>
<include name="org/apache/catalina/valves/*"/>
<include name="org/apache/catalina/webresources/**"/>
<include name="org/apache/coyote/**" />
<include name="org/apache/naming/**" />
<include name="org/apache/tomcat/*" />
<include name="org/apache/tomcat/util/*" />
<include name="org/apache/tomcat/util/bcel/**" />
<include name="org/apache/tomcat/util/buf/**" />
<include name="org/apache/tomcat/util/codec/**" />
<include name="org/apache/tomcat/util/collections/**" />
<include name="org/apache/tomcat/util/compat/**" />
<include name="org/apache/tomcat/util/descriptor/**" />
<include name="org/apache/tomcat/util/file/**" />
<include name="org/apache/tomcat/util/http/**" />
<include name="org/apache/tomcat/util/json/**" />
<include name="org/apache/tomcat/util/log/**" />
<include name="org/apache/tomcat/util/net/**" />
<include name="org/apache/tomcat/util/openssl/**"/>
<include name="org/apache/tomcat/util/res/**" />
<include name="org/apache/tomcat/util/security/**" />
<include name="org/apache/tomcat/util/threads/**" />
<!-- Some of the core code depends on the jar scanner -->
<include name="org/apache/tomcat/util/scan/StandardJarScan*" />
<include name="org/apache/tomcat/util/scan/LocalStrings.properties" />
<!-- Minimize JNI to what doesn't throw an error -->
<include name="org/apache/tomcat/jni/Library.class" />
<include name="org/apache/tomcat/jni/LibraryNotFoundError*" />
<exclude name="org/apache/tomcat/jni" />
<!-- Remove connectors that are not default -->
<exclude name="**/AbstractAjpProtocol.class"/>
<exclude name="**/Ajp*.class"/>
<exclude name="**/Http11Nio2*.class"/>
<exclude name="**/JniLifecycleListener.class"/>
<exclude name="org/apache/tomcat/**/*Nio2*.class"/>
<!-- Minimize bundles to the default set -->
<exclude name="org/apache/**/LocalStrings_*.properties"/>
<!-- Remove digester support -->
<exclude name="org/apache/catalina/**/*Rule.class" />
<exclude name="org/apache/catalina/**/*RuleSet*.class" />
<exclude name="org/apache/tomcat/**/*RuleSet*.class" />
<!-- Remove various Apache Tomcat modules not used by default in an embedded setting -->
<exclude name="org/apache/catalina/ant/**" />
<exclude name="org/apache/catalina/ha/**" />
<exclude name="org/apache/catalina/manager/**" />
<exclude name="org/apache/catalina/ssi/**" />
<exclude name="org/apache/catalina/storeconfig/**" />
<exclude name="org/apache/catalina/tribes/**" />
<exclude name="org/apache/catalina/valves/rewrite/**" />
<exclude name="org/apache/tomcat/buildutil" />
<exclude name="org/apache/tomcat/dbcp" />
<!-- Remove authenticator classes -->
<exclude name="org/apache/catalina/authenticator/BasicAuthenticator*" />
<exclude name="org/apache/catalina/authenticator/DigestAuthenticator*" />
<exclude name="org/apache/catalina/authenticator/FormAuthenticator*" />
<exclude name="org/apache/catalina/authenticator/SingleSignOnE*" />
<exclude name="org/apache/catalina/authenticator/SingleSignOnL*" />
<exclude name="org/apache/catalina/authenticator/SingleSignOnS*" />
<exclude name="org/apache/catalina/authenticator/Spnego*" />
<exclude name="org/apache/catalina/authenticator/SSLAuthenticator*" />
<exclude name="org/apache/catalina/authenticator/jaspcic/Simple*" />
<!-- Remove optional filter classes -->
<exclude name="org/apache/catalina/filters/**" />
<!-- Remove Realm classes -->
<exclude name="org/apache/catalina/realm/AuthenticatedUserRealm.class" />
<exclude name="org/apache/catalina/realm/CombinedRealm.class" />
<exclude name="org/apache/catalina/realm/DataSourceRealm.class" />
<exclude name="org/apache/catalina/realm/JAASCallbackHandler.class" />
<exclude name="org/apache/catalina/realm/JAASMemoryLoginModule.class" />
<exclude name="org/apache/catalina/realm/JAASRealm.class" />
<exclude name="org/apache/catalina/realm/JNDIRealm$User.class" />
<exclude name="org/apache/catalina/realm/JNDIRealm.class" />
<exclude name="org/apache/catalina/realm/LockOutRealm*" />
<exclude name="org/apache/catalina/realm/MemoryRealm.class" />
<exclude name="org/apache/catalina/realm/NestedCredentialHandler.class" />
<exclude name="org/apache/catalina/realm/UserDatabaseRealm.class" />
<!-- Remove optional servlets -->
<exclude name="org/apache/catalina/servlets/**" />
<!-- Remove all but the standard session management -->
<exclude name="org/apache/catalina/session/JDBC*" />
<exclude name="org/apache/catalina/session/File*" />
<exclude name="org/apache/catalina/session/Persistent*" />
<exclude name="org/apache/catalina/session/StoreBase*" />
<!-- Remove users -->
<exclude name="org/apache/catalina/users/**" />
<!-- Remove optional valves -->
<exclude name="org/apache/catalina/valves/Crawler*" />
<exclude name="org/apache/catalina/valves/ExtendedAccessLogValve*" />
<exclude name="org/apache/catalina/valves/ExtendedAccessLogValve*" />
<exclude name="org/apache/catalina/valves/HealthCheckValve*" />
<exclude name="org/apache/catalina/valves/JDBCAccessLogValve*" />
<exclude name="org/apache/catalina/valves/LoadBalancerDrainingValve*" />
<exclude name="org/apache/catalina/valves/PersistentValve*" />
<!-- Remove most JNDI stuff -->
<exclude name="org/apache/naming/EjbRef*" />
<exclude name="org/apache/naming/factory/BeanFactory*" />
<exclude name="org/apache/naming/factory/DataSourceLinkFactory*" />
<exclude name="org/apache/naming/factory/EjbFactory*" />
<exclude name="org/apache/naming/factory/LookupFactory*" />
<exclude name="org/apache/naming/factory/MailSessionFactory*" />
<exclude name="org/apache/naming/factory/OpenEjbFactory*" />
<exclude name="org/apache/naming/factory/ResourceEnvFactory*" />
<exclude name="org/apache/naming/factory/ResourceFactory*" />
<exclude name="org/apache/naming/factory/ResourceLinkFactory*" />
<exclude name="org/apache/naming/factory/SendMailFactory*" />
<exclude name="org/apache/naming/factory/TransactionFactory*" />
<exclude name="org/apache/naming/LookupRef*" />
<exclude name="org/apache/naming/NameParserImpl*" />
<exclude name="org/apache/naming/NamingContextBindingsEnumeration*" />
<exclude name="org/apache/naming/NamingContext*" />
<exclude name="org/apache/naming/NamingContextEnumeration*" />
<exclude name="org/apache/naming/NamingEntry*" />
<exclude name="org/apache/naming/ResourceEnvRef*" />
<exclude name="org/apache/naming/ResourceLinkRef*" />
<exclude name="org/apache/naming/ResourceRef*" />
<exclude name="org/apache/naming/SelectorContext*" />
<exclude name="org/apache/naming/ServiceRef*" />
<exclude name="org/apache/naming/TransactionRef*" />
<!-- remove BCEL support -->
<exclude name="org/apache/tomcat/util/bcel/**" />
<!-- remove web descriptor elements -->
<exclude name="org/apache/tomcat/util/descriptor/DigesterFactory*" />
<exclude name="org/apache/tomcat/util/descriptor/InputSourceUtil*" />
<exclude name="org/apache/tomcat/util/descriptor/LocalResolver*" />
<exclude name="org/apache/tomcat/util/descriptor/web/AbsoluteOrderingRule*" />
<exclude name="org/apache/tomcat/util/descriptor/web/CallMethodMultiRule*" />
<exclude name="org/apache/tomcat/util/descriptor/web/CallParamMultiRule*" />
<exclude name="org/apache/tomcat/util/descriptor/web/ContextHandler*" />
<exclude name="org/apache/tomcat/util/descriptor/web/ContextResourceLink*" />
<exclude name="org/apache/tomcat/util/descriptor/web/ContextTransaction*" />
<exclude name="org/apache/tomcat/util/descriptor/web/FragmentJarScannerCallback*" />
<exclude name="org/apache/tomcat/util/descriptor/web/IgnoreAnnotationsRule*" />
<exclude name="org/apache/tomcat/util/descriptor/web/InjectionTarget*" />
<exclude name="org/apache/tomcat/util/descriptor/web/JspConfigDescriptorImpl*" />
<exclude name="org/apache/tomcat/util/descriptor/web/JspPropertyGroup*" />
<exclude name="org/apache/tomcat/util/descriptor/web/JspPropertyGroupDescriptorImpl*" />
<exclude name="org/apache/tomcat/util/descriptor/web/LifecycleCallbackRule*" />
<exclude name="org/apache/tomcat/util/descriptor/web/MappedNameRule*" />
<exclude name="org/apache/tomcat/util/descriptor/web/MultipartDef*" />
<exclude name="org/apache/tomcat/util/descriptor/web/NameRule*" />
<exclude name="org/apache/tomcat/util/descriptor/web/RelativeOrderingRule*" />
<exclude name="org/apache/tomcat/util/descriptor/web/SecurityCollection*" />
<exclude name="org/apache/tomcat/util/descriptor/web/SecurityRoleRef*" />
<exclude name="org/apache/tomcat/util/descriptor/web/ServiceQnameRule*" />
<exclude name="org/apache/tomcat/util/descriptor/web/ServletDef*" />
<exclude name="org/apache/tomcat/util/descriptor/web/ServletDefCreateRule*" />
<exclude name="org/apache/tomcat/util/descriptor/web/SessionConfig*" />
<exclude name="org/apache/tomcat/util/descriptor/web/SetAuthConstraintRule*" />
<exclude name="org/apache/tomcat/util/descriptor/web/SetDenyUncoveredHttpMethodsRule*" />
<exclude name="org/apache/tomcat/util/descriptor/web/SetDistributableRule*" />
<exclude name="org/apache/tomcat/util/descriptor/web/SetJspConfig*" />
<exclude name="org/apache/tomcat/util/descriptor/web/SetLoginConfig*" />
<exclude name="org/apache/tomcat/util/descriptor/web/SetOverrideRule*" />
<exclude name="org/apache/tomcat/util/descriptor/web/SetPublicIdRule*" />
<exclude name="org/apache/tomcat/util/descriptor/web/SetSessionConfig*" />
<exclude name="org/apache/tomcat/util/descriptor/web/SoapHeaderRule*" />
<exclude name="org/apache/tomcat/util/descriptor/web/TaglibDescriptorImpl*" />
<exclude name="org/apache/tomcat/util/descriptor/web/TaglibLocationRule*" />
<exclude name="org/apache/tomcat/util/descriptor/web/VersionRule*" />
<exclude name="org/apache/tomcat/util/descriptor/web/WebXml*" />
<exclude name="org/apache/tomcat/util/descriptor/web/WebXmlParser*" />
<exclude name="org/apache/tomcat/util/descriptor/XmlErrorHandler*" />
<exclude name="org/apache/tomcat/util/descriptor/XmlIdentifiers*" />
<!-- remove taglibrary support -->
<exclude name="org/apache/tomcat/util/descriptor/tagplugin/**"/>
<exclude name="org/apache/tomcat/util/descriptor/tld/**"/>
<!-- Remove Digester Support -->
<exclude name="org/apache/tomcat/util/digester/**"/>
<!-- TODO - For now, remove SSL until we have an example -->
<exclude name="org/apache/tomcat/util/net/jsse/**"/>
<exclude name="org/apache/tomcat/util/net/openssl/**"/>
<!-- Remove without-reflection code generator -->
<exclude name="org/apache/tomcat/util/xreflection/**" />
<!-- Remove DefaultServlet -->
<exclude name="org/apache/catalina/servlets/DefaultServlet*.*" />
</patternset>
<patternset id="files.catalina-tribes">
<include name="org/apache/catalina/tribes/**" />
</patternset>
<patternset id="files.catalina-ssi">
<include name="org/apache/catalina/ssi/**" />
</patternset>
<patternset id="files.catalina-ha">
<include name="org/apache/catalina/ha/**" />
</patternset>
<patternset id="files.catalina-ant">
<include name="org/apache/catalina/ant/**" />
</patternset>
<patternset id="files.catalina-storeconfig">
<include name="org/apache/catalina/storeconfig/**" />
</patternset>
<patternset id="files.tomcat-jni">
<include name="org/apache/tomcat/jni/**" />
</patternset>
<patternset id="files.tomcat-coyote">
<include name="org/apache/coyote/**" />
<!-- Remaining tomcat-util packages -->
<include name="org/apache/tomcat/util/bcel/**" />
<include name="org/apache/tomcat/util/http/**" />
<include name="org/apache/tomcat/util/log/**" />
<include name="org/apache/tomcat/util/modeler/**" />
<include name="org/apache/tomcat/util/net/**" />
<include name="org/apache/tomcat/util/openssl/**"/>
</patternset>
<patternset id="files.jasper">
<include name="org/apache/jasper/**" />
</patternset>
<patternset id="files.jasper-el">
<include name="org/apache/el/**" />
</patternset>
<patternset id="files.tomcat-dbcp">
<include name="org/apache/tomcat/dbcp/**"/>
</patternset>
<!-- Pattern sets for embedded JARs -->
<!-- Every standard pattern set above should be included in an embedded JAR -->
<patternset id="files.tomcat-embed-core" >
<patternset refid="files.catalina" />
<patternset refid="files.servlet-api" />
<patternset refid="files.jaspic-api" />
<patternset refid="files.tomcat-api" />
<patternset refid="files.tomcat-juli" />
<!-- These pattern sets conflict so include files directly
<patternset refid="files.tomcat-coyote" />
<patternset refid="files.tomcat-util" />
<patternset refid="files.tomcat-util-scan" />
-->
<include name="org/apache/coyote/**" />
<include name="org/apache/tomcat/jni/**" />
<include name="org/apache/tomcat/util/**" />
<exclude name="org/apache/tomcat/util/descriptor/tld/**" />
</patternset>
<patternset id="files.tomcat-embed-jasper" >
<patternset refid="files.jasper" />
<patternset refid="files.jsp-api" />
<include name="org/apache/tomcat/util/descriptor/tld/**" />
</patternset>
<patternset id="files.tomcat-embed-el" >
<patternset refid="files.el-api" />
<patternset refid="files.jasper-el" />
</patternset>
<patternset id="files.tomcat-embed-websocket" >
<patternset refid="files.websocket-api" />
<patternset refid="files.websocket-client-api" />
<patternset refid="files.tomcat-websocket" />
</patternset>
<!-- Pattern sets not included in embedded -->
<!-- Cluster support not included in embedded -->
<!--<patternset refid="files.catalina-tribes" />-->
<!--<patternset refid="files.catalina-ha" />-->
<!-- Ant tasks not included in embedded -->
<!--<patternset refid="files.catalina-ant" />-->
<!-- Annotations API is a separate dependency to avoid JRE 9 issues -->
<!-- See BZ 61439 -->
<!--<patternset refid="files.annotations-api" />-->
<!-- =========================== Build targets =========================== -->
<!-- Output the merged properties for the current Ant environment -->
<target name="echoproperties">
<echoproperties/>
</target>
<target name="build-prepare">
<!-- Required so we can compile -->
<mkdir dir="${tomcat.classes}"/>
<!-- Ensure these directories are removed every time we re-build -->
<delete dir="${tomcat.build}/temp" />
<delete dir="${tomcat.build}/work" />
<!-- Minimum dirs needed for a working Tomcat instance -->
<mkdir dir="${tomcat.build}"/>
<mkdir dir="${tomcat.build}/bin"/>
<mkdir dir="${tomcat.build}/conf"/>
<mkdir dir="${tomcat.build}/lib"/>
<mkdir dir="${tomcat.build}/logs"/>
<mkdir dir="${tomcat.build}/temp"/>
<mkdir dir="${tomcat.build}/webapps"/>
<mkdir dir="${tomcat.build}/webapps-javaee"/>
<!-- Property that determines if manifests need updating -->
<uptodate property="manifests.uptodate"
targetfile="${tomcat.manifests}/default.manifest" >
<srcfiles file="${user.home}/build.properties" />
<srcfiles file="${basedir}/build.properties" />
<srcfiles file="${basedir}/build.properties.default" />
<srcfiles file="${basedir}/build.xml" />
<srcfiles dir="${tomcat.home}/res/META-INF" >
<include name="*.manifest" />
<include name="*.license" />
<include name="*.notice" />
</srcfiles>
</uptodate>
</target>
<target name="validate" if="${execute.validate}"
depends="build-prepare,compile-prepare,download-validate"
description="Uses Checkstyle tool to perform style check for the source code">
<!-- Required so we can cache checkstyle results -->
<mkdir dir="${tomcat.output}/res/checkstyle"/>
<available property="checkstyletask.properties" resource="checkstyletask.properties"
classpath="${checkstyle.jar}" value="checkstyletask.properties"/>
<available property="checkstyletask.properties" resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties"
classpath="${checkstyle.jar}" value="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties"/>
<taskdef resource="${checkstyletask.properties}"
classpath="${checkstyle.jar}" />
<!-- Main checks -->
<checkstyle config="${basedir}/res/checkstyle/checkstyle.xml">
<fileset dir="." >
<patternset refid="text.files" />
<include name="**/*.bat"/>
<include name="**/*.sh"/>
<exclude name="bin/setenv.*"/>
<exclude name=".*/**"/>
<exclude name="nbproject/**"/>
<exclude name="output/**"/>
<exclude name="modules/**"/>
<exclude name="test/webapp-fragments/WEB-INF/classes/*.txt"/>
<exclude name="test/webapp/bug49nnn/*.txt"/>
<exclude name="test/webapp/bug53257/**/*.txt"/>
<exclude name="test/webapp/bug66609/*.txt"/>
<exclude name="test/webresources/**/*.txt"/>
<exclude name="**/*.mdl"/>
<exclude name="**/*.pem"/>
<exclude name="**/*.svg"/>
<exclude name="**/*_2.xml"/>
<exclude name="res/checkstyle/header-al2.txt"/>
<!-- Exclude auto-generated files -->
<exclude name="java/org/apache/el/parser/ELParser*.java" />
<exclude name="java/org/apache/el/parser/Node.java" />
<exclude name="java/org/apache/tomcat/util/json/JSONParser*.java" />
<exclude name="java/org/apache/tomcat/util/openssl/*.java" />
<exclude name="**/*.jj" />
<exclude name="java/org/apache/**/JJT*ParserState.java" />
<exclude name="java/org/apache/**/ParseException.java" />
<exclude name="java/org/apache/**/JavaCharStream.java" />
<exclude name="java/org/apache/**/SimpleCharStream.java" />
<exclude name="java/org/apache/**/Token.java" />
<exclude name="java/org/apache/**/TokenMgrError.java" />
<!-- Exclude developer specific local files -->
<exclude name="build.properties" />
<exclude name="res/maven/mvn.properties" />
</fileset>
<fileset dir="modules/jdbc-pool" >
<exclude name=".*/**"/>
<exclude name="**/MANIFEST.MF"/>
<patternset refid="text.files" />
<!-- Exclude developer specific local files -->
<exclude name="build.properties" />
</fileset>
</checkstyle>
<!-- jakarta package checks -->
<checkstyle config="${basedir}/res/checkstyle/jakarta-checkstyle.xml">
<fileset dir="java/jakarta" >
<include name="**/*.java"/>
</fileset>
</checkstyle>
<!-- org package checks -->
<checkstyle config="${basedir}/res/checkstyle/org-checkstyle.xml">
<fileset dir="java/org" >
<include name="**/*.java"/>
</fileset>
</checkstyle>
<!-- Tests checks -->
<checkstyle config="${basedir}/res/checkstyle/test-checkstyle.xml">
<fileset dir="test" >
<patternset refid="text.files" />
<exclude name=".*/**"/>
<exclude name="**/*.pem"/>
<!-- Exclude simple test files -->
<exclude name="webapp/bug49nnn/bug49464*"/>
<exclude name="webapp/bug53257/**/*.txt"/>
<exclude name="webapp/bug66609/*.txt"/>
<exclude name="webapp-fragments/WEB-INF/classes/*.txt"/>
<exclude name="webresources/**"/>
<!-- Exclude test files with unusual encodings -->
<exclude name="webapp/jsp/encoding/**"/>
</fileset>
</checkstyle>
</target>
<target name="validate-eoln" depends="build-prepare,compile-prepare"
description="Validate that the source files have correct line ends">
<!-- Compile the CheckEol class only. Note that the class depends on
Ant only. There is no need to download additional dependencies nor
add them to the class path. The rest should be the same as in "compile"
target.-->
<javac srcdir="java" destdir="${tomcat.classes}"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
release="${compile.release}"
encoding="ISO-8859-1"
includeAntRuntime="true" >
<!-- Uncomment this to show unchecked warnings:
<compilerarg value="-Xlint:unchecked"/>
-->
<include name="org/apache/tomcat/buildutil/CheckEol*" />
</javac>
<taskdef name="checkeol"
classname="org.apache.tomcat.buildutil.CheckEol"
classpath="${tomcat.classes}" />
<checkeol mode="LF">
<fileset dir="." >
<patternset refid="text.files" />
<include name="**/*.bat"/>
<include name="**/*.sh"/>
<exclude name=".*/**"/>
<exclude name="nbproject/**"/>
<exclude name="output/**"/>
<exclude name="modules/**"/>
<!-- Exclude these since some svn clients do not seem able to handle
UTF-16 line-ending conversion -->
<exclude name="test/webapp/jsp/encoding/bom-utf16*"/>
<exclude name="test/webapp/jsp/encoding/bom-none-prolog-utf16*"/>
</fileset>
<fileset dir="modules/jdbc-pool" >
<patternset refid="text.files" />
</fileset>
</checkeol>
</target>
<target name="compile-prepare">
<!-- Add the builtin catalina.properties -->
<copy todir="java/org/apache/catalina/startup"
file="conf/catalina.properties" encoding="ISO-8859-1">
<filterset refid="version.filters"/>
</copy>
<!-- Copy jdbc-pool documentation -->
<copy tofile="webapps/docs/jdbc-pool.xml"
file="${tomcat.jdbc.dir}/doc/jdbc-pool.xml" encoding="UTF-8">
<filterset>
<filter token="TOMCAT_PROJECT_DEST" value="project.xml"/>
</filterset>
</copy>
</target>