]> git.pld-linux.org Git - packages/tomcat.git/blob - tomcat-build.xml.patch
- updated for 7.0.28
[packages/tomcat.git] / tomcat-build.xml.patch
1 --- apache-tomcat-7.0.28-src/build.xml  2012-06-15 09:56:41.000000000 +0200
2 +++ apache-tomcat-7.0.28-src.new/build.xml      2012-06-20 16:14:52.482244047 +0200
3 @@ -438,60 +438,6 @@
4      
5    </target>
6  
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">
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" />
29 -        <exclude name="java/org/apache/el/parser/Node.java" />
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" />
35 -        <!-- Exclude these else Gump runs validate on them -->
36 -        <exclude name="**/org/apache/tomcat/dbcp/**"/>
37 -        <exclude name="**/tomcat-deps/**"/>
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"/>
41 -      </fileset>
42 -      <fileset dir="modules/jdbc-pool" >
43 -        <exclude name=".*/**"/>
44 -        <patternset refid="text.files" />
45 -      </fileset>
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 -
61    <target name="validate-eoln" depends="build-prepare,compile-prepare"
62      description="Validate that the source files have correct line ends">
63  
64 @@ -551,7 +497,7 @@
65      </copy>
66    </target>
67  
68 -  <target name="compile" depends="build-prepare,download-compile,compile-prepare,validate">
69 +  <target name="compile" depends="build-prepare">
70      <!-- Compile internal server components -->
71      <javac srcdir="java" destdir="${tomcat.classes}"
72             debug="${compile.debug}"
73 @@ -834,13 +780,6 @@
74    <target name="deploy" depends="package,build-docs"
75            description="Default. Builds a working Tomcat instance">
76  
77 -    <copy tofile="${tomcat.build}/bin/tomcat-native.tar.gz"
78 -            file="${tomcat-native.tar.gz}" />
79 -    <copy tofile="${tomcat.build}/bin/commons-daemon-native.tar.gz"
80 -            file="${commons-daemon.native.src.tgz}" />
81 -
82 -    <copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" />
83 -
84      <!-- Copy scripts -->
85      <copy todir="${tomcat.build}/bin">
86        <fileset dir="bin">
87 @@ -1105,7 +1044,7 @@
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}"
96 @@ -1210,52 +1149,10 @@
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"
150 @@ -1277,7 +1174,8 @@
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}" />
160 @@ -1357,18 +1255,6 @@
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}"
179 @@ -1475,7 +1361,7 @@
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"/>
188 @@ -2261,291 +2147,7 @@
189      <!-- remove jdbc-pool documentation -->
190      <delete file="webapps/docs/jdbc-pool.xml"/>
191    </target>
192 -
193 -    
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}"/>
244 -    <!-- Rebuild dbcp only if built jars do not exist -->
245 -    <!-- or new versions of pool or dbcp have been downloaded. -->
246 -    <condition property="no.build.dbcp">
247 -      <and>
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}" />
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 -
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"/>
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
478    <!-- ======================= Macros, Taskdefs etc ======================== -->
479  
480    <macrodef name="jarIt" description="utility macro for standard JAR packaging">
This page took 1.778023 seconds and 4 git commands to generate.