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 dj...@apache.org on 2005/06/07 19:16:02 UTC

svn commit: r188823 - in /incubator/derby/code/trunk: BUILDING.txt java/engine/build.xml java/engine/org/apache/derby/modules.properties

Author: djd
Date: Tue Jun  7 10:16:01 2005
New Revision: 188823

URL: http://svn.apache.org/viewcvs?rev=188823&view=rev
Log:
Add automatic build of J2ME/JSR169 optional targets if
jsr169compile.classpath is set.
Include instructions on this in BUILDING.txt

Modified:
    incubator/derby/code/trunk/BUILDING.txt
    incubator/derby/code/trunk/java/engine/build.xml
    incubator/derby/code/trunk/java/engine/org/apache/derby/modules.properties

Modified: incubator/derby/code/trunk/BUILDING.txt
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/BUILDING.txt?rev=188823&r1=188822&r2=188823&view=diff
==============================================================================
--- incubator/derby/code/trunk/BUILDING.txt (original)
+++ incubator/derby/code/trunk/BUILDING.txt Tue Jun  7 10:16:01 2005
@@ -17,6 +17,7 @@
 2.2.4 Download extensions for Java Development Kit release 1.3.x
 2.2.5 Download OSGi Service Platform release 3 (osgi.jar) (Optional)
 2.2.6 Download Jikes 1.14 (Optional)
+2.2.7 Download J2ME/CDC/FOundation 1.0 and JSR169 jars (Optional)
 
 3     Build instructions
 3.1   Set required environmental variables
@@ -240,6 +241,23 @@
 referred to as the ${jikes.dir} directory in the rest of this 
 document. 
 
+2.2.7 Download J2ME/CDC/Foundation and JSR 169 jars
+
+This is an optional section.
+
+Derby's embeded engine supports J2ME/CDC/Foundation 1.0 using the JDBC
+sub-set defined in JSR 169. In order to build Derby to
+support this platform, jars are needed for the Foundation 1.0
+profile and the JSR169 JDBC subset. There is no standard place
+for these jars yet, possible downloads are:
+
+java.sun.com/j2me
+IBM's WCTME 5.7
+
+Once you have obtained these jars and set the jsr169compile.classpath
+(see section 3.2) the regulat Derby builds will include the JSR169 code
+for the embedded engine. The resulting jar file (derby.jar) can be used
+on J2ME, or J2SE, write once run anywhere.
 
 
 ---------------------------------------------------------------
@@ -274,7 +292,6 @@
      set JAVA_HOME=${jdk14.dir}    -- On Windows
 
 
-
 3.2   Create property file
 
 You will need to create a property file to specify
@@ -364,6 +381,17 @@
 
       Typically applications embedding Derby would use jar files 
       built with sane=false.
+
+    - Optional - jsr169compile.classpath
+
+      If you downloaded the J2ME jar files (section 2.2.7) then
+      setting this property will enable the optional JSR169 targets
+      for the top-level default, engine or all targets.
+      The compile classpath needs to include the Foundation 1.0
+      and JSR169 environments, see any documentation for your
+      source of J2ME libraries. Here is an example foe IBM's WCTME 5.7
+ 
+      jsr169compile.classpath=C:/wctme5.7/ive/lib/jclFoundation10/classes.zip;C:/wctme5.7/ive/lib/jdbc.jar
 
 3.3   Run Derby build
 

Modified: incubator/derby/code/trunk/java/engine/build.xml
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/build.xml?rev=188823&r1=188822&r2=188823&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/engine/build.xml (original)
+++ incubator/derby/code/trunk/java/engine/build.xml Tue Jun  7 10:16:01 2005
@@ -34,9 +34,11 @@
 
 <!--             ============ Begin Targets ==============                -->
  
-  <target name="engine" depends="engine_169"
+  <target name="engine" depends="engine_j2se,engine_169,engine_169_opt"
           description="Build Derby engine">
-
+	</target>
+    <target name="engine_j2se" depends="engine_169"
+            description="Build Derby engine">
     <ant dir="${derby.engine.dir}/iapi"/>
     <ant dir="${derby.engine.dir}/impl"/>
     <ant dir="${derby.engine.dir}/jdbc"/>
@@ -44,12 +46,11 @@
     <ant dir="${derby.engine.dir}/catalog"/>
     <ant dir="${derby.engine.dir}/diag"/>
     <ant dir="${derby.engine.dir}/vti"/>
-
-    <copy todir="${out.dir}/${derby.dir}">
-      <fileset dir="${derby.engine.dir}">
-        <include name="modules.properties"/>
-      </fileset>
-    </copy>
+      	<copy todir="${out.dir}/${derby.dir}">
+          <fileset dir="${derby.engine.dir}">
+            <include name="modules.properties"/>
+          </fileset>
+        </copy>
   </target>
   
   <target name="engine_169"
@@ -60,17 +61,38 @@
      <ant dir="${derby.engine.dir}/iapi" target="compile_iapi_error_jsr169"/>
      <ant dir="${derby.engine.dir}/database"/>
      <ant dir="${derby.engine.dir}/impl" target="compile_impl_169"/>
- </target>
+
+
+  </target>
 	
 	<!-- optional JSR169 classes - optional because it requires a 
 	J2ME/CDC/Foundation/JSR169 build jar files.
 	jsr169compile.classpath
 	-->
-	  <target name="engine_169_opt"  depends="engine_169"
-	          description="Build optional JSR169 elements of Derby engine">
+	  <target name="engine_169_opt"  depends="engine_j2se,J2ME_modules_edit"
+	          description="Build optional JSR169 elements of Derby engine"
+	  	      if="jsr169compile.classpath">
 	 <ant dir="${derby.engine.dir}/impl/jdbc" target="compile_jsr169_opt"/>
      <ant dir="${derby.engine.dir}/jdbc" target="compile_jsr169_opt"/>
+	 
 	 </target>
+	
+	<target name="J2ME_modules_edit"  depends="checkJ2MEmoduleprops"
+		unless="modulesJ2ME.uptodate" if="jsr169compile.classpath">
+
+		<replaceregexp file="${out.dir}/${derby.dir}/modules.properties"
+		              match="^#J2ME_optional_(.*)"
+		              replace="\1"
+		              byline="true" />
+	<touch file="${out.dir}/${derby.dir}/modulesJ2ME.done"/>
+
+	</target> 	
+	
+	<target name="checkJ2MEmoduleprops">
+	  <condition property="modulesJ2ME.uptodate">
+	    <available file="${out.dir}/${derby.dir}/modulesJ2ME.done"/>
+	  </condition>
+	</target> 
 	
 <!--             ============= End Targets ==============                -->
 

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/modules.properties
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/modules.properties?rev=188823&r1=188822&r2=188823&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/modules.properties (original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/modules.properties Tue Jun  7 10:16:01 2005
@@ -130,6 +130,7 @@
 #
 derby.module.cryptographyJ2=org.apache.derby.impl.services.jce.JCECipherFactory
 derby.env.jdk.cryptographyJ2=2
+derby.env.classes.cryptographyJ2=javax.crypto.SecretKey
 cloudscape.config.cryptographyJ2=derby
 
 ######################
@@ -293,3 +294,12 @@
 derby.env.dvfJ2=2
 derby.env.classes.dvfJ2=java.math.BigDecimal
 cloudscape.config.dvfJ2=derby
+
+# J2ME optional elements, the J2ME_optional_ lead in
+# is removed if the optional target is built.
+
+#J2ME_optional_derby.module.dvfCDC=org.apache.derby.iapi.types.CDCDataValueFactory
+#J2ME_optional_cloudscape.config.dvfCDC=derby
+#J2ME_optional_derby.module.jdbc169=org.apache.derby.jdbc.Driver169
+#J2ME_optional_derby.env.classes.jdbc169=javax.sql.DataSource
+#J2ME_optional_cloudscape.config.jdbc169=derby