components/tomcat/patches/build.xml.patch
author Petr Sumbera <petr.sumbera@oracle.com>
Thu, 25 Feb 2016 01:05:50 -0800
branchs11u3-sru
changeset 5535 ae5bc52953a4
parent 4134 b1148b9ffd9b
child 7317 bd14d5a59818
permissions -rw-r--r--
22817809 Upgrade Apache Tomcat to version 8.0.32 22824943 Upgrade Apache Tomcat to version 6.0.45 22817436 problem in UTILITY/TOMCAT 22817540 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
@@ -515,13 +515,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">
@@ -956,42 +949,6 @@
           description="Download (and build as necessary) dependent components"
           depends="build-manifests">
 
-    <!-- Download Apache Tomcat Native -->
-    <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 Apache 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}"/>
@@ -1003,6 +960,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" />
 
@@ -1014,29 +976,9 @@
       <param name="destdir" value="${jdt.home}"/>
     </antcall>
 
-    <!-- Download NSIS (Nullsoft Scriptable Install System) -->
-    <antcall target="downloadzip">
-      <param name="sourcefile" value="${nsis.loc}"/>
-      <param name="destfile" value="${nsis.exe}"/>
-      <param name="destdir" value="${nsis.home}/.."/>
-    </antcall>
-
-    <!-- Libraries used for testing. JUnit, Hamcrest -->
-    <antcall target="downloadfile">
-      <param name="sourcefile" value="${junit.loc}"/>
-      <param name="destfile" value="${junit.jar}"/>
-      <param name="destdir" value="${junit.home}"/>
-    </antcall>
-
-    <antcall target="downloadfile">
-      <param name="sourcefile" value="${hamcrest.loc}"/>
-      <param name="destfile" value="${hamcrest.jar}"/>
-      <param name="destdir" value="${hamcrest.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}">