components/tomcat/patches/build.xml.patch
author Petr Sumbera <petr.sumbera@oracle.com>
Tue, 07 Apr 2015 05:51:44 -0700
changeset 4089 1788e52b3086
parent 1166 36691b5d318b
child 5535 ae5bc52953a4
permissions -rw-r--r--
20843475 Upgrade Apache Tomcat to version 6.0.43 20627132 problem in UTILITY/TOMCAT 19940080 problem in UTILITY/TOMCAT

Patch origin: in-house
Patch status: Solaris-specific; not suitable for upstream

Download/use only archives we really need.
Don't install unnecessary stuff.
Allow to build it with desired JDK version.

--- build.xml
+++ build.xml
@@ -492,13 +492,6 @@
 
   <target name="deploy" depends="build-only,build-docs,warn.dbcp">
 
-    <copy tofile="${tomcat.build}/bin/tomcat-native.tar.gz"
-            file="${tomcat-native.tar.gz}" />
-    <copy tofile="${tomcat.build}/bin/commons-daemon-native.tar.gz"
-            file="${commons-daemon.native.src.tgz}" />
-
-    <copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" />
-
     <!-- Copy scripts -->
     <copy todir="${tomcat.build}/bin">
       <fileset dir="bin">
@@ -780,41 +773,6 @@
           description="Download (and build as necessary) dependent components"
           depends="build-manifests">
 
-    <antcall target="downloadfile-2">
-      <param name="sourcefile.1" value="${tomcat-native.loc.1}"/>
-      <param name="sourcefile.2" value="${tomcat-native.loc.2}"/>
-      <param name="destfile" value="${tomcat-native.tar.gz}"/>
-      <param name="destdir" value="${tomcat-native.home}"/>
-    </antcall>
-
-    <antcall target="downloadzip-2">
-      <param name="sourcefile.1" value="${tomcat-native.win.1}"/>
-      <param name="sourcefile.2" value="${tomcat-native.win.2}"/>
-      <param name="destfile" value="${tomcat-native.home}/LICENSE"/>
-      <param name="destdir" value="${tomcat-native.home}"/>
-    </antcall>
-
-    <!-- Download Commons Daemon -->
-    <antcall target="downloadgz-2">
-      <param name="sourcefile.1" value="${commons-daemon.bin.loc.1}"/>
-      <param name="sourcefile.2" value="${commons-daemon.bin.loc.2}"/>
-      <param name="destfile" value="${commons-daemon.jar}"/>
-    </antcall>
-
-    <antcall target="downloadfile-2">
-      <param name="sourcefile.1" value="${commons-daemon.native.src.loc.1}"/>
-      <param name="sourcefile.2" value="${commons-daemon.native.src.loc.2}"/>
-      <param name="destfile" value="${commons-daemon.native.src.tgz}"/>
-      <param name="destdir" value="${commons-daemon.home}"/>
-    </antcall>
-
-    <antcall target="downloadzip-2">
-      <param name="sourcefile.1" value="${commons-daemon.native.win.loc.1}"/>
-      <param name="sourcefile.2" value="${commons-daemon.native.win.loc.2}"/>
-      <param name="destfile" value="${commons-daemon.native.win.mgr.exe}"/>
-      <param name="destdir" value="${commons-daemon.native.win.home}"/>
-    </antcall>
-
     <!-- Build Tomcat DBCP bundle -->
     <antcall target="downloadgz-2">
       <param name="sourcefile.1" value="${commons-pool-src.loc.1}"/>
@@ -826,6 +784,11 @@
       <param name="sourcefile.2" value="${commons-dbcp-src.loc.2}"/>
       <param name="destfile" value="${commons-dbcp.home}/build.xml" />
     </antcall>
+    <!-- We need to patch DBCP so it can be built with JDK 1.7. -->
+    <exec executable="sh">
+      <arg value="-c" />
+      <arg value="cat ../../jdbc41.patch | gpatch -d ${commons-dbcp.home} -p0" />
+    </exec>
     <mkdir dir="${tomcat-dbcp.home}"/>
     <antcall target="build-tomcat-dbcp" />
 
@@ -837,15 +800,9 @@
       <param name="destdir" value="${jdt.home}"/>
     </antcall>
 
-    <antcall target="downloadzip">
-      <param name="sourcefile" value="${nsis.loc}"/>
-      <param name="destfile" value="${nsis.exe}"/>
-      <param name="destdir" value="${nsis.home}/.."/>
-    </antcall>
-
   </target>
 
-  <target name="build-tomcat-dbcp" unless="jdk16.present"
+  <target name="build-tomcat-dbcp"
           depends="build-manifests">
     <copy todir="${tomcat-dbcp.home}">
       <fileset dir="${commons-pool.home}">