List:Commits« Previous MessageNext Message »
From:mmatthews Date:November 18 2007 9:21pm
Subject:Connector/J commit: r6672 - trunk
View as plain text  
Modified:
   trunk/build.xml
Log:
Check for JDK-1.4.2 or JDK5 in JAVA_HOME, and that the paths for Java6 (for JDBC-4.0 implementation) are present before attempting to compile.

Modified: trunk/build.xml
===================================================================
--- trunk/build.xml	2007-11-17 22:59:04 UTC (rev 6671)
+++ trunk/build.xml	2007-11-18 21:21:54 UTC (rev 6672)
@@ -1,6 +1,6 @@
 <?xml version='1.0'?>
 <!--
-   Copyright (C) 2002-2005 MySQL AB
+   Copyright (C) 2002-2007 MySQL AB
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of version 2 of the GNU General Public License as 
@@ -24,10 +24,10 @@
 <!-- version $Id$ -->
 
 <project name="MySQL Connector/J" default="dist" basedir=".">
-	<property name="major_version" value="5"/>
-	<property name="minor_version" value="1"/>
-	<property name="subminor_version" value="6"/>
-	<property name="version_status" value=""/>
+	<property name="major_version" value="6"/>
+	<property name="minor_version" value="0"/>
+	<property name="subminor_version" value="0"/>
+	<property name="version_status" value="-alpha"/>
 
 	<property name="version" value="${major_version}.${minor_version}.${subminor_version}${version_status}"/>
 	<property name="prodName" value="mysql-connector-java"/>
@@ -46,17 +46,14 @@
 	    <isset property="eclipse.pdebuild.home" />
 	 </condition>
 
-	<!-- Can't use compilers pre 1.4 or past Java-5 to compile this 
-	     version of the driver -->
-	
-	<condition property="compiler.bad">
-		<not>
-			<or>
-				<equals arg1="${ant.java.version}" arg2="1.4" />
-				<equals arg1="${ant.java.version}" arg2="1.5" />
-			</or>
-		</not>
-	</condition>
+	<!-- 
+			The following properties are needed for finding JDK6, set to the defaults
+			for my development environment, but can be passed on the command line
+			to ant via -D switches
+	-->
+		
+	<property name="com.mysql.jdbc.java6.javac" value="C:\jvms\jdk1.6.0\bin\javac.exe" />
+	<property name="com.mysql.jdbc.java6.rtjar" value="C:\jvms\jdk1.6.0\jre\lib\rt.jar" />
 				
 	<!-- 
 	     The following property is needed for building the docs. It's
@@ -65,16 +62,7 @@
 	-->
 
 	<property name="com.mysql.jdbc.docs.sourceDir" value="/home/mmatthew/work/docs/prebuilt"/>
-
-	<!-- 
-		The following properties are needed for finding JDK6, set to the defaults
-		for my development environment, but can be passed on the command line
-		to ant via -D switches
-	-->
 	
-	<property name="com.mysql.jdbc.java6.javac" value="C:\jvms\jdk1.6.0\bin\javac.exe" />
-	<property name="com.mysql.jdbc.java6.rtjar" value="C:\jvms\jdk1.6.0\jre\lib\rt.jar" />
-	
 	<taskdef resource="net/sf/antcontrib/antlib.xml">
 		<classpath>
 			<pathelement location="${sourceDir}/lib/ant-contrib.jar"/>
@@ -96,11 +84,34 @@
 
 		<pathelement location="${buildDir}/${fullProdName}" />
 	</path>
-
-	<target name="-compiler-check" if="compiler.bad">
-		<echo>This version of MySQL Connector/J requires a compiler from Java-1.4 or Java-1.5. Please set your JAVA_HOME property to point to one of these versions of the JDK.
-		</echo>
-		<fail/>
+		
+	<target name="-compiler-check">
+		<if>
+			<and>	
+				<not>
+					<or>
+						<equals arg1="${ant.java.version}" arg2="1.4" />
+						<equals arg1="${ant.java.version}" arg2="1.5" />
+					</or>
+				</not>	
+				<or>
+					<not>
+						<available file="${com.mysql.jdbc.java6.javac}" />
+					</not>
+					<not>
+						<available file="${com.mysql.jdbc.java6.rtjar}" />
+					</not>
+				</or>
+			</and>
+			<then>
+				<echo>This version of MySQL Connector/J requires a compiler from Java-1.4 or Java-1.5 to be used, set your JAVA_HOME property to point to one of these versions of the JDK.
+							
+Compiling this version also requires Java-6 for compiling the JDBC-4.0 implementation, please set the full path to the javac executable with the property &quot;com.mysql.jdbc.java6.javac&quot;
+and the full path to the rt.jar from Java-6 with the property &quot;com.mysql.jdbc.java6.rtjar&quot;.
+						</echo>
+						<fail/>
+			</then>
+		</if>	
 	</target>
 
 	<target name="init" depends="-compiler-check, -init-copy, -init-no-crypto">

Thread
Connector/J commit: r6672 - trunkmmatthews18 Nov