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