summaryrefslogtreecommitdiff
blob: 109caf67af375d0d4a85d5eba24764c3b1779aa7 (plain)
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
--- apache-tomcat-5.5.20-src/build/build.xml	2007-01-26 19:10:26.000000000 -0500
+++ build.xml	2007-01-26 19:31:49.000000000 -0500
@@ -143,6 +143,7 @@
 
   <!-- ====================== DEPLOY: Copy Static Files =================== -->
   <target name="deploy-static" depends="init">
+  <!--
     <copy file="${jsp-api.jar}"  todir="${tomcat.build}/common/lib"/>
     <copy file="${servlet-api.jar}" todir="${tomcat.build}/common/lib"/>
 
@@ -161,9 +162,9 @@
     <copy tofile="${tomcat.build}/bin/tomcat-native.tar.gz"
             file="${tomcat-native.tar.gz}" />
 
-    <!-- <copy todir="${tomcat.build}/common/lib" file="${ant.jar}"/>
-    <copy todir="${tomcat.build}/common/lib" file="${ant-launcher.jar}"/> -->
+    <copy todir="${tomcat.build}/common/lib" file="${ant-launcher.jar}"/>
     <copy todir="${tomcat.build}/common/lib" file="${jasper-compiler-jdt.jar}"/>
+    -->
   </target>
 
   <!-- ====================== Build all components =================== -->
@@ -395,15 +396,14 @@
   <target name="build-webapps-precompile"
           depends="init" description="Precompile webapps" >
 
+    <antcall target="build-webapp-precompile-admin" />
+    <antcall target="build-webapp-precompile-examples" />
+
     <!-- JSPC -->
-    <property name="admin.base" location="${tomcat.build}/server/webapps/admin" />
     <property name="ROOT.base" location="${tomcat.build}/webapps/ROOT" />
-    <property name="jsp-examples.base" location="${tomcat.build}/webapps/jsp-examples" />
 
-    <mkdir dir="${admin.base}/WEB-INF/src/admin" />
     <mkdir dir="${ROOT.base}/WEB-INF/src" />
     <mkdir dir="${ROOT.base}/WEB-INF/classes" />
-    <mkdir dir="${jsp-examples.base}/WEB-INF/src" />
 
     <path id="jspc.classpath">
       <pathelement location="${java.home}/../lib/tools.jar"/>
@@ -437,23 +437,6 @@
              addWebXmlMappings="true"
              outputDir="${ROOT.base}/WEB-INF/src" />
 
-    <jasper2
-             compile="false"
-             validateXml="false"
-             uriroot="${jsp-examples.base}"
-         webXmlFragment="${jsp-examples.base}/WEB-INF/generated_web.xml"
-             addWebXmlMappings="true"
-             outputDir="${jsp-examples.base}/WEB-INF/src" />
-
-    <jasper2
-             package="admin"
-             compile="false"
-             validateXml="false"
-             uriroot="${admin.base}"
-             webXmlFragment="${admin.base}/WEB-INF/generated_web.xml"
-             addWebXmlMappings="true"
-             outputDir="${admin.base}/WEB-INF/src/admin" />
-
     <javac destdir="${ROOT.base}/WEB-INF/classes"
            optimize="off"
            debug="${compile.debug}"
@@ -475,61 +458,90 @@
       <include name="**" />
     </javac>
 
-    <mkdir dir="${jsp-examples.base}/WEB-INF/src/tags"/>
-    <copy todir="${jsp-examples.base}/WEB-INF/classes">
-      <fileset dir="${jsp-examples.base}/WEB-INF/src">
-        <include name="**/*.class" />
-      </fileset>
-    </copy>
+  </target>
 
-    <javac destdir="${jsp-examples.base}/WEB-INF/classes"
+  <target name="build-webapp-precompile-admin" unless="admin.precompile.notrequired">
+    <property name="admin.base" location="${tomcat.build}/server/webapps/admin" />
+    <mkdir dir="${admin.base}/WEB-INF/src/admin" />
+    <taskdef classname="org.apache.jasper.JspC" name="jasper2" >
+      <classpath refid="jspc.classpath"/>
+    </taskdef>
+    <jasper2
+             package="admin"
+             compile="false"
+             validateXml="false"
+             uriroot="${admin.base}"
+             webXmlFragment="${admin.base}/WEB-INF/generated_web.xml"
+             addWebXmlMappings="true"
+             outputDir="${admin.base}/WEB-INF/src/admin" />
+    <javac destdir="${admin.base}/WEB-INF/classes"
            optimize="off"
            debug="${compile.debug}"
            deprecation="${compile.deprecation}"
            source="${compile.source}"
            failonerror="false"
-           srcdir="${jsp-examples.base}/WEB-INF/src"
+           srcdir="${admin.base}/WEB-INF/src"
        excludes="**/*.smap">
       <classpath>
         <pathelement location="${java.home}/../lib/tools.jar"/>
         <fileset dir="${tomcat.build}/server/lib">
           <include name="*.jar"/>
         </fileset>
-        <fileset dir="${jsp-examples.base}/WEB-INF/lib">
+        <fileset dir="${admin.base}/WEB-INF/lib">
           <include name="*.jar"/>
         </fileset>
         <fileset dir="${tomcat.build}/common/lib">
           <include name="*.jar"/>
         </fileset>
         <pathelement location="${tomcat.build}/classes"/>
-        <pathelement location="${jsp-examples.base}/WEB-INF/classes"/>
       </classpath>
-      <include name="**" />
-      <exclude name="tags/**" />
+      <include name="admin/**" />
     </javac>
-
-    <javac destdir="${admin.base}/WEB-INF/classes"
+  </target>
+  
+  <target name="build-webapp-precompile-examples" unless="examples.precompile.notrequired">
+    <property name="jsp-examples.base" location="${tomcat.build}/webapps/jsp-examples" />
+    <mkdir dir="${jsp-examples.base}/WEB-INF/src" />
+    <taskdef classname="org.apache.jasper.JspC" name="jasper2" >
+      <classpath refid="jspc.classpath"/>
+    </taskdef>
+    <jasper2
+             compile="false"
+             validateXml="false"
+             uriroot="${jsp-examples.base}"
+         webXmlFragment="${jsp-examples.base}/WEB-INF/generated_web.xml"
+             addWebXmlMappings="true"
+             outputDir="${jsp-examples.base}/WEB-INF/src" />
+    <mkdir dir="${jsp-examples.base}/WEB-INF/src/tags"/>
+    <copy todir="${jsp-examples.base}/WEB-INF/classes">
+      <fileset dir="${jsp-examples.base}/WEB-INF/src">
+        <include name="**/*.class" />
+      </fileset>
+    </copy>
+    <javac destdir="${jsp-examples.base}/WEB-INF/classes"
            optimize="off"
            debug="${compile.debug}"
            deprecation="${compile.deprecation}"
            source="${compile.source}"
            failonerror="false"
-           srcdir="${admin.base}/WEB-INF/src"
+           srcdir="${jsp-examples.base}/WEB-INF/src"
        excludes="**/*.smap">
       <classpath>
         <pathelement location="${java.home}/../lib/tools.jar"/>
         <fileset dir="${tomcat.build}/server/lib">
           <include name="*.jar"/>
         </fileset>
-        <fileset dir="${admin.base}/WEB-INF/lib">
+        <fileset dir="${jsp-examples.base}/WEB-INF/lib">
           <include name="*.jar"/>
         </fileset>
         <fileset dir="${tomcat.build}/common/lib">
           <include name="*.jar"/>
         </fileset>
         <pathelement location="${tomcat.build}/classes"/>
+        <pathelement location="${jsp-examples.base}/WEB-INF/classes"/>
       </classpath>
-      <include name="admin/**" />
+      <include name="**" />
+      <exclude name="tags/**" />
     </javac>
   </target>
 
@@ -653,28 +665,8 @@
 
     <!-- <antcall target="build-commons-modeler" /> -->
     <!-- <antcall target="build-commons-daemon"  /> -->
-
-    <antcall target="downloadgz">
-      <param name="sourcefile" value="${commons-collections-src.loc}"/>
-      <param name="destfile" value="${tomcat-dbcp.jar}" />
-    </antcall>
-    <antcall target="downloadgz">
-      <param name="sourcefile" value="${commons-pool-src.loc}"/>
-      <param name="destfile" value="${tomcat-dbcp.jar}" />
-    </antcall>
-    <antcall target="downloadgz">
-      <param name="sourcefile" value="${commons-dbcp-src.loc}"/>
-      <param name="destfile" value="${tomcat-dbcp.jar}" />
-    </antcall>
-
-    <antcall target="build-tomcat-dbcp" />
-
-    <antcall target="downloadzip">
-      <param name="sourcefile" value="${jdt.loc}"/>
-      <param name="destfile" value="${jdt.jar}"/>
-      <param name="destdir" value="${base.path}"/>
-    </antcall>
-    <antcall target="build-jasper-compiler-jdt" />
+    <!-- <antcall target="build-tomcat-dbcp" /> -->
+    <!-- <antcall target="build-jasper-compiler-jdt" /> -->
   </target>
 
   <target name="build-tomcat-dbcp">
@@ -754,19 +746,11 @@
         </jar>
       </target>
 
-  <target name="build-webapps" depends="init"
-          description="build  webapps">
-
-    <echo>========== Building: webapps </echo>
-
-    <mkdir dir="${tomcat.build}/webapps" />
-    <mkdir dir="${tomcat.build}/server/webapps" />
+  <target name="build-examples" unless="examples.build.notrequired">
 
     <!-- The build files are far too difficult to hack - just build it and copy -->
-    <ant dir="${api.home}/jsr154" target="dist">
-    </ant>
-    <ant dir="${api.home}/jsr152" target="dist">
-    </ant>
+    <ant dir="${api.home}/jsr154" target="examples" />
+    <ant dir="${api.home}/jsr152" target="examples" />
 
     <mkdir dir="${tomcat.build}/webapps/servlets-examples"/>
     <copy todir="${tomcat.build}/webapps/servlets-examples">
@@ -779,6 +763,18 @@
         <exclude name="WEB-INF/tagPlugins.xml" />
       </fileset>
     </copy>
+    
+  </target>
+
+  <target name="build-webapps" depends="init"
+          description="build  webapps">
+
+    <echo>========== Building: webapps </echo>
+
+    <mkdir dir="${tomcat.build}/webapps" />
+    <mkdir dir="${tomcat.build}/server/webapps" />
+
+	<antcall target="build-examples" />
 
     <ant dir="${catalina.home}/webapps/ROOT" target="build-main">
         <property name="webapps.build" value="${tomcat.build}/webapps" />
@@ -850,14 +846,7 @@
         filtering="true" />
 
     <!-- Build JARs for webapps classes -->
-    <mkdir dir="${tomcat.build}/server/webapps/admin/WEB-INF/lib" />
-    <jar jarfile="${tomcat.build}/server/webapps/admin/WEB-INF/lib/catalina-admin.jar"
-         index="true">
-       <fileset dir="${tomcat.build}/server/webapps/admin/WEB-INF/classes">
-          <include name="**/*.class" />
-          <include name="**/*.properties" />
-       </fileset>
-    </jar>
+    <antcall target="fix-admin-webapp" />
     <mkdir dir="${tomcat.build}/server/webapps/manager/WEB-INF/lib" />
     <jar jarfile="${tomcat.build}/server/webapps/manager/WEB-INF/lib/catalina-manager.jar"
          index="true">
@@ -896,9 +885,20 @@
          todir="${tomcat.build}/conf/Catalina/localhost" />
     <copy file="${tomcat.build}/server/webapps/host-manager/host-manager.xml"
          todir="${tomcat.build}/conf/Catalina/localhost" />
+
+  </target>
+
+  <target name="fix-admin-webapp" unless="admin.build.notrequired">
+    <mkdir dir="${tomcat.build}/server/webapps/admin/WEB-INF/lib" />
+    <jar jarfile="${tomcat.build}/server/webapps/admin/WEB-INF/lib/catalina-admin.jar"
+         index="true">
+       <fileset dir="${tomcat.build}/server/webapps/admin/WEB-INF/classes">
+          <include name="**/*.class" />
+          <include name="**/*.properties" />
+       </fileset>
+    </jar>
     <copy file="${tomcat.build}/server/webapps/admin/admin.xml"
          todir="${tomcat.build}/conf/Catalina/localhost" />
-
   </target>
 
   <!-- ====================== Embed target =================== -->
@@ -1041,11 +1041,11 @@
   <!-- ====================== Compat target =================== -->
 
   <target name="compat" description="Create compatibility binaries for JREs before 1.5" >
-
+    <!--
     <copy todir="${tomcat.compat}/common/endorsed" file="${xercesImpl.jar}"/>
     <copy todir="${tomcat.compat}/common/endorsed" file="${xml-apis.jar}"/>
     <copy tofile="${tomcat.compat}/bin/jmx.jar" file="${jmx.jar}"/>
-
+    -->
   </target>
 
   <!-- ====================== DEPLOY: Deploy Components =================== -->
@@ -1092,8 +1092,9 @@
     <!-- Copy Unix JSVC from commons-daemon -->
     <copy file="${commons-daemon.jsvc.tar.gz}"
         tofile="${tomcat.dist}/bin/jsvc.tar.gz" />
+    <!--
     <copy todir="${tomcat.build}/bin" file="${commons-daemon.jar}" />
-
+    -->
     <echo>Target: Webapps precompilation ...</echo>
 
     <antcall target="build-admin"/>
@@ -1188,10 +1189,11 @@
    description="Catalina Tests" depends="dist-tester">
 
     <!-- For Java 1.4 -->
+    <!--
     <copy file="${jmx.jar}" tofile="${tomcat.build}/bin/jmx.jar" />
     <copy todir="${tomcat.build}/common/endorsed" file="${xercesImpl.jar}"/>
     <copy todir="${tomcat.build}/common/endorsed" file="${xml-apis.jar}"/>
-
+    -->
     <parallel>
 
         <java classname="LauncherBootstrap" fork="yes">
@@ -1871,10 +1873,10 @@
 
     <!-- commons-digester needs ../LICENSE -->
     <!-- That is ugly XXX needs a review -->
+    <!--
     <copy file="LICENSE" tofile="../LICENSE"/>
     <copy file="LICENSE" tofile="${base.path}/LICENSE"/>
 
-    <!-- Downdown any sub package or tools needed. -->
     <antcall target="downloadgz">
       <param name="sourcefile" value="${commons-beanutils.loc}"/>
       <param name="destfile" value="${commons-beanutils.jar}"/>
@@ -1916,7 +1918,6 @@
     </antcall>
 
     <antcall target="downloadgz">
-      <!-- xerces2 brings 2 files, test for one of them -->
       <param name="sourcefile" value="${xerces.loc}"/>
       <param name="destfile" value="${xml-apis.jar}"/>
     </antcall>
@@ -1937,7 +1938,6 @@
       <param name="destfile" value="${commons-launcher.jar}"/>
     </antcall>
 
-    <!--
     <antcall target="downloadgz">
       <param name="sourcefile" value="${commons-pool.loc}"/>
       <param name="destfile" value="${commons-pool.jar}"/>
@@ -1948,7 +1948,6 @@
       <param name="destfile" value="${commons-dbcp.jar}"/>
       <param name="destdir" value="${base.path}"/>
     </antcall>
-    -->
 
     <antcall target="downloadgz">
       <param name="sourcefile" value="${commons-httpclient.loc}"/>
@@ -1976,7 +1975,7 @@
       <param name="destfile" value="${tomcat-native.tar.gz}"/>
       <param name="destdir" value="${tomcat-native.home}"/>
     </antcall>
-
+    -->
     <!-- Build the dependencies that are not yet released -->
     <antcall target="build-depends"/>