[jbpm-commits] JBoss JBPM SVN: r4150 - in jbpm4/branches/tbaeyens: modules/config and 4 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Mar 5 04:39:08 EST 2009


Author: tom.baeyens at jboss.com
Date: 2009-03-05 04:39:08 -0500 (Thu, 05 Mar 2009)
New Revision: 4150

Added:
   jbpm4/branches/tbaeyens/modules/config/src/main/files/hibernate/jdbc/hsqldb.xml
   jbpm4/branches/tbaeyens/modules/db/scripts/
   jbpm4/branches/tbaeyens/modules/db/scripts/antrun-generate-db-scripts.xml
Removed:
   jbpm4/branches/tbaeyens/modules/config/src/main/files/hibernate/jdbc/hsqldb.inmemory.xml
Modified:
   jbpm4/branches/tbaeyens/modules/config/
   jbpm4/branches/tbaeyens/modules/config/pom.xml
   jbpm4/branches/tbaeyens/modules/config/src/main/files/build.properties
   jbpm4/branches/tbaeyens/modules/config/src/main/files/build.xml
   jbpm4/branches/tbaeyens/modules/config/src/main/files/hibernate/jdbc/sybase.xml
   jbpm4/branches/tbaeyens/modules/db/pom.xml
   jbpm4/branches/tbaeyens/pom.xml
Log:
updates :-)


Property changes on: jbpm4/branches/tbaeyens/modules/config
___________________________________________________________________
Name: svn:ignore
   + target


Modified: jbpm4/branches/tbaeyens/modules/config/pom.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/config/pom.xml	2009-03-05 08:02:13 UTC (rev 4149)
+++ jbpm4/branches/tbaeyens/modules/config/pom.xml	2009-03-05 09:39:08 UTC (rev 4150)
@@ -11,8 +11,10 @@
 
 <!-- $Id: pom.xml 4057 2009-02-27 08:19:30Z tom.baeyens at jboss.com $ -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <!-- Module Info -->
   <modelVersion>4.0.0</modelVersion>
-  <name>jBPM 4 - Config Tool</name>
+  <name>jBPM 4 - Config</name>
   <groupId>org.jbpm.jbpm4</groupId>
   <artifactId>jbpm-config</artifactId>
   <packaging>pom</packaging>
@@ -27,6 +29,8 @@
 
   <build>
     <plugins>
+
+      <!-- Package Config Tool -->
       <plugin>
         <artifactId>maven-antrun-plugin</artifactId>
         <executions>
@@ -46,6 +50,8 @@
           </execution>
         </executions>
       </plugin>
+      
+      <!-- Attach Config Tool Zip File as Artifact -->
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>build-helper-maven-plugin</artifactId>

Modified: jbpm4/branches/tbaeyens/modules/config/src/main/files/build.properties
===================================================================
--- jbpm4/branches/tbaeyens/modules/config/src/main/files/build.properties	2009-03-05 08:02:13 UTC (rev 4149)
+++ jbpm4/branches/tbaeyens/modules/config/src/main/files/build.properties	2009-03-05 09:39:08 UTC (rev 4150)
@@ -2,7 +2,7 @@
 jbpm.config.tmp.dir=../../../target/filtered
 jbpm.config.hibernate.cache=hashtable
 jbpm.config.hibernate.connection.type=jdbc
-jbpm.config.hibernate.database=hsqldb.inmemory
+jbpm.config.hibernate.database=hsqldb
 jbpm.config.hibernate.format.sql=include
 jbpm.config.hibernate.jpdl=include
 jbpm.config.identity=include

Modified: jbpm4/branches/tbaeyens/modules/config/src/main/files/build.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/config/src/main/files/build.xml	2009-03-05 08:02:13 UTC (rev 4149)
+++ jbpm4/branches/tbaeyens/modules/config/src/main/files/build.xml	2009-03-05 09:39:08 UTC (rev 4150)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<project name="generate.jbpm.configuration" basedir=".">
+<project name="generate.jbpm.configuration" default="generate" basedir=".">
 	
 	<property file="build.properties" />
 	

Deleted: jbpm4/branches/tbaeyens/modules/config/src/main/files/hibernate/jdbc/hsqldb.inmemory.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/config/src/main/files/hibernate/jdbc/hsqldb.inmemory.xml	2009-03-05 08:02:13 UTC (rev 4149)
+++ jbpm4/branches/tbaeyens/modules/config/src/main/files/hibernate/jdbc/hsqldb.inmemory.xml	2009-03-05 09:39:08 UTC (rev 4150)
@@ -1,6 +0,0 @@
-      <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
-      <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
-      <property name="hibernate.connection.url">jdbc:hsqldb:mem:.</property>
-      <property name="hibernate.connection.username">sa</property>
-      <property name="hibernate.connection.password"></property>
-      <property name="hibernate.hbm2ddl.auto">create-drop</property>

Copied: jbpm4/branches/tbaeyens/modules/config/src/main/files/hibernate/jdbc/hsqldb.xml (from rev 4148, jbpm4/branches/tbaeyens/modules/config/src/main/files/hibernate/jdbc/hsqldb.inmemory.xml)
===================================================================
--- jbpm4/branches/tbaeyens/modules/config/src/main/files/hibernate/jdbc/hsqldb.xml	                        (rev 0)
+++ jbpm4/branches/tbaeyens/modules/config/src/main/files/hibernate/jdbc/hsqldb.xml	2009-03-05 09:39:08 UTC (rev 4150)
@@ -0,0 +1,6 @@
+      <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
+      <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
+      <property name="hibernate.connection.url">jdbc:hsqldb:mem:.</property>
+      <property name="hibernate.connection.username">sa</property>
+      <property name="hibernate.connection.password"></property>
+      <property name="hibernate.hbm2ddl.auto">create-drop</property>


Property changes on: jbpm4/branches/tbaeyens/modules/config/src/main/files/hibernate/jdbc/hsqldb.xml
___________________________________________________________________
Name: svn:mergeinfo
   + 

Modified: jbpm4/branches/tbaeyens/modules/config/src/main/files/hibernate/jdbc/sybase.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/config/src/main/files/hibernate/jdbc/sybase.xml	2009-03-05 08:02:13 UTC (rev 4149)
+++ jbpm4/branches/tbaeyens/modules/config/src/main/files/hibernate/jdbc/sybase.xml	2009-03-05 09:39:08 UTC (rev 4150)
@@ -1,5 +1,5 @@
       <property name="hibernate.dialect">org.hibernate.dialect.SybaseDialect</property>
       <property name="hibernate.connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
       <property name="hibernate.connection.url">@jdbc.sybase.url@</property>
-      <property name="hibernate.connection.username="@jdbc.sybase.username@</property>
+      <property name="hibernate.connection.username">@jdbc.sybase.username@</property>
       <property name="hibernate.connection.password">@jdbc.sybase.password@</property>
\ No newline at end of file

Modified: jbpm4/branches/tbaeyens/modules/db/pom.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/db/pom.xml	2009-03-05 08:02:13 UTC (rev 4149)
+++ jbpm4/branches/tbaeyens/modules/db/pom.xml	2009-03-05 09:39:08 UTC (rev 4150)
@@ -11,6 +11,8 @@
 
 <!-- $Id: pom.xml 3010 2008-11-20 08:30:16Z tom.baeyens at jboss.com $ -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <!-- Module Info -->
   <modelVersion>4.0.0</modelVersion>
   <name>jBPM 4 - DB</name>
   <groupId>org.jbpm.jbpm4</groupId>
@@ -29,16 +31,14 @@
   <dependencies>
     <dependency>
       <groupId>org.jbpm.jbpm4</groupId>
-      <artifactId>jbpm-jpdl</artifactId>
+      <artifactId>jbpm-config</artifactId>
+      <type>zip</type>
       <version>${version}</version>
     </dependency>
     <dependency>
       <groupId>org.jbpm.jbpm4</groupId>
-      <artifactId>jbpm-test-base</artifactId>
-      <version>${version}</version>
+      <artifactId>jbpm-jpdl</artifactId>
     </dependency>
-
-    <!-- Database Driver Versions  -->
     <dependency>
       <groupId>hsqldb</groupId>
       <artifactId>hsqldb</artifactId>
@@ -55,30 +55,16 @@
       <groupId>net.sourceforge.jtds</groupId>
       <artifactId>jtds</artifactId>
     </dependency>   
-
   </dependencies>
 
-  <!-- Plugins -->
   <build>
-    <resources>
-      <resource>
-        <directory>src/main/resources</directory>
-        <filtering>true</filtering>
-      </resource>
-    </resources>
-    <testResources>
-      <testResource>
-        <directory>src/test/resources</directory>
-        <filtering>true</filtering>
-      </testResource>
-    </testResources>
-
     <plugins>
+      <!-- Get Config Tool -->
       <plugin>
         <artifactId>maven-dependency-plugin</artifactId>
         <executions>
           <execution>
-            <id>unpack.jbpm.db</id>
+            <id>get.config.tool</id>
             <phase>generate-resources</phase>
             <goals>
               <goal>unpack</goal>
@@ -87,13 +73,11 @@
               <artifactItems>
                 <artifactItem>
                   <groupId>org.jbpm.jbpm4</groupId>
-                  <artifactId>jbpm-jpdl</artifactId>
-                  <classifier>config</classifier>
-                  <overWrite>true</overWrite>
+                  <artifactId>jbpm-config</artifactId>
+                  <type>zip</type>
                 </artifactItem>
               </artifactItems>
-              <excludeTransitive>true</excludeTransitive>
-              <outputDirectory>target/jpdl-config</outputDirectory>
+              <outputDirectory>target/jbpm-config</outputDirectory>
             </configuration>
           </execution>
         </executions>
@@ -102,20 +86,6 @@
         <artifactId>maven-antrun-plugin</artifactId>
         <executions>
           <execution>
-            <id>install.hibernate.database.properties</id>
-            <phase>generate-test-resources</phase>
-            <goals>
-              <goal>run</goal>
-            </goals>
-            <configuration>
-              <tasks>
-                <copy file="target/jpdl-config/hibernate.cfg.${database}.xml"
-                      tofile="target/test-classes/hibernate.cfg.xml"
-                      overwrite="true" />
-              </tasks>
-            </configuration>
-          </execution>
-          <execution>
             <id>generate-db-scripts</id>
             <phase>process-resources</phase>
             <goals>
@@ -124,7 +94,7 @@
             <configuration>
               <tasks>
                 <property name="maven.runtime.classpath" refid="maven.runtime.classpath" />
-                <ant antfile="src/main/ant/build.schema.xml" target="create-schema" />
+                <ant antfile="scripts/antrun-generate-db-scripts.xml" target="generate.db.scripts" />
               </tasks>
             </configuration>
           </execution>
@@ -133,6 +103,7 @@
     </plugins>
   </build>
 
+<!-- 
   <profiles>
     <profile>
       <id>drop-tables</id>
@@ -149,7 +120,7 @@
                 </goals>
                 <configuration>
                   <tasks>
-                    <!-- Implicit reference to all command line switches, i.e. -Ddatabase=xyz -->
+                    < !- - Implicit reference to all command line switches, i.e. -Ddatabase=xyz - - >
                     <property name="compile_classpath" refid="maven.compile.classpath"/>
                     <property name="runtime_classpath" refid="maven.runtime.classpath"/>
                     <property name="test_classpath" refid="maven.test.classpath"/>
@@ -181,7 +152,7 @@
                 </goals>
                 <configuration>
                   <tasks>
-                    <!-- Implicit reference to all command line switches, i.e. -Ddatabase=xyz -->
+                    < !- - Implicit reference to all command line switches, i.e. -Ddatabase=xyz - - >
                     <property name="compile_classpath" refid="maven.compile.classpath"/>
                     <property name="runtime_classpath" refid="maven.runtime.classpath"/>
                     <property name="test_classpath" refid="maven.test.classpath"/>
@@ -197,8 +168,6 @@
         </plugins>
       </build>
     </profile>
-
-    <!-- -Ddatabase=oracle -->
     <profile>
       <id>oracle</id>
       <activation>
@@ -223,5 +192,5 @@
       </repositories>
     </profile>
   </profiles>
-
+ -->
 </project>
\ No newline at end of file

Added: jbpm4/branches/tbaeyens/modules/db/scripts/antrun-generate-db-scripts.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/db/scripts/antrun-generate-db-scripts.xml	                        (rev 0)
+++ jbpm4/branches/tbaeyens/modules/db/scripts/antrun-generate-db-scripts.xml	2009-03-05 09:39:08 UTC (rev 4150)
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ============================================================ -->
+<!--  JBoss, the OpenSource J2EE webOS                            -->
+<!--  Distributable under LGPL license.                           -->
+<!--  See terms of license at http://www.gnu.org.                 -->
+<!-- ============================================================ -->
+
+<!-- $Id$ -->
+
+<project>
+
+  <!-- ================================================================== -->
+  <!-- jBPM Database schema                                               -->
+  <!-- ================================================================== -->
+  <target name="generate.db.scripts">
+    <!-- echo message="${maven.runtime.classpath}"/ -->
+    
+    <!-- Verify that the config tool is present -->
+    <available file="target/jbpm-config" property="jbpm.config.is.available" />
+    <fail unless="jbpm.config.is.available" message="config tool is not available in target/jbpm-config" />
+
+    <mkdir dir="target/jbpm-config/target/configfiles"/>
+    <copy file="target/jbpm-config/build.properties" tofile="target/jbpm-config/original.config.properties" />
+
+    <taskdef name="schemaexport"
+             classname="org.hibernate.tool.hbm2ddl.SchemaExportTask">
+      <classpath>
+        <pathelement location="target/jbpm-config/target/configfiles" />
+        <pathelement path="${maven.runtime.classpath}" />
+      </classpath>
+    </taskdef>
+    
+    <!-- HsqlDB -->
+    <create-ddl db="hsqldb"/>
+
+    <!-- MySQL -->
+    <create-ddl db="mysql"/>
+    <!--TODO: https://jira.jboss.org/jira/browse/JBPM-2071 -->
+    <replace file="target/classes/jbpm.mysql.create.sql" token="BLOB_VALUE_ blob" value="BLOB_VALUE_ longblob" />
+
+    <!-- Oracle -->
+    <create-ddl db="oracle"/>
+
+    <!-- PostgreSQL -->
+    <create-ddl db="postgresql"/>
+
+    <!-- Sybase -->
+    <create-ddl db="sybase"/>
+    
+  </target>
+
+  <macrodef name="create-ddl">
+    <attribute name="db"/>
+
+    <sequential>
+      <echo></echo>
+      <echo>=====================</echo>
+      <echo>Create DDL @{db}</echo>
+      
+      <copy file="target/jbpm-config/original.config.properties" tofile="target/jbpm-config/build.properties" overwrite="true" />
+      <replace file="target/jbpm-config/build.properties" token="jbpm.config.hibernate.database=hsqldb" value="jbpm.config.hibernate.database=@{db}" />
+      <ant antfile="target/jbpm-config/build.xml" inheritall="false" /> 
+      
+      <schemaexport output="target/classes/jbpm.@{db}.create.sql"
+                    create="yes" drop="no"
+                    config="target/jbpm-config/target/configfiles/jbpm.hibernate.cfg.xml"
+                    text="yes" delimiter=";"
+                    quiet="yes"/>
+
+      <schemaexport output="target/classes/jbpm.@{db}.drop.sql"
+                    create="no" drop="yes"
+                    config="target/jbpm-config/target/configfiles/jbpm.hibernate.cfg.xml"
+                    text="yes" delimiter=";"
+                    quiet="yes"/>
+
+      <echo>Done.</echo>
+      <echo>=====================</echo>
+    </sequential>
+  </macrodef>
+
+</project>


Property changes on: jbpm4/branches/tbaeyens/modules/db/scripts/antrun-generate-db-scripts.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: jbpm4/branches/tbaeyens/pom.xml
===================================================================
--- jbpm4/branches/tbaeyens/pom.xml	2009-03-05 08:02:13 UTC (rev 4149)
+++ jbpm4/branches/tbaeyens/pom.xml	2009-03-05 09:39:08 UTC (rev 4150)
@@ -89,6 +89,11 @@
       </dependency>
       <dependency>
         <groupId>org.jbpm.jbpm4</groupId>
+        <artifactId>jbpm-config</artifactId>
+        <version>${version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jbpm.jbpm4</groupId>
         <artifactId>jbpm-test-base</artifactId>
         <version>${version}</version>
       </dependency>




More information about the jbpm-commits mailing list