]> git.pld-linux.org Git - packages/tomcat.git/blob - tomcat-build.xml.patch
- updated for 7.0.26
[packages/tomcat.git] / tomcat-build.xml.patch
1 --- apache-tomcat-7.0.26-src/build.xml  2012-02-17 15:15:30.000000000 +0100
2 +++ apache-tomcat-7.0.26-src.new/build.xml      2012-03-19 10:05:29.185332581 +0100
3 @@ -438,53 +438,6 @@
4      
5    </target>
6  
7 -  <target name="validate" depends="download-validate" if="${execute.validate}">
8 -    <!-- Required so we can cache checkstyle results -->
9 -    <mkdir dir="${tomcat.output}/res/checkstyle"/>
10 -
11 -    <taskdef resource="checkstyletask.properties"
12 -             classpath="${checkstyle.jar}" />
13 -    <checkstyle config="res/checkstyle/checkstyle.xml">
14 -      <fileset dir="." >
15 -        <patternset refid="text.files" />
16 -        <include name="**/*.bat"/>
17 -        <include name="**/*.sh"/>
18 -        <exclude name="bin/setenv.*"/>
19 -        <exclude name=".*/**"/>
20 -        <exclude name="output/**"/>
21 -        <exclude name="modules/**"/>
22 -        <exclude name="**/*.mdl"/>
23 -        <exclude name="**/*_2.xml"/>
24 -        <exclude name="res/checkstyle/header-al2.txt"/>
25 -        <!-- Exclude auto-generated files -->
26 -        <exclude name="java/org/apache/el/parser/ELParser*.java" />
27 -        <exclude name="java/org/apache/el/parser/JJTELParserState.java" />
28 -        <exclude name="java/org/apache/el/parser/Node.java" />
29 -        <exclude name="java/org/apache/el/parser/ParseException.java" />
30 -        <exclude name="java/org/apache/el/parser/SimpleCharStream.java" />
31 -        <exclude name="java/org/apache/el/parser/Token*.java" />
32 -        <!-- Exclude these else Gump runs validate on them -->
33 -        <exclude name="**/org/apache/tomcat/dbcp/**"/>
34 -        <exclude name="**/tomcat-deps/**"/>
35 -      </fileset>
36 -      <fileset dir="modules/jdbc-pool" >
37 -        <patternset refid="text.files" />
38 -      </fileset>
39 -    </checkstyle>
40 -    <!-- javax package checks -->
41 -    <checkstyle config="res/checkstyle/javax-checkstyle.xml">
42 -      <fileset dir="java/javax" >
43 -        <include name="**/*.java"/>
44 -      </fileset>
45 -    </checkstyle>
46 -    <!-- org package checks -->
47 -    <checkstyle config="res/checkstyle/org-checkstyle.xml">
48 -      <fileset dir="java/org" >
49 -        <include name="**/*.java"/>
50 -      </fileset>
51 -    </checkstyle>
52 -  </target>
53 -
54    <target name="validate-eoln" depends="compile"
55      description="Validate that the source files have correct line ends">
56      <taskdef name="checkeol"
57 @@ -524,7 +477,7 @@
58      </copy>
59    </target>
60  
61 -  <target name="compile" depends="build-prepare,download-compile,compile-prepare,validate">
62 +  <target name="compile" depends="build-prepare">
63      <!-- Compile internal server components -->
64      <javac srcdir="java" destdir="${tomcat.classes}"
65             debug="${compile.debug}"
66 @@ -807,13 +760,6 @@
67    <target name="deploy" depends="package,build-docs"
68            description="Default. Builds a working Tomcat instance">
69  
70 -    <copy tofile="${tomcat.build}/bin/tomcat-native.tar.gz"
71 -            file="${tomcat-native.tar.gz}" />
72 -    <copy tofile="${tomcat.build}/bin/commons-daemon-native.tar.gz"
73 -            file="${commons-daemon.native.src.tgz}" />
74 -
75 -    <copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" />
76 -
77      <!-- Copy scripts -->
78      <copy todir="${tomcat.build}/bin">
79        <fileset dir="bin">
80 @@ -1078,7 +1024,7 @@
81  
82    </target>
83  
84 -  <target name="test-compile" depends="compile,download-test-compile" >
85 +  <target name="test-compile" depends="compile" >
86      <mkdir dir="${test.classes}"/>
87      <!-- Compile -->
88      <javac srcdir="test" destdir="${test.classes}"
89 @@ -1183,52 +1129,10 @@
90      <mkdir dir="${tomcat.extras}/webservices"/>
91    </target>
92  
93 -  <target name="extras-commons-logging-prepare"
94 -          depends="extras-prepare"
95 -          description="Prepare to build web services extras package">
96 -
97 -    <antcall target="downloadfile-2">
98 -      <param name="sourcefile.1" value="${commons-logging-src.loc.1}"/>
99 -      <param name="sourcefile.2" value="${commons-logging-src.loc.2}"/>
100 -      <param name="destfile" value="${commons-logging-src.tar.gz}"/>
101 -      <param name="destdir" value="${commons-logging.home}"/>
102 -    </antcall>
103 -
104 -    <antcall target="downloadfile">
105 -      <param name="sourcefile" value="${avalon-framework.loc}"/>
106 -      <param name="destfile" value="${avalon-framework.jar}"/>
107 -      <param name="destdir" value="${avalon-framework.home}"/>
108 -    </antcall>
109 -
110 -    <antcall target="downloadfile">
111 -      <param name="sourcefile" value="${log4j.loc}"/>
112 -      <param name="destfile" value="${log4j.jar}"/>
113 -      <param name="destdir" value="${log4j.home}"/>
114 -    </antcall>
115 -
116 -    <antcall target="downloadfile">
117 -      <param name="sourcefile" value="${logkit.loc}"/>
118 -      <param name="destfile" value="${logkit.jar}"/>
119 -      <param name="destdir" value="${logkit.home}"/>
120 -    </antcall>
121 -
122 -    <antcall target="downloadfile">
123 -      <param name="sourcefile" value="${servletapi.loc}"/>
124 -      <param name="destfile" value="${servletapi.jar}"/>
125 -      <param name="destdir" value="${servletapi.home}"/>
126 -    </antcall>
127 -
128 -  </target>
129 -
130    <target name="extras-commons-logging"
131 -          depends="extras-commons-logging-prepare,compile,build-manifests"
132 +          depends="extras-prepare,compile,build-manifests"
133            description="Build JULI for log4j extras package">
134  
135 -    <gunzip src="${commons-logging-src.tar.gz}"
136 -      dest="${tomcat.extras}/logging/commons-logging-src.tar"/>
137 -    <untar src="${tomcat.extras}/logging/commons-logging-src.tar"
138 -      dest="${tomcat.extras}/logging/"/>
139 -
140      <replace dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/src/java/org/apache/commons"
141          encoding="ISO-8859-1">
142        <replacefilter token="org.apache.commons"
143 @@ -1250,7 +1154,8 @@
144        file="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/build.xml" />
145  
146      <copy todir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src">
147 -      <fileset file="${avalon-framework.jar}" />
148 +      <fileset file="${avalon-framework-api.jar}" />
149 +      <fileset file="${avalon-framework-impl.jar}" />
150        <fileset file="${log4j.jar}" />
151        <fileset file="${logkit.jar}" />
152        <fileset file="${servletapi.jar}" />
153 @@ -1330,18 +1235,6 @@
154            depends="extras-prepare"
155            description="Prepare to build web services extras package">
156  
157 -    <antcall target="downloadfile">
158 -      <param name="sourcefile" value="${jaxrpc-lib.loc}"/>
159 -      <param name="destfile" value="${jaxrpc-lib.jar}"/>
160 -      <param name="destdir" value="${jaxrpc-lib.home}"/>
161 -    </antcall>
162 -
163 -    <antcall target="downloadfile">
164 -      <param name="sourcefile" value="${wsdl4j-lib.loc}"/>
165 -      <param name="destfile" value="${wsdl4j-lib.jar}"/>
166 -      <param name="destdir" value="${wsdl4j-lib.home}"/>
167 -    </antcall>
168 -
169      <copy file="${jaxrpc-lib.jar}"
170            tofile="${tomcat.extras}/webservices/jaxrpc.jar" />
171      <copy file="${wsdl4j-lib.jar}"
172 @@ -1448,7 +1341,7 @@
173  
174    </target>
175  
176 -  <target name="dist-prepare" depends="download-dist">
177 +  <target name="dist-prepare">
178      <mkdir dir="${tomcat.dist}"/>
179      <mkdir dir="${tomcat.dist}/bin"/>
180      <mkdir dir="${tomcat.dist}/conf"/>
181 @@ -2236,304 +2129,6 @@
182      <delete file="webapps/docs/jdbc-pool.xml"/>
183    </target>
184  
185 -    
186 -  <!-- ================ Download and dependency building =================== -->
187 -
188 -  <target name="download-validate"
189 -          description="Download components necessary to validate source"
190 -          if="${execute.validate}">
191 -
192 -    <antcall target="downloadzip">
193 -      <param name="sourcefile" value="${checkstyle.loc}"/>
194 -      <param name="destfile" value="${checkstyle.jar}"/>
195 -      <param name="destdir" value="${base.path}"/>
196 -    </antcall>
197 -
198 -  </target>
199 -
200 -  <target name="download-compile"
201 -          description="Download (and build) components necessary to compile" >
202 -
203 -    <antcall target="downloadfile-2">
204 -      <param name="sourcefile.1" value="${tomcat-native.loc.1}"/>
205 -      <param name="sourcefile.2" value="${tomcat-native.loc.2}"/>
206 -      <param name="destfile" value="${tomcat-native.tar.gz}"/>
207 -      <param name="destdir" value="${tomcat-native.home}"/>
208 -    </antcall>
209 -
210 -    <!-- Download Commons Daemon -->
211 -    <antcall target="downloadgz-2">
212 -      <param name="sourcefile.1" value="${commons-daemon.bin.loc.1}"/>
213 -      <param name="sourcefile.2" value="${commons-daemon.bin.loc.2}"/>
214 -      <param name="destfile" value="${commons-daemon.jar}"/>
215 -    </antcall>
216 -
217 -    <antcall target="downloadfile-2">
218 -      <param name="sourcefile.1" value="${commons-daemon.native.src.loc.1}"/>
219 -      <param name="sourcefile.2" value="${commons-daemon.native.src.loc.2}"/>
220 -      <param name="destfile" value="${commons-daemon.native.src.tgz}"/>
221 -      <param name="destdir" value="${commons-daemon.home}"/>
222 -    </antcall>
223 -
224 -    <!-- Download src and build Tomcat DBCP bundle -->
225 -    <antcall target="downloadgz-2">
226 -      <param name="sourcefile.1" value="${commons-pool-src.loc.1}"/>
227 -      <param name="sourcefile.2" value="${commons-pool-src.loc.2}"/>
228 -      <param name="destfile" value="${commons-pool.home}/build.xml" />
229 -    </antcall>
230 -    <antcall target="downloadgz-2">
231 -      <param name="sourcefile.1" value="${commons-dbcp-src.loc.1}"/>
232 -      <param name="sourcefile.2" value="${commons-dbcp-src.loc.2}"/>
233 -      <param name="destfile" value="${commons-dbcp.home}/build.xml" />
234 -    </antcall>
235 -    <mkdir dir="${tomcat-dbcp.home}"/>
236 -    <!-- Rebuild dbcp only if built jars do not exist -->
237 -    <!-- or new versions of pool or dbcp have been downloaded. -->
238 -    <condition property="no.build.dbcp">
239 -      <and>
240 -        <uptodate srcfile="${commons-pool.home}" targetfile="${tomcat-dbcp.jar}" />
241 -        <uptodate srcfile="${commons-pool.home}" targetfile="${tomcat-dbcp-src.jar}" />
242 -        <uptodate srcfile="${commons-dbcp.home}" targetfile="${tomcat-dbcp.jar}" />
243 -        <uptodate srcfile="${commons-dbcp.home}" targetfile="${tomcat-dbcp-src.jar}" />
244 -      </and>
245 -    </condition>
246 -    <antcall target="build-tomcat-dbcp" />
247 -
248 -    <!-- Download JDT (Eclipse compiler) -->
249 -    <antcall target="downloadfile-2">
250 -      <param name="sourcefile.1" value="${jdt.loc.1}"/>
251 -      <param name="sourcefile.2" value="${jdt.loc.2}"/>
252 -      <param name="destfile" value="${jdt.jar}"/>
253 -      <param name="destdir" value="${jdt.home}"/>
254 -    </antcall>
255 -  </target>
256 -
257 -  <target name="download-test-compile"
258 -          description="Download additional components for the tests" >
259 -
260 -    <antcall target="downloadzip">
261 -      <param name="sourcefile" value="${junit.loc}"/>
262 -      <param name="destfile" value="${junit.jar}"/>
263 -      <param name="destdir" value="${base.path}"/>
264 -    </antcall>
265 -
266 -  </target>
267 -
268 -  <target name="download-dist"
269 -          description="Download additional components for a distribution" >
270 -
271 -    <antcall target="downloadfile-2">
272 -      <param name="sourcefile.1" value="${tomcat-native.dll.1}/win32/tcnative-1.dll"/>
273 -      <param name="sourcefile.2" value="${tomcat-native.dll.2}/win32/tcnative-1.dll"/>
274 -      <param name="destfile" value="${tomcat-native.dll.win32}"/>
275 -      <param name="destdir" value="${tomcat-native.home}"/>
276 -    </antcall>
277 -
278 -    <antcall target="downloadfile-2">
279 -      <param name="sourcefile.1" value="${tomcat-native.dll.1}/win64/x64/tcnative-1.dll"/>
280 -      <param name="sourcefile.2" value="${tomcat-native.dll.2}/win64/x64/tcnative-1.dll"/>
281 -      <param name="destfile" value="${tomcat-native.dll.x64}"/>
282 -      <param name="destdir" value="${tomcat-native.home}"/>
283 -    </antcall>
284 -
285 -    <antcall target="downloadfile-2">
286 -      <param name="sourcefile.1" value="${tomcat-native.dll.1}/win64/ia64/tcnative-1.dll"/>
287 -      <param name="sourcefile.2" value="${tomcat-native.dll.2}/win64/ia64/tcnative-1.dll"/>
288 -      <param name="destfile" value="${tomcat-native.dll.i64}"/>
289 -      <param name="destdir" value="${tomcat-native.home}"/>
290 -    </antcall>
291 -
292 -    <antcall target="downloadzip-2">
293 -      <param name="sourcefile.1" value="${commons-daemon.native.win.loc.1}"/>
294 -      <param name="sourcefile.2" value="${commons-daemon.native.win.loc.2}"/>
295 -      <param name="destfile" value="${commons-daemon.native.win.mgr.exe}"/>
296 -      <param name="destdir" value="${commons-daemon.native.win.home}"/>
297 -    </antcall>
298 -
299 -    <antcall target="downloadzip">
300 -      <param name="sourcefile" value="${nsis.loc}"/>
301 -      <param name="destfile" value="${nsis.exe}"/>
302 -      <param name="destdir" value="${nsis.home}/.."/>
303 -    </antcall>
304 -
305 -  </target>
306 -
307 -
308 -  <!-- =============== Targets for dependencies that need to =============== -->
309 -  <!-- ================  be built rather than used directly ================ -->
310 -
311 -  <target name="build-tomcat-dbcp" depends="build-manifests" unless="no.build.dbcp">
312 -    <copy todir="${tomcat-dbcp.home}">
313 -      <fileset dir="${commons-pool.home}">
314 -        <include name="**/*.java" />
315 -        <exclude name="**/test/**" />
316 -      </fileset>
317 -      <fileset dir="${commons-dbcp.home}">
318 -        <include name="**/*.java" />
319 -        <exclude name="**/test/**" />
320 -        <exclude name="**/managed/**" />
321 -      </fileset>
322 -    </copy>
323 -    <replace dir="${tomcat-dbcp.home}/src/java/org/apache/commons"
324 -        encoding="ISO-8859-1">
325 -      <replacefilter token="org.apache.commons"
326 -            value="org.apache.tomcat.dbcp" />
327 -    </replace>
328 -    <replace dir="${tomcat-dbcp.home}/src/java/org/apache/commons/pool/impl"
329 -        encoding="ISO-8859-1">
330 -      <replacefilter token="enum"
331 -            value="enumeration" />
332 -    </replace>
333 -
334 -    <mkdir dir="${tomcat-dbcp.home}/src/java/org/apache/tomcat/dbcp" />
335 -    <move todir="${tomcat-dbcp.home}/src/java/org/apache/tomcat/dbcp">
336 -      <fileset dir="${tomcat-dbcp.home}/src/java/org/apache/commons" />
337 -    </move>
338 -    <mkdir dir="${tomcat-dbcp.home}/classes"/>
339 -    <javac destdir="${tomcat-dbcp.home}/classes"
340 -           optimize="off"
341 -           debug="${compile.debug}"
342 -           deprecation="${compile.deprecation}"
343 -           source="${compile.source}"
344 -           target="${compile.target}"
345 -           sourcepath="${tomcat-dbcp.home}/src/java"
346 -           srcdir="${tomcat-dbcp.home}/src/java"
347 -           encoding="ISO-8859-1"
348 -           includeantruntime="false">
349 -      <include name="**" />
350 -    </javac>
351 -    <jarIt jarfile="${tomcat-dbcp.jar}"
352 -      filesDir="${tomcat-dbcp.home}/classes"
353 -      filesId="files.tomcat-dbcp" />
354 -    <jarIt jarfile="${tomcat-dbcp-src.jar}"
355 -      filesDir="${tomcat-dbcp.home}/src/java"
356 -      filesId="files.tomcat-dbcp" />
357 -  </target>
358 -
359 -  <!-- =============== Utility Targets to support downloads ================ -->
360 -
361 -  <target name="proxyflags">
362 -    <!-- check proxy parameters. -->
363 -    <condition property="useproxy">
364 -      <equals arg1="${proxy.use}" arg2="on" />
365 -    </condition>
366 -  </target>
367 -
368 -  <target name="setproxy" depends="proxyflags" if="useproxy">
369 -    <taskdef name="setproxy"
370 -            classname="org.apache.tools.ant.taskdefs.optional.net.SetProxy" />
371 -    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"
372 -              proxyuser="${proxy.user}" proxypassword="${proxy.password}" />
373 -    <echo message="Using ${proxy.host}:${proxy.port} to download ${sourcefile}"/>
374 -  </target>
375 -
376 -  <target name="testexist">
377 -    <echo message="Testing  for ${destfile}"/>
378 -    <available file="${destfile}" property="exist"/>
379 -  </target>
380 -
381 -  <target name="downloadgz" unless="exist" depends="setproxy,testexist">
382 -    <!-- Download and extract the package -->
383 -    <get src="${sourcefile}" dest="${base.path}/file.tar.gz" />
384 -    <gunzip src="${base.path}/file.tar.gz" dest="${base.path}/file.tar"/>
385 -    <untar src="${base.path}/file.tar" dest="${base.path}"/>
386 -    <delete file="${base.path}/file.tar"/>
387 -    <delete file="${base.path}/file.tar.gz"/>
388 -  </target>
389 -
390 -  <target name="downloadgz-2" unless="exist" depends="setproxy,testexist">
391 -    <!-- Download and extract the package from the two alternative locations -->
392 -    <delete file="${base.path}/file.tar" quiet="true" />
393 -    <delete file="${base.path}/file.tar.gz" quiet="true" />
394 -    <antcall target="trydownload">
395 -      <param name="sourcefile" value="${sourcefile.1}" />
396 -      <param name="destfile" value="${base.path}/file.tar.gz" />
397 -    </antcall>
398 -    <antcall target="trydownload">
399 -      <param name="sourcefile" value="${sourcefile.2}" />
400 -      <param name="destfile" value="${base.path}/file.tar.gz" />
401 -    </antcall>
402 -    <gunzip src="${base.path}/file.tar.gz" dest="${base.path}/file.tar"/>
403 -    <untar src="${base.path}/file.tar" dest="${base.path}"/>
404 -    <delete file="${base.path}/file.tar"/>
405 -    <delete file="${base.path}/file.tar.gz"/>
406 -  </target>
407 -
408 -  <target name="downloadzip" unless="exist" depends="setproxy,testexist">
409 -    <!-- Download and extract the package -->
410 -    <get src="${sourcefile}" dest="${base.path}/file.zip" />
411 -    <mkdir dir="${destdir}" />
412 -    <unzip src="${base.path}/file.zip" dest="${destdir}"/>
413 -    <delete file="${base.path}/file.zip"/>
414 -  </target>
415 -
416 -  <target name="downloadzip-2" unless="exist" depends="testexist">
417 -    <!-- Download and extract the package from the two alternative locations -->
418 -    <delete file="${base.path}/file.zip" quiet="true" />
419 -    <antcall target="trydownload">
420 -      <param name="sourcefile" value="${sourcefile.1}" />
421 -      <param name="destfile" value="${base.path}/file.zip" />
422 -    </antcall>
423 -    <antcall target="trydownload">
424 -      <param name="sourcefile" value="${sourcefile.2}" />
425 -      <param name="destfile" value="${base.path}/file.zip" />
426 -    </antcall>
427 -    <mkdir dir="${destdir}" />
428 -    <unzip src="${base.path}/file.zip" dest="${destdir}"/>
429 -    <delete file="${base.path}/file.zip"/>
430 -  </target>
431 -
432 -  <target name="downloadfile" unless="exist" depends="setproxy,testexist">
433 -    <!-- Download extract the file -->
434 -    <mkdir dir="${destdir}" />
435 -    <get src="${sourcefile}" dest="${destfile}" />
436 -  </target>
437 -
438 -  <target name="downloadfile-2" unless="exist" depends="testexist">
439 -    <!-- Download the file from the two alternative locations -->
440 -    <mkdir dir="${destdir}" />
441 -
442 -    <antcall target="trydownload">
443 -      <param name="sourcefile" value="${sourcefile.1}" />
444 -    </antcall>
445 -
446 -    <antcall target="trydownload">
447 -      <param name="sourcefile" value="${sourcefile.2}" />
448 -    </antcall>
449 -
450 -    <available file="${destfile}" property="exist"/>
451 -    <fail unless="exist" message="Failed to download [${destfile}]. All download sources are unavailable." />
452 -  </target>
453 -
454 -  <target name="trydownload.check" depends="setproxy">
455 -    <condition property="trydownload.run">
456 -      <and>
457 -        <not>
458 -          <available file="${destfile}" />
459 -        </not>
460 -        <http url="${sourcefile}" />
461 -      </and>
462 -    </condition>
463 -  </target>
464 -
465 -  <target name="trydownload" if="trydownload.run" depends="trydownload.check">
466 -    <!-- Downloads a file if not yet downloaded and the source URL is available -->
467 -    <get src="${sourcefile}" dest="${destfile}" />
468 -  </target>
469 -
470 -  <!-- ============================ IDE Support ============================ -->
471 -
472 -  <target name="ide-eclipse" depends="deploy, extras-webservices-prepare"
473 -          description="Prepares the source tree to be built in Eclipse">
474 -
475 -    <!-- Copy the sample project files into the root directory -->
476 -    <copy file="${tomcat.home}/res/ide-support/eclipse/eclipse.project" tofile="${tomcat.home}/.project"/>
477 -    <copy file="${tomcat.home}/res/ide-support/eclipse/eclipse.classpath" tofile="${tomcat.home}/.classpath"/>
478 -
479 -    <echo>Eclipse project files created.
480 -Read the Building page on the Apache Tomcat documentation site for details on how to configure your Eclipse workplace.</echo>
481 -  </target>
482 -
483    <!-- ======================= Macros, Taskdefs etc ======================== -->
484  
485    <macrodef name="jarIt" description="utility macro for standard JAR packaging">
This page took 0.152639 seconds and 4 git commands to generate.