db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r727106 - in /db/derby/code/trunk: ./ java/client/ java/engine/ java/engine/org/apache/derby/ java/engine/org/apache/derby/iapi/jdbc/ java/engine/org/apache/derby/impl/jdbc/ java/engine/org/apache/derby/jdbc/ java/testing/org/apache/derbyTe...
Date Tue, 16 Dec 2008 18:24:51 GMT
Author: rhillegas
Date: Tue Dec 16 10:24:50 2008
New Revision: 727106

URL: http://svn.apache.org/viewvc?rev=727106&view=rev
Log:
DERBY-3988: Always build the JDBC4 driver, regardless of whether your compiler is Java 5 or
Java 6.

Modified:
    db/derby/code/trunk/build.xml
    db/derby/code/trunk/java/client/build.xml
    db/derby/code/trunk/java/engine/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/jdbc/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/modules.properties
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/build.xml

Modified: db/derby/code/trunk/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/build.xml?rev=727106&r1=727105&r2=727106&view=diff
==============================================================================
--- db/derby/code/trunk/build.xml (original)
+++ db/derby/code/trunk/build.xml Tue Dec 16 10:24:50 2008
@@ -104,6 +104,14 @@
     <echo file="${dummy.src}" message="public class z {}"/>
     <delete file="${dummy.class}"/>
 
+    <!--
+       Allow compilation of JDBC4 classes at 1.6 level if compiler supports it.
+       If we can find the following class, then we assume that the compiler
+       is at least Java 6 level.
+    -->
+    <available classname="java.sql.Wrapper" property="compilerLevel16" value="1.6"/>
+    <property name="compilerLevel16" value="1.5"/>
+
     <javac source="1.5" srcdir="${basedir}" failonerror="false">
       <include name="${dummy.src}"/>
     </javac>
@@ -204,6 +212,11 @@
     <property file="${properties.dir}/extrapath.properties"/>
 
     <!-- 
+            If a Java 6 JDK isn't present, then use the Java 5 environment to build the JDBC
4 support
+    -->
+    <property name="java16compile.classpath" value="${out.jdbc4.dir}:${java15compile.classpath}"/>
+
+    <!-- 
             If a 1.4 JDK is not present, then use the Java 5 environment to build the 1.4
support
     -->
     <property name="java14compile.classpath" value="${java15compile.classpath}:${xalan}:${serializer}"/>
@@ -238,12 +251,12 @@
 
   <target name="printCompilerProperties" if="printCompilerProperties">
 
+    <echo message="${checkEvent} compilerLevel16 = ${compilerLevel16}"/>
     <echo message="${checkEvent} jsr169compile.classpath = ${jsr169compile.classpath}"/>
     <echo message="${checkEvent} j14lib = ${j14lib}"/>
     <echo message="${checkEvent} java14compile.classpath = ${java14compile.classpath}"/>
     <echo message="${checkEvent} j15lib = ${j15lib}"/>
     <echo message="${checkEvent} java15compile.classpath = ${java15compile.classpath}"/>
-    <echo message="${checkEvent} jdk16 = ${jdk16}"/>
     <echo message="${checkEvent} java16compile.classpath = ${java16compile.classpath}"/>
 
   </target>

Modified: db/derby/code/trunk/java/client/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/build.xml?rev=727106&r1=727105&r2=727106&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/build.xml (original)
+++ db/derby/code/trunk/java/client/build.xml Tue Dec 16 10:24:50 2008
@@ -69,12 +69,10 @@
     </javac>
 </target>
 
-<target name="compile_jdbc4" if="jdk16">
+<target name="compile_jdbc4">
     <javac
-      source="1.6"
-      target="1.6"
-      fork="yes"
-      executable="${jdk16}/bin/javac"
+      source="${compilerLevel16}"
+      target="${compilerLevel16}"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"

Modified: db/derby/code/trunk/java/engine/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/build.xml?rev=727106&r1=727105&r2=727106&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/build.xml (original)
+++ db/derby/code/trunk/java/engine/build.xml Tue Dec 16 10:24:50 2008
@@ -50,7 +50,7 @@
 
 <!--             ============ Begin Targets ==============                -->
  
-  <target name="engine" depends="engine_j2se,engine_169,engine_169_opt,jdbc4_modules_edit"
+  <target name="engine" depends="engine_j2se,engine_169,engine_169_opt"
           description="Build Derby engine">
 	</target>
     <target name="engine_j2se" depends="engine_169"
@@ -112,13 +112,6 @@
 	  </condition>
 	</target> 
 
-	<target name="jdbc4_modules_edit" 
-                 if="jdk16">
-                <replaceregexp file="${out.dir}/${derby.dir}/modules.properties"
-                              match="^#jdbc4_optional_(.*)"
-                              replace="\1"
-                              byline="true" />
-        </target>
 
 <!--             ============= End Targets ==============                -->
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/build.xml?rev=727106&r1=727105&r2=727106&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/build.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/build.xml Tue Dec 16 10:24:50
2008
@@ -140,12 +140,10 @@
     </javac>
   </target>
 
-  <target name="compile_jdbc4" if="jdk16">
+  <target name="compile_jdbc4" >
       <javac
-          source="1.6"
-          target="1.6"
-          fork="yes"
-          executable="${jdk16}/bin/javac"
+          source="${compilerLevel16}"
+          target="${compilerLevel16}"
           bootclasspath="${empty}"
           nowarn="on"
           debug="${debug}"

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/build.xml?rev=727106&r1=727105&r2=727106&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/build.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/build.xml Tue Dec 16 10:24:50
2008
@@ -111,12 +111,10 @@
     </javac>
   </target>
 
-<target name="compile_jdbc4" depends="compile_jdbc3" if="jdk16">
+<target name="compile_jdbc4" depends="compile_jdbc3" >
     <javac
-      source="1.6"
-      target="1.6"
-        fork="yes"
-        executable="${jdk16}/bin/javac"
+      source="${compilerLevel16}"
+      target="${compilerLevel16}"
         bootclasspath="${empty}"
         nowarn="on"
         debug="${debug}"

Modified: db/derby/code/trunk/java/engine/org/apache/derby/jdbc/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/jdbc/build.xml?rev=727106&r1=727105&r2=727106&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/jdbc/build.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/jdbc/build.xml Tue Dec 16 10:24:50 2008
@@ -133,12 +133,10 @@
    </javac>  
   </target>
   
-  <target name="compile_jdbc4" if="jdk16">
+  <target name="compile_jdbc4" >
     <javac
-      source="1.6"
-      target="1.6"
-        fork="yes"
-        executable="${jdk16}/bin/javac"
+      source="${compilerLevel16}"
+      target="${compilerLevel16}"
         bootclasspath="${empty}"
         nowarn="on"
         debug="${debug}"

Modified: db/derby/code/trunk/java/engine/org/apache/derby/modules.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/modules.properties?rev=727106&r1=727105&r2=727106&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/modules.properties (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/modules.properties Tue Dec 16 10:24:50
2008
@@ -179,10 +179,10 @@
 
 # jdbc40 - requires JDK 1.6 (which is constant 7 in Derby)
 #
-#jdbc4_optional_derby.module.jdbcJ6=org.apache.derby.jdbc.Driver40
-#jdbc4_optional_derby.env.jdk.jdbcJ6=7
-#jdbc4_optional_derby.env.classes.jdbcJ6=java.sql.Driver
-#jdbc4_optional_cloudscape.config.jdbcJ6=derby
+derby.module.jdbcJ6=org.apache.derby.jdbc.Driver40
+derby.env.jdk.jdbcJ6=7
+derby.env.classes.jdbcJ6=java.sql.Driver
+cloudscape.config.jdbcJ6=derby
 
 # resourceAdapter - requires JDK 1.2, JTA classes and JDBC20X classes
 #

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/build.xml?rev=727106&r1=727105&r2=727106&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/build.xml
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/build.xml
Tue Dec 16 10:24:50 2008
@@ -46,12 +46,10 @@
     <property file="${user.home}/properties/derbytesting.properties"/>
     <property name="this.dir" value="${derby.testing.functest.dir}/tests/jdbc4"/>
 
-    <target name="compile_jdbc4" if="jdk16" depends="copyfiles">
+    <target name="compile_jdbc4" depends="copyfiles">
         <javac
-          source="1.6"
-          target="1.6"
-            fork="yes"
-            executable="${jdk16}/bin/javac"
+          source="${compilerLevel16}"
+          target="${compilerLevel16}"
             bootclasspath="${empty}"
             nowarn="on"
             debug="true"



Mime
View raw message