ode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mr...@apache.org
Subject svn commit: r547302 - /incubator/ode/trunk/Rakefile
Date Thu, 14 Jun 2007 16:42:03 GMT
Author: mriou
Date: Thu Jun 14 09:42:02 2007
New Revision: 547302

URL: http://svn.apache.org/viewvc?view=rev&rev=547302
Log:
Added MySQL in the list of generated schemas for OpenJPA.

Modified:
    incubator/ode/trunk/Rakefile

Modified: incubator/ode/trunk/Rakefile
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/Rakefile?view=diff&rev=547302&r1=547301&r2=547302
==============================================================================
--- incubator/ode/trunk/Rakefile (original)
+++ incubator/ode/trunk/Rakefile Thu Jun 14 09:42:02 2007
@@ -349,15 +349,18 @@
 
   desc "ODE OpenJPA Derby Database"
   define "dao-jpa-ojpa-derby" do
-    derby_xml = _("src/main/descriptors/persistence.derby.xml")
-    quartz_sql = _("src/main/scripts/quartz-derby.sql")
-    partial_sql = file("target/partial.sql"=>derby_xml) do |task|
-      mkpath _("target"), :verbose=>false
-      Buildr::OpenJPA.mapping_tool :properties=>derby_xml, :action=>"build", :sql=>task.name,
-        :classpath=>projects("bpel-store", "dao-jpa", "bpel-api", "bpel-dao", "utils"
)
+    %w{ derby mysql }.each do |db|
+      db_xml = _("src/main/descriptors/persistence.#{db}.xml")
+      quartz_sql = _("src/main/scripts/quartz-#{db}.sql")
+      partial_sql = file("target/partial.#{db}.sql"=>db_xml) do |task|
+        mkpath _("target"), :verbose=>false
+        Buildr::OpenJPA.mapping_tool :properties=>db_xml, :action=>"build", :sql=>task.name,
+          :classpath=>projects("bpel-store", "dao-jpa", "bpel-api", "bpel-dao", "utils"
)
+      end
+      sql = concat(_("target/#{db}.sql")=>[partial_sql, quartz_sql])
+      build sql
     end
-    derby_sql = concat(_("target/derby.sql")=>[partial_sql, quartz_sql])
-    derby_db = Derby.create(_("target/derby/jpadb")=>derby_sql)
+    derby_db = Derby.create(_("target/derby/jpadb")=>_("target/derby.sql"))
 
     test.with projects("bpel-api", "bpel-dao", "bpel-obj", "bpel-epr", "dao-jpa", "utils"),
       BACKPORT, COMMONS.collections, COMMONS.lang, COMMONS.logging, GERONIMO.transaction,



Mime
View raw message