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