[jbpm-commits] JBoss JBPM SVN: r2814 - in jbpm3/branches/jbpm-3.3.0.GA/modules: db and 4 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Sat Nov 8 07:37:47 EST 2008


Author: thomas.diesler at jboss.com
Date: 2008-11-08 07:37:46 -0500 (Sat, 08 Nov 2008)
New Revision: 2814

Added:
   jbpm3/branches/jbpm-3.3.0.GA/modules/db/src/main/resources/hibernate.extra.hbm.xml
   jbpm3/branches/jbpm-3.3.0.GA/modules/db/src/main/resources/hibernate.identity.hbm.xml
Modified:
   jbpm3/branches/jbpm-3.3.0.GA/modules/core/src/main/java/org/jbpm/ant/JbpmSchemaTask.java
   jbpm3/branches/jbpm-3.3.0.GA/modules/db/pom.xml
   jbpm3/branches/jbpm-3.3.0.GA/modules/db/scripts/antrun-jbpmschema.xml
   jbpm3/branches/jbpm-3.3.0.GA/modules/distribution/pom.xml
   jbpm3/branches/jbpm-3.3.0.GA/modules/distribution/src/main/resources/installer/install-definition.xml
Log:
Resurect DLL scripts and add them to the installer

Modified: jbpm3/branches/jbpm-3.3.0.GA/modules/core/src/main/java/org/jbpm/ant/JbpmSchemaTask.java
===================================================================
--- jbpm3/branches/jbpm-3.3.0.GA/modules/core/src/main/java/org/jbpm/ant/JbpmSchemaTask.java	2008-11-08 11:52:20 UTC (rev 2813)
+++ jbpm3/branches/jbpm-3.3.0.GA/modules/core/src/main/java/org/jbpm/ant/JbpmSchemaTask.java	2008-11-08 12:37:46 UTC (rev 2814)
@@ -34,7 +34,8 @@
 import org.jbpm.persistence.db.DbPersistenceServiceFactory;
 import org.jbpm.svc.Services;
 
-public class JbpmSchemaTask extends Task {
+public class JbpmSchemaTask extends Task
+{
 
   String jbpmCfg = null;
   String hibernateCfg = null;
@@ -47,98 +48,141 @@
 
   String actions = null;
 
-  public void execute() throws BuildException {
-    if (actions==null) {
+  public void execute() throws BuildException
+  {
+    if (actions == null)
+    {
       // default action is create
       actions = "create";
     }
-    
+
     // we need a configuration
-    Configuration configuration = null; 
+    Configuration configuration = null;
 
     // if there is no jbpm nor hibernate configuration specified
-    if ( (jbpmCfg==null)
-         && (hibernateCfg==null) 
-       ) {
+    if ((jbpmCfg == null) && (hibernateCfg == null))
+    {
       // search for the default jbpm.cfg.xml
       URL defaultJbpmCfgUrl = getClass().getClassLoader().getResource("jbpm.cfg.xml");
-      if (defaultJbpmCfgUrl!=null) {
+      if (defaultJbpmCfgUrl != null)
+      {
         jbpmCfg = "jbpm.cfg.xml";
-      // if still not found, search for the default hibernate.cfg.xml
-      } else {
+        // if still not found, search for the default hibernate.cfg.xml
+      }
+      else
+      {
         URL defaultHibernateCfgUrl = getClass().getClassLoader().getResource("hibernate.cfg.xml");
-        if (defaultHibernateCfgUrl!=null) {
+        if (defaultHibernateCfgUrl != null)
+        {
           hibernateCfg = "hibernate.cfg.xml";
         }
       }
     }
-    
-    // first see if the jbpm cfg is specified cause that implies a hibernate configuration
-    if (jbpmCfg!=null) {
-      log("using jbpm configuration "+jbpmCfg);
+
+    // first see if the jbpm cfg is specified cause that implies a hibernate
+    // configuration
+    if (jbpmCfg != null)
+    {
+      log("using jbpm configuration " + jbpmCfg);
       JbpmConfiguration jbpmConfiguration = AntHelper.getJbpmConfiguration(jbpmCfg);
       JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
-      try {
-        DbPersistenceServiceFactory dbPersistenceServiceFactory = (DbPersistenceServiceFactory) jbpmConfiguration.getServiceFactory(Services.SERVICENAME_PERSISTENCE);
+      try
+      {
+        DbPersistenceServiceFactory dbPersistenceServiceFactory = (DbPersistenceServiceFactory)jbpmConfiguration
+            .getServiceFactory(Services.SERVICENAME_PERSISTENCE);
         configuration = dbPersistenceServiceFactory.getConfiguration();
-      } finally {
+      }
+      finally
+      {
         jbpmContext.close();
       }
-      
-    // if there is no jbpm.cfg.xml specified, check if there is a hibernate.cfg.xml specified
-    } else if (hibernateCfg!=null) {
-      log("using hibernate configuration "+hibernateCfg);
+
+      // if there is no jbpm.cfg.xml specified, check if there is a
+      // hibernate.cfg.xml specified
+    }
+    else if (hibernateCfg != null)
+    {
+      log("using hibernate configuration " + hibernateCfg);
       configuration = AntHelper.getConfiguration(hibernateCfg, hibernateProperties);
 
-    // no hibernate configuration specified
-    } else {
+      // no hibernate configuration specified
+    }
+    else
+    {
       throw new BuildException("couldn't create schema.  no jbpm nor hibernate configuration specified.");
     }
 
     JbpmSchema jbpmSchema = new JbpmSchema(configuration);
 
     SchemaExport schemaExport = new SchemaExport(configuration);
-    if (output!=null) schemaExport.setOutputFile(output);
-    if (delimiter!=null) schemaExport.setDelimiter(delimiter);
+    if (output != null)
+    {
+      schemaExport.setOutputFile(output);
+    }
+    
+    if (delimiter != null)
+      schemaExport.setDelimiter(delimiter);
 
     StringTokenizer tokenizer = new StringTokenizer(actions, ",");
-    while (tokenizer.hasMoreTokens()) {
+    while (tokenizer.hasMoreTokens())
+    {
       String action = tokenizer.nextToken();
+      System.out.println("##########################################################");
+      System.out.println("# " + action + " schema: " + output);
+      System.out.println("##########################################################");
 
-      if ("drop".equalsIgnoreCase(action)) {
+      if ("drop".equalsIgnoreCase(action))
+      {
         schemaExport.drop(!quiet, !text);
-
-      } else if ("create".equalsIgnoreCase(action)) {
+      }
+      else if ("create".equalsIgnoreCase(action))
+      {
         schemaExport.create(!quiet, !text);
-        
-      } else if ("clean".equalsIgnoreCase(action)) {
+      }
+      else if ("clean".equalsIgnoreCase(action))
+      {
         jbpmSchema.cleanSchema();
       }
     }
   }
-  
-  public void setActions(String actions) {
+
+  public void setActions(String actions)
+  {
     this.actions = actions;
   }
-  public void setJbpmCfg(String jbpmCfg) {
+
+  public void setJbpmCfg(String jbpmCfg)
+  {
     this.jbpmCfg = jbpmCfg;
   }
-  public void setHibernateCfg(String hibernateCfg) {
+
+  public void setHibernateCfg(String hibernateCfg)
+  {
     this.hibernateCfg = hibernateCfg;
   }
-  public void setHibernateProperties(String hibernateProperties) {
+
+  public void setHibernateProperties(String hibernateProperties)
+  {
     this.hibernateProperties = hibernateProperties;
   }
-  public void setDelimiter(String delimiter) {
+
+  public void setDelimiter(String delimiter)
+  {
     this.delimiter = delimiter;
   }
-  public void setOutput(String output) {
+
+  public void setOutput(String output)
+  {
     this.output = output;
   }
-  public void setQuiet(boolean quiet) {
+
+  public void setQuiet(boolean quiet)
+  {
     this.quiet = quiet;
   }
-  public void setText(boolean text) {
+
+  public void setText(boolean text)
+  {
     this.text = text;
   }
 }

Modified: jbpm3/branches/jbpm-3.3.0.GA/modules/db/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.3.0.GA/modules/db/pom.xml	2008-11-08 11:52:20 UTC (rev 2813)
+++ jbpm3/branches/jbpm-3.3.0.GA/modules/db/pom.xml	2008-11-08 12:37:46 UTC (rev 2814)
@@ -36,14 +36,11 @@
       <artifactId>jbpm-core</artifactId>
       <version>${version}</version>
     </dependency>
-    
-    <!-- Test Dependencies -->
     <dependency>
       <groupId>org.jbpm.jbpm3</groupId>
       <artifactId>jbpm-core</artifactId>
       <classifier>config</classifier>
       <version>${version}</version>
-      <scope>test</scope>
     </dependency>
   </dependencies>
 
@@ -62,7 +59,7 @@
             <configuration>
               <tasks>
                 <property name="maven.runtime.classpath" refid="maven.runtime.classpath" />
-                <!-- ant antfile="scripts/antrun-jbpmschema.xml" target="jbpmschema" /-->
+                <ant antfile="scripts/antrun-jbpmschema.xml" target="jbpmschema" />
               </tasks>
             </configuration>
           </execution>
@@ -72,7 +69,7 @@
         <artifactId>maven-jar-plugin</artifactId>
         <configuration>
           <includes>
-            <include>ddl/*</include>
+            <include>jbpm.jpdl.*.sql</include>
           </includes>
         </configuration>
       </plugin>

Modified: jbpm3/branches/jbpm-3.3.0.GA/modules/db/scripts/antrun-jbpmschema.xml
===================================================================
--- jbpm3/branches/jbpm-3.3.0.GA/modules/db/scripts/antrun-jbpmschema.xml	2008-11-08 11:52:20 UTC (rev 2813)
+++ jbpm3/branches/jbpm-3.3.0.GA/modules/db/scripts/antrun-jbpmschema.xml	2008-11-08 12:37:46 UTC (rev 2814)
@@ -20,25 +20,27 @@
       <classpath path="${maven.runtime.classpath}" />
     </taskdef>
 
-    <property name="scriptsdir" value="${basedir}/target/classes/ddl" />
+    <property name="scriptsdir" value="${basedir}/target/classes" />
     <mkdir dir="${scriptsdir}" />
     
     <jbpmschema output="${scriptsdir}/jbpm.jpdl.db2.sql"        jbpmCfg="jbpm/db2.jbpm.cfg.xml" actions="create" text="true"/>
     <jbpmschema output="${scriptsdir}/jbpm.jpdl.derby.sql"      jbpmCfg="jbpm/derby.jbpm.cfg.xml" actions="create" text="true"/>
     <jbpmschema output="${scriptsdir}/jbpm.jpdl.firebird.sql"   jbpmCfg="jbpm/firebird.jbpm.cfg.xml" actions="create" text="true"/>
     <jbpmschema output="${scriptsdir}/jbpm.jpdl.hsqldb.sql"     jbpmCfg="jbpm/hsqldb.jbpm.cfg.xml" actions="create" text="true"/>
-    <jbpmschema output="${scriptsdir}/jbpm.jpdl.informix.sql"   jbpmCfg="jbpm/informix.jbpm.cfg.xml" actions="create" text="true"/>
     <jbpmschema output="${scriptsdir}/jbpm.jpdl.ingres.sql"     jbpmCfg="jbpm/ingres.jbpm.cfg.xml" actions="create" text="true"/>
     <jbpmschema output="${scriptsdir}/jbpm.jpdl.interbase.sql"  jbpmCfg="jbpm/interbase.jbpm.cfg.xml" actions="create" text="true"/>
     <jbpmschema output="${scriptsdir}/jbpm.jpdl.mckoi.sql"      jbpmCfg="jbpm/mckoi.jbpm.cfg.xml" actions="create" text="true"/>
     <jbpmschema output="${scriptsdir}/jbpm.jpdl.mssql.sql"      jbpmCfg="jbpm/mssql.jbpm.cfg.xml" actions="create" text="true"/>
     <jbpmschema output="${scriptsdir}/jbpm.jpdl.mysql.sql"      jbpmCfg="jbpm/mysql.jbpm.cfg.xml" actions="create" text="true"/>
     <jbpmschema output="${scriptsdir}/jbpm.jpdl.oracle.sql"     jbpmCfg="jbpm/oracle.jbpm.cfg.xml" delimiter=";" actions="create" text="true"/>
-    <jbpmschema output="${scriptsdir}/jbpm.jpdl.pointbase.sql"  jbpmCfg="jbpm/pointbase.jbpm.cfg.xml" actions="create" text="true"/>
     <jbpmschema output="${scriptsdir}/jbpm.jpdl.postgresql.sql" jbpmCfg="jbpm/postgresql.jbpm.cfg.xml" actions="create" text="true"/>
-    <jbpmschema output="${scriptsdir}/jbpm.jpdl.progress.sql"   jbpmCfg="jbpm/progress.jbpm.cfg.xml" actions="create" text="true"/>
     <jbpmschema output="${scriptsdir}/jbpm.jpdl.sapdb.sql"      jbpmCfg="jbpm/sapdb.jbpm.cfg.xml" actions="create" text="true"/>
     <jbpmschema output="${scriptsdir}/jbpm.jpdl.sybase.sql"     jbpmCfg="jbpm/sybase.jbpm.cfg.xml" actions="create" text="true"/>
+  	
+  	<!--[JBPM-1813] Fix create schema generation -->
+    <!--jbpmschema output="${scriptsdir}/jbpm.jpdl.informix.sql"   jbpmCfg="jbpm/informix.jbpm.cfg.xml" actions="create" text="true"/-->
+    <!--jbpmschema output="${scriptsdir}/jbpm.jpdl.pointbase.sql"  jbpmCfg="jbpm/pointbase.jbpm.cfg.xml" actions="create" text="true"/-->
+    <!--jbpmschema output="${scriptsdir}/jbpm.jpdl.progress.sql"   jbpmCfg="jbpm/progress.jbpm.cfg.xml" actions="create" text="true"/-->
   </target>
 
 </project>

Added: jbpm3/branches/jbpm-3.3.0.GA/modules/db/src/main/resources/hibernate.extra.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.3.0.GA/modules/db/src/main/resources/hibernate.extra.hbm.xml	                        (rev 0)
+++ jbpm3/branches/jbpm-3.3.0.GA/modules/db/src/main/resources/hibernate.extra.hbm.xml	2008-11-08 12:37:46 UTC (rev 2814)
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+      "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+      "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping>
+
+</hibernate-mapping>


Property changes on: jbpm3/branches/jbpm-3.3.0.GA/modules/db/src/main/resources/hibernate.extra.hbm.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: jbpm3/branches/jbpm-3.3.0.GA/modules/db/src/main/resources/hibernate.identity.hbm.xml
===================================================================
--- jbpm3/branches/jbpm-3.3.0.GA/modules/db/src/main/resources/hibernate.identity.hbm.xml	                        (rev 0)
+++ jbpm3/branches/jbpm-3.3.0.GA/modules/db/src/main/resources/hibernate.identity.hbm.xml	2008-11-08 12:37:46 UTC (rev 2814)
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+      "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+      "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping>
+
+</hibernate-mapping>


Property changes on: jbpm3/branches/jbpm-3.3.0.GA/modules/db/src/main/resources/hibernate.identity.hbm.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: jbpm3/branches/jbpm-3.3.0.GA/modules/distribution/pom.xml
===================================================================
--- jbpm3/branches/jbpm-3.3.0.GA/modules/distribution/pom.xml	2008-11-08 11:52:20 UTC (rev 2813)
+++ jbpm3/branches/jbpm-3.3.0.GA/modules/distribution/pom.xml	2008-11-08 12:37:46 UTC (rev 2814)
@@ -87,6 +87,11 @@
       <version>${version}</version>
       <type>jdocbook</type>
     </dependency>
+    <dependency>
+      <groupId>org.jbpm.jbpm3</groupId>
+      <artifactId>jbpm-db</artifactId>
+      <version>${version}</version>
+    </dependency>
     
     <!-- jBPM Projects -->
     <dependency>

Modified: jbpm3/branches/jbpm-3.3.0.GA/modules/distribution/src/main/resources/installer/install-definition.xml
===================================================================
--- jbpm3/branches/jbpm-3.3.0.GA/modules/distribution/src/main/resources/installer/install-definition.xml	2008-11-08 11:52:20 UTC (rev 2813)
+++ jbpm3/branches/jbpm-3.3.0.GA/modules/distribution/src/main/resources/installer/install-definition.xml	2008-11-08 12:37:46 UTC (rev 2814)
@@ -117,6 +117,10 @@
       <file src="@{deploy.artifacts.dir}/etc/version.info.xml" targetdir="$INSTALL_PATH/jbpm3/config"
         override="true" />
 
+      <!-- jbpm3/database -->
+      <file src="@{deploy.artifacts.dir}/lib/jbpm-db.jar" targetdir="$INSTALL_PATH/jbpm3/database"
+        unpack="true" override="true" />
+
       <!-- jbpm3/docs -->
       <file src="@{deploy.artifacts.dir}/lib/jbpm-userguide.zip" targetdir="$INSTALL_PATH/jbpm3/docs/userguide"
         unpack="true" override="true" />




More information about the jbpm-commits mailing list