Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > 1620669b48cea39d36979ffe883780dd > files > 2

mysql-connector-java-5.1.42-1.mga5.src.rpm

diff -Nru mysql-connector-j-5.1.42/build.xml mysql-connector-j-5.1.42.build/build.xml
--- mysql-connector-j-5.1.42/build.xml	2017-04-13 17:17:38.000000000 +0200
+++ mysql-connector-j-5.1.42.build/build.xml	2017-10-07 20:00:32.165881125 +0200
@@ -187,7 +187,6 @@
     </condition>
 
     <!-- The following properties are needed for finding JDK5 and JDK8 needed for compile and can be passed on the command line to ant via -D switches. -->
-    <property name="com.mysql.jdbc.jdk5" value="/usr/lib/jvm/jdk1.5" />
     <property name="com.mysql.jdbc.jdk8" value="/usr/lib/jvm/jdk1.8" />
 
     <!-- The following property allows to point the location of third-party libraries we don't distribute. Default value points to src/lib so user could either
@@ -195,7 +194,7 @@
     <property name="com.mysql.jdbc.extra.libs" value="${sourceDir}/lib" />
 
     <!-- The following property is needed for finding a JVM to execute the tests and can be passed on the command line to ant via -D switch. -->
-    <property name="com.mysql.jdbc.testsuite.jvm" value="${com.mysql.jdbc.jdk5}" />
+    <property name="com.mysql.jdbc.testsuite.jvm" value="${com.mysql.jdbc.jdk6}" />
 
     <!-- The following property is needed for building the docs and must be passed on the command line to ant via -D switch. -->
     <property name="com.mysql.jdbc.docs.sourceDir" value="/tmp/connectorj/docs/prebuilt" />
@@ -218,8 +217,14 @@
     </path>
 
     <path id="project.build.classpath">
-        <fileset dir="${com.mysql.jdbc.extra.libs}">
-            <include name="**/*.jar" />
+        <fileset dir="/usr/share/java">
+            <include name="hamcrest/all.jar" />
+            <include name="junit.jar" />
+            <include name="commons-logging.jar" />
+            <include name="slf4j/api.jar" />
+            <include name="jta.jar" />
+            <include name="c3p0/c3p0.jar" />
+            <include name="hibernate4/hibernate-core.jar" />
         </fileset>
 
         <fileset dir="${buildDir}/${fullProdName}/lib">
@@ -244,10 +249,10 @@
                 </not>
             </condition>
         </fail>
-        <fail message="Hibernate libraries, required for build tasks, must be in the directory '${com.mysql.jdbc.extra.libs}/hibernate4'.">
+        <fail message="Hibernate libraries, required for build tasks, must be in the directory '${com.mysql.jdbc.extra.libs}/hibernate4'.">
             <condition>
                 <not>
-                    <available file="${com.mysql.jdbc.extra.libs}/hibernate4" type="dir" />
+                    <available file="${com.mysql.jdbc.extra.libs}/hibernate4" type="dir" />
                 </not>
             </condition>
         </fail>
@@ -255,34 +260,7 @@
 
 
     <!-- Check for required JDKs for compilation. -->
-    <target name="-compiler-check" depends="-jdk5-check, -jdk8-check, -jre6-rtjar-check" />
-
-
-    <!-- Check for required JDK5 for compilation of JDBC 3 implementation. -->
-    <target name="-jdk5-check">
-        <property name="com.mysql.jdbc.jdk5.java" value="${com.mysql.jdbc.jdk5}/bin/java" />
-        <property name="com.mysql.jdbc.jdk5.javac" value="${com.mysql.jdbc.jdk5}/bin/javac" />
-
-        <local name="com.mysql.jdbc.jdk5.version" />
-        <exec executable="${com.mysql.jdbc.jdk5.java}"
-              outputproperty="com.mysql.jdbc.jdk5.version"
-              failonerror="false"
-              failifexecutionfails="false"
-              resultproperty="jdk5checkexitstatus">
-            <arg value="-version" />
-        </exec>
-
-        <fail message="Java 5 is required. Set the full path to this JDK home with the property 'com.mysql.jdbc.jdk5'. Default: '/usr/lib/jvm/jdk1.5').
-Java 8 (for JDBC 4+ implementation) is also required. Set the full path to this JDK home with the property 'com.mysql.jdbc.jdk8'. Default: '/usr/lib/jvm/jdk1.8'.">
-            <condition>
-                <not>
-                    <and>
-                        <equals arg1="${jdk5checkexitstatus}" arg2="0" />
-                        <contains string="${com.mysql.jdbc.jdk5.version}" substring="java version &quot;1.5" casesensitive="true" />
-                    </and>
-                </not>
-            </condition>
-        </fail>
+    <target name="-compiler-check" depends="-jdk8-check, -jre6-rtjar-check">
     </target>
 
 
@@ -300,13 +278,10 @@
             <arg value="-version" />
         </exec>
 
-        <fail message="Java 8 (for JDBC 4+ implementation) is required. Set the full path to this JDK home with the property 'com.mysql.jdbc.jdk8'. Default: '/usr/lib/jvm/jdk1.8'.">
+        <fail message="Java 8 (for JDBC 4+ implementation) is required. Set the full path to this JDK home with the property 'com.mysql.jdbc.jdk8'. Default: '${com.mysql.jdbc.jdk8}'.">
             <condition>
                 <not>
-                    <and>
-                        <equals arg1="${jdk8checkexitstatus}" arg2="0" />
-                        <contains string="${com.mysql.jdbc.jdk8.version}" substring="java version &quot;1.8" casesensitive="true" />
-                    </and>
+                    <equals arg1="${jdk8checkexitstatus}" arg2="0" />
                 </not>
             </condition>
         </fail>
@@ -841,40 +816,10 @@
     <!-- Compile the driver including JDBC 3 and JDBC 4+ implementations only. -->
     <target name="compile-driver"
             description="Compiles driver including JDBC 3 and JDBC 4+ implementations only."
-            depends="-compile-driver-jdbc3, -compile-driver-jdbc4" />
-
-
-    <!-- Compile JDBC 3 implementation. -->
-    <target name="-compile-driver-jdbc3" depends="init, -clean-output">
-        <echo>Compiling MySQL Connector/J JDBC 3 implementation with '${com.mysql.jdbc.jdk5}' to '${compiler.output}'</echo>
-
-        <javac sourcepath=""
-               srcdir="${buildDir}/${fullProdName}"
-               destdir="${compiler.output}"
-               deprecation="off"
-               debug="${debug.enable}"
-               fork="yes"
-               executable="${com.mysql.jdbc.jdk5.javac}"
-               compiler="modern"
-               includeantruntime="false"
-               source="1.5"
-               target="1.5">
-            <include name="**/*.java" />
-            <exclude name="testsuite/**" />
-            <exclude name="com/mysql/jdbc/integration/**" />
-            <exclude name="com/mysql/jdbc/log/Log4JLogger.java" />
-            <exclude name="**/JDBC4*.java" />
-            <exclude name="**/FabricMultiTenantConnectionProvider.java" />
-            <exclude name="**/HibernateFabric.java" />
-            <exclude name="com/mysql/jdbc/exceptions/jdbc4/*" />
-            <classpath refid="project.build.classpath" />
-            <compilerarg line="${javac.compilerarg}" />
-        </javac>
-    </target>
-
+            depends="-compile-driver-jdbc4" />
 
     <!-- Compile JDBC 4+ implementation. -->
-    <target name="-compile-driver-jdbc4" depends="-compile-driver-jdbc3">
+    <target name="-compile-driver-jdbc4">
         <echo>Compiling MySQL Connector/J JDBC 4+ implementation with '${com.mysql.jdbc.jdk8}' to '${compiler.output}'</echo>
 
         <javac sourcepath=""
@@ -920,7 +865,7 @@
     <target name="compile-testsuite"
             description="Compiles driver including JDBC 3 and JDBC 4+ implementations and JUnit test suite."
             depends="init, compile-driver">
-        <echo>Compiling MySQL Connector/J testsuite with '${com.mysql.jdbc.jdk5}' to '${compiler.output}'</echo>
+        <echo>Compiling MySQL Connector/J testsuite with '${com.mysql.jdbc.jdk8}' to '${compiler.output}'</echo>
 
         <javac sourcepath=""
                srcdir="${buildDir}/${fullProdName}"
@@ -928,11 +873,11 @@
                deprecation="off"
                debug="${debug.enable}"
                fork="yes"
-               executable="${com.mysql.jdbc.jdk5.javac}"
+               executable="${com.mysql.jdbc.jdk8.javac}"
                compiler="modern"
                includeantruntime="false"
-               source="1.5"
-               target="1.5">
+               source="1.6"
+               target="1.6">
             <include name="testsuite/**" />
             <exclude name="testsuite/requiresNonRedists/**" />
             <exclude name="testsuite/**/jdbc4*/**" />
@@ -983,7 +928,7 @@
 
     <!-- Compile c3p0 integration. -->
     <target name="-compile-integration-c3p0" depends="compile-driver" if="com.mysql.jdbc.c3p0Present">
-        <echo>Compiling MySQL Connector/J-c3p0 integration with '${com.mysql.jdbc.jdk5}' to '${compiler.output}'</echo>
+        <echo>Compiling MySQL Connector/J-c3p0 integration with '${com.mysql.jdbc.jdk8}' to '${compiler.output}'</echo>
 
         <javac sourcepath=""
                srcdir="${buildDir}/${fullProdName}"
@@ -991,11 +936,11 @@
                deprecation="off"
                debug="${debug.enable}"
                fork="yes"
-               executable="${com.mysql.jdbc.jdk5.javac}"
+               executable="${com.mysql.jdbc.jdk8.javac}"
                compiler="modern"
                includeantruntime="false"
-               source="1.5"
-               target="1.5">
+               source="1.6"
+               target="1.6">
             <include name="com/mysql/jdbc/integration/c3p0/**" />
             <classpath refid="project.build.classpath" />
         </javac>
@@ -1004,7 +949,7 @@
 
     <!-- Compile jBoss integration. -->
     <target name="-compile-integration-jboss" depends="compile-driver" if="com.mysql.jdbc.jbossPresent">
-        <echo>Compiling MySQL Connector/J-jboss integration with '${com.mysql.jdbc.jdk5}' to '${compiler.output}'</echo>
+        <echo>Compiling MySQL Connector/J-jboss integration with '${com.mysql.jdbc.jdk8}' to '${compiler.output}'</echo>
 
         <javac sourcepath=""
                srcdir="${buildDir}/${fullProdName}"
@@ -1012,11 +957,11 @@
                deprecation="off"
                debug="${debug.enable}"
                fork="yes"
-               executable="${com.mysql.jdbc.jdk5.javac}"
+               executable="${com.mysql.jdbc.jdk8.javac}"
                compiler="modern"
                includeantruntime="false"
-               source="1.5"
-               target="1.5">
+               source="1.6"
+               target="1.6">
             <include name="com/mysql/jdbc/integration/jboss/**" />
             <classpath refid="project.build.classpath" />
         </javac>
@@ -1025,7 +970,7 @@
 
     <!-- Compile Log4j integration. -->
     <target name="-compile-integration-log4j" depends="compile-driver" if="com.mysql.jdbc.log4jPresent">
-        <echo>Compiling MySQL Connector/J-log4j integration with '${com.mysql.jdbc.jdk5}' to '${compiler.output}'</echo>
+        <echo>Compiling MySQL Connector/J-log4j integration with '${com.mysql.jdbc.jdk8}' to '${compiler.output}'</echo>
 
         <javac sourcepath=""
                srcdir="${buildDir}/${fullProdName}"
@@ -1033,11 +978,11 @@
                deprecation="off"
                debug="${debug.enable}"
                fork="yes"
-               executable="${com.mysql.jdbc.jdk5.javac}"
+               executable="${com.mysql.jdbc.jdk8.javac}"
                compiler="modern"
                includeantruntime="false"
-               source="1.5"
-               target="1.5">
+               source="1.6"
+               target="1.6">
             <include name="com/mysql/jdbc/log/Log4JLogger.java" />
             <classpath refid="project.build.classpath" />
         </javac>