openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r899820 - in /openjpa/branches/1.3.x/openjpa-examples/src/main/java: build.xml reversemapping/build.xml reversemapping/db.xml
Date Fri, 15 Jan 2010 21:32:23 GMT
Author: dwoods
Date: Fri Jan 15 21:32:23 2010
New Revision: 899820

URL: http://svn.apache.org/viewvc?rev=899820&view=rev
Log:
OPENJPA-1091 Fix reversemapping example

Added:
    openjpa/branches/1.3.x/openjpa-examples/src/main/java/reversemapping/db.xml   (with props)
Modified:
    openjpa/branches/1.3.x/openjpa-examples/src/main/java/build.xml
    openjpa/branches/1.3.x/openjpa-examples/src/main/java/reversemapping/build.xml

Modified: openjpa/branches/1.3.x/openjpa-examples/src/main/java/build.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/1.3.x/openjpa-examples/src/main/java/build.xml?rev=899820&r1=899819&r2=899820&view=diff
==============================================================================
--- openjpa/branches/1.3.x/openjpa-examples/src/main/java/build.xml (original)
+++ openjpa/branches/1.3.x/openjpa-examples/src/main/java/build.xml Fri Jan 15 21:32:23 2010
@@ -32,7 +32,7 @@
 
     <target name="usagewarning">
         <fail>
-Please traverse to a sub-directory, like hellojpa, and run "ant" from there.
+Please traverse to a sub-directory and run "ant" from there.
         </fail>
     </target>
 

Modified: openjpa/branches/1.3.x/openjpa-examples/src/main/java/reversemapping/build.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/1.3.x/openjpa-examples/src/main/java/reversemapping/build.xml?rev=899820&r1=899819&r2=899820&view=diff
==============================================================================
--- openjpa/branches/1.3.x/openjpa-examples/src/main/java/reversemapping/build.xml (original)
+++ openjpa/branches/1.3.x/openjpa-examples/src/main/java/reversemapping/build.xml Fri Jan
15 21:32:23 2010
@@ -43,27 +43,12 @@
         description="Pre-compilation phase">
     </target>
 
-    <target name="initialize-db" unless="initialize-db-skip"
+    <target name="initialize-db" depends="init,clean" unless="initialize-db-skip"
         description="Drop then re-create the database">
-        <!-- first make sure the database is empty -->
-        <sql src="schema/dropdb.sql"
-            driver="${dbdriver}" url="${dburl}"
-            userid="${dbuser}" password="${dbpass}"
-            onerror="continue" classpathref="classpath"/>
-
-        <!-- build the database -->
-        <sql
-            driver="${dbdriver}" url="${dburl}"
-            userid="${dbuser}" password="${dbpass}" classpathref="classpath">
-            <transaction src="schema/ToursDB_schema.sql"/>
-            <transaction src="schema/loadCOUNTRIES.sql"/>
-            <transaction src="schema/loadCITIES.sql"/>
-            <transaction src="schema/loadAIRLINES.sql"/>
-            <transaction src="schema/loadFLIGHTS1.sql"/>
-            <transaction src="schema/loadFLIGHTS2.sql"/>
-            <transaction src="schema/loadFLIGHTAVAILABILITY1.sql"/>
-            <transaction src="schema/loadFLIGHTAVAILABILITY2.sql"/>
-        </sql>
+        <exec executable="ant${platform.script.ext}">
+            <arg line="-f db.xml"/>
+        </exec>
+        <sleep seconds="5"/>
     </target>
 
     <target name="reverse-map-schema" depends="initialize-db"

Added: openjpa/branches/1.3.x/openjpa-examples/src/main/java/reversemapping/db.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/1.3.x/openjpa-examples/src/main/java/reversemapping/db.xml?rev=899820&view=auto
==============================================================================
--- openjpa/branches/1.3.x/openjpa-examples/src/main/java/reversemapping/db.xml (added)
+++ openjpa/branches/1.3.x/openjpa-examples/src/main/java/reversemapping/db.xml Fri Jan 15
21:32:23 2010
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+ 
+ http://www.apache.org/licenses/LICENSE-2.0
+ 
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.   
+-->
+<project name="hellojpa-db" default="initialize-db">
+    <property name="example" value="reversemapping"/>
+    <import file="../build.xml"/>
+
+
+    <target name="initialize-db" unless="initialize-db-skip"
+        description="Drop then re-create the database">
+        <!-- first make sure the database is empty -->
+        <sql src="schema/dropdb.sql"
+            driver="${dbdriver}" url="${dburl}"
+            userid="${dbuser}" password="${dbpass}"
+            onerror="continue" classpathref="classpath"/>
+
+        <!-- build the database -->
+        <sql
+            driver="${dbdriver}" url="${dburl}"
+            userid="${dbuser}" password="${dbpass}" classpathref="classpath">
+            <transaction src="schema/ToursDB_schema.sql"/>
+            <transaction src="schema/loadCOUNTRIES.sql"/>
+            <transaction src="schema/loadCITIES.sql"/>
+            <transaction src="schema/loadAIRLINES.sql"/>
+            <transaction src="schema/loadFLIGHTS1.sql"/>
+            <transaction src="schema/loadFLIGHTS2.sql"/>
+            <transaction src="schema/loadFLIGHTAVAILABILITY1.sql"/>
+            <transaction src="schema/loadFLIGHTAVAILABILITY2.sql"/>
+        </sql>
+    </target>
+
+</project>

Propchange: openjpa/branches/1.3.x/openjpa-examples/src/main/java/reversemapping/db.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message