You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by da...@apache.org on 2006/02/08 00:46:10 UTC

svn commit: r375777 - in /db/derby/code/trunk: ./ java/client/ java/engine/org/apache/derby/iapi/jdbc/ java/engine/org/apache/derby/impl/jdbc/ java/engine/org/apache/derby/jdbc/ java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/

Author: davidvc
Date: Tue Feb  7 15:46:07 2006
New Revision: 375777

URL: http://svn.apache.org/viewcvs?rev=375777&view=rev
Log:
DERBY-932 - Fixed the way JDK 1.6 files are built so we don't use <exec>
but <javac> with fork="yes".  

Also updated BUILDING.txt to include instructions on how to build with
JDK 1.6

Modified:
    db/derby/code/trunk/BUILDING.txt
    db/derby/code/trunk/build.xml
    db/derby/code/trunk/java/client/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/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/build.xml

Modified: db/derby/code/trunk/BUILDING.txt
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/BUILDING.txt?rev=375777&r1=375776&r2=375777&view=diff
==============================================================================
--- db/derby/code/trunk/BUILDING.txt (original)
+++ db/derby/code/trunk/BUILDING.txt Tue Feb  7 15:46:07 2006
@@ -163,8 +163,26 @@
     referred to as ${jdk13.dir} in the rest of this document.
 
 
+2.2.4 Optional - Download and install Java Development Kit (JDK) 
+  release 1.6.x
 
-2.2.4 Download extensions for Java Development Kit release 1.3.x
+Skip steps 1-2 of this section if you already have JDK 1.6.x 
+installed on your system.
+
+(1) Download JDK 1.6 (aka "Mustang")
+    This is currently under development, and is available as a
+    release candidate at http://download.java.net/jdk6/binaries/
+  
+
+(2) Install JDK 1.6 according to the instructions in any directory. 
+
+    Verify that bin/javac(.exe) exists under the JDK install directory.
+
+(3) The directory where you have installed JDK 1.6 will be 
+    referred to as ${jdk16.dir} in the rest of this document.
+
+
+2.2.5 Download extensions for Java Development Kit release 1.3.x
 
 (1) JDBC 2.0
 
@@ -191,7 +209,7 @@
 
 
 
-2.2.5 Download and install JUnit 3.8.*
+2.2.6 Download and install JUnit 3.8.*
 
 (1) JUnit is needed for some of Derby's tests. Download a JUnit 3.8.*
     zip file from www.junit.org.
@@ -204,7 +222,8 @@
 (2) Unzip the JUnit zip file and place junit.jar from the zip file into
     ${derby.source}/tools/java.
 
-2.2.6 Download OSGi Service Platform release 3 (osgi.jar) (Optional)
+
+2.2.7 Download OSGi Service Platform release 3 (osgi.jar) (Optional)
 
 This is an optional section.
 The reason is that osgi.jar is required to only build the 
@@ -238,7 +257,7 @@
 ${derby.source}/tools/java/osgi.jar
 
 
-2.2.7 Download and Install Jikes 1.14 (Optional)
+2.2.8 Download and Install Jikes 1.14 (Optional)
 
 This is an optional section.
 
@@ -254,7 +273,7 @@
 referred to as the ${jikes.dir} directory in the rest of this 
 document. 
 
-2.2.8 Download J2ME/CDC/Foundation and JSR 169 jars
+2.2.9 Download J2ME/CDC/Foundation and JSR 169 jars
 
 This is an optional section.
 
@@ -378,6 +397,21 @@
       where ${jdk13.dir} is the directory name where you have 
       installed JDK 1.3.x. Check out section 2.2.3 of this document.
 
+    - Optional - jdk16
+
+      This specifies the location of your JDK 1.6 install directory.
+      This is only needed if you want to build the JDK 1.6-specific
+      code (e.g. JDBC 4 classes)
+
+    - Optional - jdk16.javac
+
+      This is the full path to the JDK 1.6 javac executable.  JDK 1.6
+      features are built by "forking" off a separate javac task, and
+      Ant requires you to specify a full path to the compiler executable.
+      This can not be determined from the $jdk16 proerty because of the
+      platform-specific extension on executables (e.g. ".exe" on Windows
+      platforms).
+
     - java14compile.classpath - IBM JVMs only
 
       IBM Java SDKs may be used in place of Sun's, but IBM packages
@@ -454,6 +488,14 @@
     framework and related files, run the following command:
 
     >ant testing
+
+    NOTE ABOUT building JDBC4/JDK1.6 : The JDBC4 class files have
+    dependencies on JDK 1.6.  However, to build for JDBC4, do NOT
+    set your JAVA_HOME to the JDK 1.6 location.  Instead, set it
+    to your standard JDK 1.4 or JDK 1.3 location.  In your ant.properties,
+    make sure you set jdk16 and jdk16.javac as described in section
+    2.2.4, and that is all you need to do.
+
 
 (3) Run the following command to build all jars:
     

Modified: db/derby/code/trunk/build.xml
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/build.xml?rev=375777&r1=375776&r2=375777&view=diff
==============================================================================
--- db/derby/code/trunk/build.xml (original)
+++ db/derby/code/trunk/build.xml Tue Feb  7 15:46:07 2006
@@ -286,20 +286,6 @@
     <antcall target="build"/>
     <ant dir="${derby.engine.dir}/loc"/>
     <antcall target="class_size_catalog"/>
-    <antcall target="compile_jdbc4_target">
-                         <param name="coj.buildscript" value="${derby.engine.dir}/impl/jdbc/build.xml"/>
-                         <param name="coj.target" value="compile_jdbc4"/>
-                  </antcall>
-
-                  <antcall target="compile_jdbc4_target">
-                         <param name="coj.buildscript" value="${derby.engine.dir}/iapi/jdbc/build.xml"/>
-                         <param name="coj.target" value="compile_jdbc4"/>
-                  </antcall>
-
-                  <antcall target="compile_jdbc4_target">
-                         <param name="coj.buildscript" value="${derby.engine.dir}/jdbc/build.xml"/>
-                         <param name="coj.target" value="compile_jdbc4"/>
-                  </antcall>
   </target>
 	 <target name="engine_169_opt" depends="engine">
 	 	  <ant dir="${derby.engine.src.dir}" target="engine_169_opt"/>
@@ -319,10 +305,6 @@
 
   <target name="client" depends="engine,shared">
     <ant dir="${derby.client.src.dir}"/>
-    <antcall target="compile_jdbc4_target">
-    	                 <param name="coj.buildscript" value="${derby.client.src.dir}/build.xml"/>
-                         <param name="coj.target" value="compile_jdbc4"/>
-    </antcall>
   </target>
 
   <target name="build">
@@ -335,10 +317,6 @@
 
   <target name="testing" depends="demo">
     <ant dir="${derby.testing.src.dir}"/>
-    <antcall target="compile_jdbc4_target">
-          <param name="coj.buildscript" value="${derby.testing.src.dir}/${derby.testing.functest.dir}/tests/jdbc4/build.xml"/>
-          <param name="coj.target" value="compile_jdbc4"/>
-    </antcall>
   </target>
 
 <!-- ==================================================================== -->
@@ -1371,27 +1349,4 @@
     <echo message=""/>
     <fail message="Exiting snapshot build..."/>
   </target>
-
-  <target name="compile_jdbc4_target" description="Build the JDBC4.0 elements of the derby engine" if="jdk16">
-	<!-- The optional compilation target of the jdbc4 classes begins here -->
-	<!-- Contains the ant-spawing logic -->
-	<property environment="env"/>
-
-	<condition property="antExecutable" value="ant.bat">
-		<os family="windows"/>
-	</condition>
-	<property name="antExecutable" value="ant"/>
-
-	<exec executable="${env.ANT_HOME}/bin/${antExecutable}" outputproperty="jdbc4.output">
-        	<env key="JAVA_HOME" value="${jdk16}"/>
-		<arg value="-quiet"/>
-		<arg value="-f"/>
-		<arg path="${coj.buildscript}"/>
-		<arg value="${coj.target}"/>
-	</exec>
-
-	<echo message="${jdbc4.output}"/>
-  </target>
-
-
 </project>

Modified: db/derby/code/trunk/java/client/build.xml
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/client/build.xml?rev=375777&r1=375776&r2=375777&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/build.xml (original)
+++ db/derby/code/trunk/java/client/build.xml Tue Feb  7 15:46:07 2006
@@ -52,8 +52,10 @@
     </javac>
 </target>
 
-<target name="compile_jdbc4">
+<target name="compile_jdbc4" if="jdk16">
     <javac
+      fork="yes"
+      executable="${jdk16.javac}"
       bootclasspath="${empty}"
       nowarn="on"
       debug="${debug}"
@@ -75,6 +77,6 @@
 
   
 <!-- default target  -->
-  <target name="client" depends="compile"/>
+  <target name="client" depends="compile, compile_jdbc4"/>
 </project>
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/build.xml
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/build.xml?rev=375777&r1=375776&r2=375777&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 Feb  7 15:46:07 2006
@@ -116,8 +116,10 @@
     </javac>
   </target>
 
-  <target name="compile_jdbc4">
+  <target name="compile_jdbc4" if="jdk16">
       <javac
+          fork="yes"
+          executable="${jdk16.javac}"
           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/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/build.xml?rev=375777&r1=375776&r2=375777&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 Feb  7 15:46:07 2006
@@ -18,7 +18,7 @@
 
 <!-- Targets -->
 
-  <target name="compile" depends="compile_jdbc3"/>
+  <target name="compile" depends="compile_jdbc3, compile_jdbc4"/>
 
   <target name="compile_jsr169">
 	    <javac
@@ -136,8 +136,10 @@
     </javac>
   </target>
 
-<target name="compile_jdbc4">
+<target name="compile_jdbc4" if="jdk16">
     <javac
+        fork="yes"
+        executable="${jdk16.javac}"
         bootclasspath="${empty}"
         nowarn="on"
         debug="${debug}"

Modified: db/derby/code/trunk/java/engine/org/apache/derby/jdbc/build.xml
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/jdbc/build.xml?rev=375777&r1=375776&r2=375777&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 Feb  7 15:46:07 2006
@@ -17,7 +17,7 @@
   <property file="${properties.dir}/compilepath.properties"/>
 
 <!-- Targets -->
-  <target name="jdbc" depends="compile_jdbc2,compile_jdbc3"/>
+  <target name="jdbc" depends="compile_jdbc2,compile_jdbc3,compile_jdbc4"/>
 
 <!-- build targets which need jdbc2.0 libs in the end-->
 <!-- first build all non-special (non jdbc2.0) targets-->
@@ -146,8 +146,10 @@
    </javac>  
   </target>
   
-  <target name="compile_jdbc4">
+  <target name="compile_jdbc4" if="jdk16">
     <javac
+        fork="yes"
+        executable="${jdk16.javac}"
         bootclasspath="${empty}"
         nowarn="on"
         debug="${debug}"

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/build.xml
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/build.xml?rev=375777&r1=375776&r2=375777&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 Feb  7 15:46:07 2006
@@ -32,6 +32,8 @@
 
     <target name="compile_jdbc4" if="jdk16" depends="copyfiles">
         <javac
+            fork="yes"
+            executable="${jdk16.javac}"
             bootclasspath="${empty}"
             nowarn="on"
             debug="${debug}"