db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1033052 - /db/derby/code/trunk/java/demo/toursdb/build.xml
Date Tue, 09 Nov 2010 16:09:26 GMT
Author: rhillegas
Date: Tue Nov  9 16:09:26 2010
New Revision: 1033052

URL: http://svn.apache.org/viewvc?rev=1033052&view=rev
Log:
DERBY-3986: Fix the loading of toursdb, which broke when we moved the database out of the
source tree into the generated artifact directory.

Modified:
    db/derby/code/trunk/java/demo/toursdb/build.xml

Modified: db/derby/code/trunk/java/demo/toursdb/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/demo/toursdb/build.xml?rev=1033052&r1=1033051&r2=1033052&view=diff
==============================================================================
--- db/derby/code/trunk/java/demo/toursdb/build.xml (original)
+++ db/derby/code/trunk/java/demo/toursdb/build.xml Tue Nov  9 16:09:26 2010
@@ -58,22 +58,35 @@
 
   <target name="buildschema">
     <echo level="info" message="Begin building toursdb"/>
-    <java classname="org.apache.derby.tools.ij"
-          output="${generated.toursdb.dir}/toursdb.out"
-          failonerror="true"
-          dir="${generated.toursdb.dir}" fork="true">
-      <classpath>
-        <pathelement path="${out.dir}"/>
-        <pathelement path="${compile.classpath}"/>
-      </classpath>
-      <sysproperty key="ij.driver" value="org.apache.derby.jdbc.EmbeddedDriver"/>
-      <sysproperty key="ij.database" value="jdbc:derby:toursdb;create=true"/>
-      <arg value="${derby.demo.src.dir}/toursdb/ToursDB_schema.sql"/>
-    </java>
+    <antcall target="runijscript">
+      <param name="script.name" value="ToursDB_schema.sql"/>
+    </antcall>
   </target>
 
   <target name="loadtables">
-    <java classname="org.apache.derby.tools.ij"
+    <echo level="info" message="Begin loading toursdb"/>
+    <antcall target="runijscript">
+      <param name="script.name" value="loadCOUNTRIES.sql"/>
+    </antcall>
+    <antcall target="runijscript">
+      <param name="script.name" value="loadCITIES.sql"/>
+    </antcall>
+    <antcall target="runijscript">
+      <param name="script.name" value="loadAIRLINES.sql"/>
+    </antcall>
+    <antcall target="runijscript">
+      <param name="script.name" value="loadFLIGHTS1.sql"/>
+    </antcall>
+    <antcall target="runijscript">
+      <param name="script.name" value="loadFLIGHTS2.sql"/>
+    </antcall>
+    <antcall target="runijscript">
+      <param name="script.name" value="loadFLIGHTAVAILABILITY1.sql"/>
+    </antcall>
+    <antcall target="runijscript">
+      <param name="script.name" value="loadFLIGHTAVAILABILITY2.sql"/>
+    </antcall>
+    <java classname="toursdb.insertMaps"
           output="${generated.toursdb.dir}/toursdb.out" append="true"
           failonerror="true"
           dir="${generated.toursdb.dir}" fork="true">
@@ -81,11 +94,8 @@
         <pathelement path="${out.dir}"/>
         <pathelement path="${compile.classpath}"/>
       </classpath>
-      <sysproperty key="ij.driver" value="org.apache.derby.jdbc.EmbeddedDriver"/>
-      <sysproperty key="ij.database" value="jdbc:derby:toursdb;create=true"/>
-      <arg value="${derby.demo.src.dir}/toursdb/loadTables.sql"/>
     </java>
-    <java classname="toursdb.insertMaps"
+    <java classname="org.apache.derby.tools.ij"
           output="${generated.toursdb.dir}/toursdb.out" append="true"
           failonerror="true"
           dir="${generated.toursdb.dir}" fork="true">
@@ -93,16 +103,24 @@
         <pathelement path="${out.dir}"/>
         <pathelement path="${compile.classpath}"/>
       </classpath>
+      <arg value="${derby.demo.src.dir}/toursdb/disconnect.sql"/>
     </java>
+  </target>
+
+  <target name="runijscript">
+    <echo level="info" message="Running script ${script.name}"/>
     <java classname="org.apache.derby.tools.ij"
-          output="${generated.toursdb.dir}/toursdb.out" append="true"
+          output="${generated.toursdb.dir}/toursdb.out"
+          append="true"
           failonerror="true"
           dir="${generated.toursdb.dir}" fork="true">
       <classpath>
         <pathelement path="${out.dir}"/>
         <pathelement path="${compile.classpath}"/>
       </classpath>
-      <arg value="${derby.demo.src.dir}/toursdb/disconnect.sql"/>
+      <sysproperty key="ij.driver" value="org.apache.derby.jdbc.EmbeddedDriver"/>
+      <sysproperty key="ij.database" value="jdbc:derby:toursdb;create=true"/>
+      <arg value="${derby.demo.src.dir}/toursdb/${script.name}"/>
     </java>
   </target>
 



Mime
View raw message