]> git.pld-linux.org Git - packages/tomcat.git/blame - tomcat-build.xml.patch
- up to 7.0.40; jcl 1.1.3; still build problem
[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
be06817a 64@@ -552,7 +498,7 @@
70d2c6e8
SP
65 </copy>
66 </target>
bc0d3b1f 67
70d2c6e8
SP
68- <target name="compile" depends="build-prepare,download-compile,compile-prepare,validate">
69+ <target name="compile" 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}"
be06817a 96@@ -1240,52 +1179,10 @@
bc0d3b1f
JR
97 <mkdir dir="${tomcat.extras}/webservices"/>
98 </target>
99
100- <target name="extras-commons-logging-prepare"
101- depends="extras-prepare"
102- description="Prepare to build web services extras package">
103-
104- <antcall target="downloadfile-2">
105- <param name="sourcefile.1" value="${commons-logging-src.loc.1}"/>
106- <param name="sourcefile.2" value="${commons-logging-src.loc.2}"/>
107- <param name="destfile" value="${commons-logging-src.tar.gz}"/>
108- <param name="destdir" value="${commons-logging.home}"/>
109- </antcall>
110-
111- <antcall target="downloadfile">
112- <param name="sourcefile" value="${avalon-framework.loc}"/>
113- <param name="destfile" value="${avalon-framework.jar}"/>
114- <param name="destdir" value="${avalon-framework.home}"/>
115- </antcall>
116-
117- <antcall target="downloadfile">
118- <param name="sourcefile" value="${log4j.loc}"/>
119- <param name="destfile" value="${log4j.jar}"/>
120- <param name="destdir" value="${log4j.home}"/>
121- </antcall>
122-
123- <antcall target="downloadfile">
124- <param name="sourcefile" value="${logkit.loc}"/>
125- <param name="destfile" value="${logkit.jar}"/>
126- <param name="destdir" value="${logkit.home}"/>
127- </antcall>
128-
129- <antcall target="downloadfile">
130- <param name="sourcefile" value="${servletapi.loc}"/>
131- <param name="destfile" value="${servletapi.jar}"/>
132- <param name="destdir" value="${servletapi.home}"/>
133- </antcall>
134-
135- </target>
136-
137 <target name="extras-commons-logging"
138- depends="extras-commons-logging-prepare,compile,build-manifests"
139+ depends="extras-prepare,compile,build-manifests"
140 description="Build JULI for log4j extras package">
141
142- <gunzip src="${commons-logging-src.tar.gz}"
143- dest="${tomcat.extras}/logging/commons-logging-src.tar"/>
144- <untar src="${tomcat.extras}/logging/commons-logging-src.tar"
145- dest="${tomcat.extras}/logging/"/>
146-
147 <replace dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/src/java/org/apache/commons"
148 encoding="ISO-8859-1">
149 <replacefilter token="org.apache.commons"
be06817a 150@@ -1307,7 +1204,8 @@
bc0d3b1f
JR
151 file="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/build.xml" />
152
153 <copy todir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src">
154- <fileset file="${avalon-framework.jar}" />
155+ <fileset file="${avalon-framework-api.jar}" />
156+ <fileset file="${avalon-framework-impl.jar}" />
157 <fileset file="${log4j.jar}" />
158 <fileset file="${logkit.jar}" />
159 <fileset file="${servletapi.jar}" />
be06817a 160@@ -1387,18 +1285,6 @@
bc0d3b1f
JR
161 depends="extras-prepare"
162 description="Prepare to build web services extras package">
163
164- <antcall target="downloadfile">
165- <param name="sourcefile" value="${jaxrpc-lib.loc}"/>
166- <param name="destfile" value="${jaxrpc-lib.jar}"/>
167- <param name="destdir" value="${jaxrpc-lib.home}"/>
168- </antcall>
169-
170- <antcall target="downloadfile">
171- <param name="sourcefile" value="${wsdl4j-lib.loc}"/>
172- <param name="destfile" value="${wsdl4j-lib.jar}"/>
173- <param name="destdir" value="${wsdl4j-lib.home}"/>
174- </antcall>
175-
176 <copy file="${jaxrpc-lib.jar}"
177 tofile="${tomcat.extras}/webservices/jaxrpc.jar" />
178 <copy file="${wsdl4j-lib.jar}"
be06817a 179@@ -1505,7 +1391,7 @@
bc0d3b1f
JR
180
181 </target>
182
183- <target name="dist-prepare" depends="download-dist">
184+ <target name="dist-prepare">
185 <mkdir dir="${tomcat.dist}"/>
186 <mkdir dir="${tomcat.dist}/bin"/>
187 <mkdir dir="${tomcat.dist}/conf"/>
be06817a 188@@ -2297,290 +2183,6 @@
70d2c6e8 189 <delete file="webapps/docs/jdbc-pool.xml"/>
bc0d3b1f 190 </target>
e4d85efa 191
70d2c6e8 192-
bc0d3b1f
JR
193- <!-- ================ Download and dependency building =================== -->
194-
195- <target name="download-validate"
196- description="Download components necessary to validate source"
197- if="${execute.validate}">
198-
199- <antcall target="downloadzip">
200- <param name="sourcefile" value="${checkstyle.loc}"/>
201- <param name="destfile" value="${checkstyle.jar}"/>
202- <param name="destdir" value="${base.path}"/>
203- </antcall>
204-
205- </target>
206-
207- <target name="download-compile"
208- description="Download (and build) components necessary to compile" >
209-
210- <antcall target="downloadfile-2">
211- <param name="sourcefile.1" value="${tomcat-native.loc.1}"/>
212- <param name="sourcefile.2" value="${tomcat-native.loc.2}"/>
213- <param name="destfile" value="${tomcat-native.tar.gz}"/>
214- <param name="destdir" value="${tomcat-native.home}"/>
215- </antcall>
216-
217- <!-- Download Commons Daemon -->
218- <antcall target="downloadgz-2">
219- <param name="sourcefile.1" value="${commons-daemon.bin.loc.1}"/>
220- <param name="sourcefile.2" value="${commons-daemon.bin.loc.2}"/>
221- <param name="destfile" value="${commons-daemon.jar}"/>
222- </antcall>
223-
224- <antcall target="downloadfile-2">
225- <param name="sourcefile.1" value="${commons-daemon.native.src.loc.1}"/>
226- <param name="sourcefile.2" value="${commons-daemon.native.src.loc.2}"/>
227- <param name="destfile" value="${commons-daemon.native.src.tgz}"/>
228- <param name="destdir" value="${commons-daemon.home}"/>
229- </antcall>
230-
231- <!-- Download src and build Tomcat DBCP bundle -->
232- <antcall target="downloadgz-2">
233- <param name="sourcefile.1" value="${commons-pool-src.loc.1}"/>
234- <param name="sourcefile.2" value="${commons-pool-src.loc.2}"/>
235- <param name="destfile" value="${commons-pool.home}/build.xml" />
236- </antcall>
237- <antcall target="downloadgz-2">
238- <param name="sourcefile.1" value="${commons-dbcp-src.loc.1}"/>
239- <param name="sourcefile.2" value="${commons-dbcp-src.loc.2}"/>
240- <param name="destfile" value="${commons-dbcp.home}/build.xml" />
241- </antcall>
242- <mkdir dir="${tomcat-dbcp.home}"/>
70d2c6e8
SP
243- <!-- Rebuild dbcp only if built jars do not exist -->
244- <!-- or new versions of pool or dbcp have been downloaded. -->
bc0d3b1f
JR
245- <condition property="no.build.dbcp">
246- <and>
70d2c6e8
SP
247- <uptodate srcfile="${commons-pool.home}" targetfile="${tomcat-dbcp.jar}" />
248- <uptodate srcfile="${commons-pool.home}" targetfile="${tomcat-dbcp-src.jar}" />
249- <uptodate srcfile="${commons-dbcp.home}" targetfile="${tomcat-dbcp.jar}" />
250- <uptodate srcfile="${commons-dbcp.home}" targetfile="${tomcat-dbcp-src.jar}" />
bc0d3b1f
JR
251- </and>
252- </condition>
253- <antcall target="build-tomcat-dbcp" />
254-
255- <!-- Download JDT (Eclipse compiler) -->
256- <antcall target="downloadfile-2">
257- <param name="sourcefile.1" value="${jdt.loc.1}"/>
258- <param name="sourcefile.2" value="${jdt.loc.2}"/>
259- <param name="destfile" value="${jdt.jar}"/>
260- <param name="destdir" value="${jdt.home}"/>
261- </antcall>
262- </target>
263-
264- <target name="download-test-compile"
265- description="Download additional components for the tests" >
266-
267- <antcall target="downloadzip">
268- <param name="sourcefile" value="${junit.loc}"/>
269- <param name="destfile" value="${junit.jar}"/>
270- <param name="destdir" value="${base.path}"/>
271- </antcall>
272-
273- </target>
274-
275- <target name="download-dist"
276- description="Download additional components for a distribution" >
277-
d97a8c2e
SP
278- <antcall target="downloadzip-2">
279- <param name="sourcefile.1" value="${tomcat-native.win.1}"/>
280- <param name="sourcefile.2" value="${tomcat-native.win.2}"/>
281- <param name="destfile" value="${tomcat-native.home}/LICENSE"/>
bc0d3b1f
JR
282- <param name="destdir" value="${tomcat-native.home}"/>
283- </antcall>
284-
285- <antcall target="downloadzip-2">
286- <param name="sourcefile.1" value="${commons-daemon.native.win.loc.1}"/>
287- <param name="sourcefile.2" value="${commons-daemon.native.win.loc.2}"/>
288- <param name="destfile" value="${commons-daemon.native.win.mgr.exe}"/>
289- <param name="destdir" value="${commons-daemon.native.win.home}"/>
290- </antcall>
291-
292- <antcall target="downloadzip">
293- <param name="sourcefile" value="${nsis.loc}"/>
294- <param name="destfile" value="${nsis.exe}"/>
295- <param name="destdir" value="${nsis.home}/.."/>
296- </antcall>
297-
298- </target>
299-
300-
301- <!-- =============== Targets for dependencies that need to =============== -->
302- <!-- ================ be built rather than used directly ================ -->
303-
304- <target name="build-tomcat-dbcp" depends="build-manifests" unless="no.build.dbcp">
305- <copy todir="${tomcat-dbcp.home}">
306- <fileset dir="${commons-pool.home}">
307- <include name="**/*.java" />
308- <exclude name="**/test/**" />
309- </fileset>
310- <fileset dir="${commons-dbcp.home}">
311- <include name="**/*.java" />
312- <exclude name="**/test/**" />
313- <exclude name="**/managed/**" />
314- </fileset>
315- </copy>
316- <replace dir="${tomcat-dbcp.home}/src/java/org/apache/commons"
317- encoding="ISO-8859-1">
318- <replacefilter token="org.apache.commons"
319- value="org.apache.tomcat.dbcp" />
320- </replace>
321- <replace dir="${tomcat-dbcp.home}/src/java/org/apache/commons/pool/impl"
322- encoding="ISO-8859-1">
323- <replacefilter token="enum"
324- value="enumeration" />
325- </replace>
326-
327- <mkdir dir="${tomcat-dbcp.home}/src/java/org/apache/tomcat/dbcp" />
328- <move todir="${tomcat-dbcp.home}/src/java/org/apache/tomcat/dbcp">
329- <fileset dir="${tomcat-dbcp.home}/src/java/org/apache/commons" />
330- </move>
331- <mkdir dir="${tomcat-dbcp.home}/classes"/>
332- <javac destdir="${tomcat-dbcp.home}/classes"
333- optimize="off"
334- debug="${compile.debug}"
335- deprecation="${compile.deprecation}"
336- source="${compile.source}"
337- target="${compile.target}"
338- sourcepath="${tomcat-dbcp.home}/src/java"
339- srcdir="${tomcat-dbcp.home}/src/java"
340- encoding="ISO-8859-1"
341- includeantruntime="false">
342- <include name="**" />
343- </javac>
344- <jarIt jarfile="${tomcat-dbcp.jar}"
345- filesDir="${tomcat-dbcp.home}/classes"
346- filesId="files.tomcat-dbcp" />
347- <jarIt jarfile="${tomcat-dbcp-src.jar}"
348- filesDir="${tomcat-dbcp.home}/src/java"
349- filesId="files.tomcat-dbcp" />
350- </target>
351-
352- <!-- =============== Utility Targets to support downloads ================ -->
353-
354- <target name="proxyflags">
355- <!-- check proxy parameters. -->
356- <condition property="useproxy">
357- <equals arg1="${proxy.use}" arg2="on" />
358- </condition>
359- </target>
360-
361- <target name="setproxy" depends="proxyflags" if="useproxy">
362- <taskdef name="setproxy"
363- classname="org.apache.tools.ant.taskdefs.optional.net.SetProxy" />
364- <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"
365- proxyuser="${proxy.user}" proxypassword="${proxy.password}" />
366- <echo message="Using ${proxy.host}:${proxy.port} to download ${sourcefile}"/>
367- </target>
368-
369- <target name="testexist">
370- <echo message="Testing for ${destfile}"/>
371- <available file="${destfile}" property="exist"/>
372- </target>
373-
374- <target name="downloadgz" unless="exist" depends="setproxy,testexist">
375- <!-- Download and extract the package -->
376- <get src="${sourcefile}" dest="${base.path}/file.tar.gz" />
377- <gunzip src="${base.path}/file.tar.gz" dest="${base.path}/file.tar"/>
378- <untar src="${base.path}/file.tar" dest="${base.path}"/>
379- <delete file="${base.path}/file.tar"/>
380- <delete file="${base.path}/file.tar.gz"/>
381- </target>
382-
383- <target name="downloadgz-2" unless="exist" depends="setproxy,testexist">
384- <!-- Download and extract the package from the two alternative locations -->
385- <delete file="${base.path}/file.tar" quiet="true" />
386- <delete file="${base.path}/file.tar.gz" quiet="true" />
387- <antcall target="trydownload">
388- <param name="sourcefile" value="${sourcefile.1}" />
389- <param name="destfile" value="${base.path}/file.tar.gz" />
390- </antcall>
391- <antcall target="trydownload">
392- <param name="sourcefile" value="${sourcefile.2}" />
393- <param name="destfile" value="${base.path}/file.tar.gz" />
394- </antcall>
395- <gunzip src="${base.path}/file.tar.gz" dest="${base.path}/file.tar"/>
396- <untar src="${base.path}/file.tar" dest="${base.path}"/>
397- <delete file="${base.path}/file.tar"/>
398- <delete file="${base.path}/file.tar.gz"/>
399- </target>
400-
401- <target name="downloadzip" unless="exist" depends="setproxy,testexist">
402- <!-- Download and extract the package -->
403- <get src="${sourcefile}" dest="${base.path}/file.zip" />
404- <mkdir dir="${destdir}" />
405- <unzip src="${base.path}/file.zip" dest="${destdir}"/>
406- <delete file="${base.path}/file.zip"/>
407- </target>
408-
409- <target name="downloadzip-2" unless="exist" depends="testexist">
410- <!-- Download and extract the package from the two alternative locations -->
411- <delete file="${base.path}/file.zip" quiet="true" />
412- <antcall target="trydownload">
413- <param name="sourcefile" value="${sourcefile.1}" />
414- <param name="destfile" value="${base.path}/file.zip" />
415- </antcall>
416- <antcall target="trydownload">
417- <param name="sourcefile" value="${sourcefile.2}" />
418- <param name="destfile" value="${base.path}/file.zip" />
419- </antcall>
420- <mkdir dir="${destdir}" />
421- <unzip src="${base.path}/file.zip" dest="${destdir}"/>
422- <delete file="${base.path}/file.zip"/>
423- </target>
424-
425- <target name="downloadfile" unless="exist" depends="setproxy,testexist">
426- <!-- Download extract the file -->
427- <mkdir dir="${destdir}" />
428- <get src="${sourcefile}" dest="${destfile}" />
429- </target>
430-
431- <target name="downloadfile-2" unless="exist" depends="testexist">
432- <!-- Download the file from the two alternative locations -->
433- <mkdir dir="${destdir}" />
434-
435- <antcall target="trydownload">
436- <param name="sourcefile" value="${sourcefile.1}" />
437- </antcall>
438-
439- <antcall target="trydownload">
440- <param name="sourcefile" value="${sourcefile.2}" />
441- </antcall>
442-
443- <available file="${destfile}" property="exist"/>
444- <fail unless="exist" message="Failed to download [${destfile}]. All download sources are unavailable." />
445- </target>
446-
447- <target name="trydownload.check" depends="setproxy">
448- <condition property="trydownload.run">
449- <and>
450- <not>
451- <available file="${destfile}" />
452- </not>
453- <http url="${sourcefile}" />
454- </and>
455- </condition>
456- </target>
457-
458- <target name="trydownload" if="trydownload.run" depends="trydownload.check">
459- <!-- Downloads a file if not yet downloaded and the source URL is available -->
460- <get src="${sourcefile}" dest="${destfile}" />
461- </target>
462-
463- <!-- ============================ IDE Support ============================ -->
464-
465- <target name="ide-eclipse" depends="deploy, extras-webservices-prepare"
466- description="Prepares the source tree to be built in Eclipse">
467-
468- <!-- Copy the sample project files into the root directory -->
469- <copy file="${tomcat.home}/res/ide-support/eclipse/eclipse.project" tofile="${tomcat.home}/.project"/>
470- <copy file="${tomcat.home}/res/ide-support/eclipse/eclipse.classpath" tofile="${tomcat.home}/.classpath"/>
471-
472- <echo>Eclipse project files created.
473-Read the Building page on the Apache Tomcat documentation site for details on how to configure your Eclipse workplace.</echo>
474- </target>
475-
476 <!-- ======================= Macros, Taskdefs etc ======================== -->
477
478 <macrodef name="jarIt" description="utility macro for standard JAR packaging">
This page took 1.998535 seconds and 4 git commands to generate.