[jbpm-commits] JBoss JBPM SVN: r4167 - in jbpm4/branches/tbaeyens: modules/db and 5 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Mar 6 09:12:52 EST 2009


Author: tom.baeyens at jboss.com
Date: 2009-03-06 09:12:52 -0500 (Fri, 06 Mar 2009)
New Revision: 4167

Removed:
   jbpm4/branches/tbaeyens/modules/jpdl/src/test/java/org/jbpm/test/xml/DbGenTest.java
Modified:
   jbpm4/branches/tbaeyens/build.xml
   jbpm4/branches/tbaeyens/modules/db/pom.xml
   jbpm4/branches/tbaeyens/modules/distro/.settings/attachedFile.properties
   jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/build.xml
   jbpm4/branches/tbaeyens/modules/examples/pom.xml
   jbpm4/branches/tbaeyens/modules/test-db/pom.xml
   jbpm4/branches/tbaeyens/pom.xml
Log:
work

Modified: jbpm4/branches/tbaeyens/build.xml
===================================================================
--- jbpm4/branches/tbaeyens/build.xml	2009-03-06 09:07:19 UTC (rev 4166)
+++ jbpm4/branches/tbaeyens/build.xml	2009-03-06 14:12:52 UTC (rev 4167)
@@ -130,7 +130,7 @@
     </exec>
   </target>
 
-  <target name="update.configurations" description="update the pvm and jpdl test resources by running the config tool">
+  <target name="update.configurations" description="update the pvm, jpdl, example and test-db test resources by running the config tool">
     <ant antfile="modules/distro/src/main/resources/config-tool/build.xml" target="create.configuration.files" inheritall="false">
       <property name="config.files.dir" value="${basedir}/modules/pvm/src/test/resources" />
       <property name="tmp.dir" value="${basedir}/modules/pvm/target/config-tmp" />
@@ -150,4 +150,11 @@
     </ant>
   </target>
 
+	<target name="db.create">
+		<fail unless="database" message="property database must be specified. E.g. ant -Ddatabase=oracle db.create"/>
+    <exec dir="modules/db" executable="${mvn.executable}">
+      <arg line="-Ddatabase=${database} clean install" />
+    </exec>
+	</target>
+
 </project>
\ No newline at end of file

Modified: jbpm4/branches/tbaeyens/modules/db/pom.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/db/pom.xml	2009-03-06 09:07:19 UTC (rev 4166)
+++ jbpm4/branches/tbaeyens/modules/db/pom.xml	2009-03-06 14:12:52 UTC (rev 4167)
@@ -50,107 +50,54 @@
       <artifactId>jtds</artifactId>
     </dependency>   
   </dependencies>
-
-  <build>
-    <plugins>
-      <!-- Get Config Tool -->
-      <plugin>
-        <artifactId>maven-dependency-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>get.config.tool</id>
-            <phase>generate-resources</phase>
-            <goals>
-              <goal>copy-dependencies</goal>
-            </goals>
-            <configuration>
-              <outputDirectory>target/libs</outputDirectory>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>drop.create.db</id>
-            <phase>process-resources</phase>
-            <goals>
-              <goal>run</goal>
-            </goals>
-            <configuration>
-              <tasks>
-                <ant antfile="../distro/src/main/resources/config-tool/build.xml" target="create.db" inheritall="false">
-                  <property name="config.files.dir" value="${basedir}/target/config.tool/config.files" />
-                  <property name="tmp.dir" value="${basedir}/target/config.tool/tmp" />
-                  <property name="db.scripts.dir" value="${basedir}/target/config.tool/db.scripts" />
-                  <property name="libs.dir" value="${basedir}/target/libs" />
-                </ant>
-              </tasks>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-
-<!-- 
+  
   <profiles>
     <profile>
-      <id>drop-tables</id>
+      <id>database</id>
+      <activation>
+        <property>
+          <name>database</name>
+        </property>
+      </activation>
       <build>
         <plugins>
+          <!-- Get Libs -->
           <plugin>
-            <artifactId>maven-antrun-plugin</artifactId>
+            <artifactId>maven-dependency-plugin</artifactId>
             <executions>
               <execution>
-                <id>create-drop-tables</id>
-                <phase>pre-integration-test</phase>
+                <id>get.config.tool</id>
+                <phase>generate-resources</phase>
                 <goals>
-                  <goal>run</goal>
+                  <goal>copy-dependencies</goal>
                 </goals>
                 <configuration>
-                  <tasks>
-                    < !- - 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"/>
-                    <property name="plugin_classpath" refid="maven.plugin.classpath"/>
-
-                    <property name="maven.runtime.classpath" refid="maven.runtime.classpath" />
-                    <ant antfile="target/test-classes/antrun-create_drop.xml" target="drop-tables" />
-                  </tasks>
+                  <outputDirectory>target/libs</outputDirectory>
                 </configuration>
               </execution>
             </executions>
           </plugin>
-        </plugins>
-      </build>
-    </profile>
-
-    <profile>
-      <id>create-tables</id>
-      <build>
-        <plugins>
+          <!-- Execute config tool -->
           <plugin>
             <artifactId>maven-antrun-plugin</artifactId>
             <executions>
               <execution>
-                <id>create-drop-tables</id>
-                <phase>pre-integration-test</phase>
+                <id>drop.create.db</id>
+                <phase>process-resources</phase>
                 <goals>
                   <goal>run</goal>
                 </goals>
                 <configuration>
                   <tasks>
-                    < !- - 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"/>
-                    <property name="plugin_classpath" refid="maven.plugin.classpath"/>
-
-                    <property name="maven.runtime.classpath" refid="maven.runtime.classpath" />
-                    <ant antfile="target/test-classes/antrun-create_drop.xml" target="create-tables" />                    
+                    <ant antfile="../distro/src/main/resources/config-tool/build.xml" 
+                         target="db.drop.create" 
+                         inheritall="false">
+                      <property name="database" value="${database}" />
+                      <property name="config.files.dir" value="${basedir}/target/config.tool/config.files" />
+                      <property name="tmp.dir" value="${basedir}/target/config.tool/tmp" />
+                      <property name="db.scripts.dir" value="${basedir}/target/config.tool/db.scripts" />
+                      <property name="libs.dir" value="${basedir}/target/libs" />
+                    </ant>
                   </tasks>
                 </configuration>
               </execution>
@@ -159,29 +106,6 @@
         </plugins>
       </build>
     </profile>
-    <profile>
-      <id>oracle</id>
-      <activation>
-        <property>
-          <name>database</name>
-          <value>oracle</value>
-        </property>
-      </activation>
-      <dependencies>
-        <dependency>
-          <groupId>com.oracle</groupId>
-          <artifactId>ojdbc14</artifactId>
-          <version>${oracle.version}</version>
-          <scope>test</scope>
-        </dependency>
-      </dependencies>
-      <repositories>
-        <repository>
-          <id>qa.jboss.com</id>
-          <url>http://www.qa.jboss.com/jdbc-drivers/maven2</url>
-        </repository>
-      </repositories>
-    </profile>
   </profiles>
- -->
+
 </project>
\ No newline at end of file

Modified: jbpm4/branches/tbaeyens/modules/distro/.settings/attachedFile.properties
===================================================================
--- jbpm4/branches/tbaeyens/modules/distro/.settings/attachedFile.properties	2009-03-06 09:07:19 UTC (rev 4166)
+++ jbpm4/branches/tbaeyens/modules/distro/.settings/attachedFile.properties	2009-03-06 14:12:52 UTC (rev 4167)
@@ -1,2 +1,2 @@
 ## index of importer -> set(imports)
-#Fri Mar 06 08:56:41 CET 2009
+#Fri Mar 06 09:50:03 CET 2009

Modified: jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/build.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/build.xml	2009-03-06 09:07:19 UTC (rev 4166)
+++ jbpm4/branches/tbaeyens/modules/distro/src/main/resources/config-tool/build.xml	2009-03-06 14:12:52 UTC (rev 4167)
@@ -22,9 +22,9 @@
 	        description="creates a full set of jbpm configuration files">
 
   	<concat destfile="${config.files.dir}/jbpm.hibernate.cfg.xml">
-      <filelist dir=".">
+      <filelist dir="${resolved.dir}">
         <file name="hibernate/cfg/part1.jbpm.hibernate.cfg.xml" />
-        <file name="${resolved.dir}/hibernate/${connection.type}/${database}.xml"/>
+        <file name="hibernate/${connection.type}/${database}.xml"/>
         <file name="hibernate/other/format.sql.${format.sql}.xml"/>
         <file name="hibernate/cache/${cache}.xml"/>
         <file name="hibernate/mapping.references/pvm.xml"/>

Modified: jbpm4/branches/tbaeyens/modules/examples/pom.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/examples/pom.xml	2009-03-06 09:07:19 UTC (rev 4166)
+++ jbpm4/branches/tbaeyens/modules/examples/pom.xml	2009-03-06 14:12:52 UTC (rev 4167)
@@ -59,4 +59,42 @@
     </dependency>
   </dependencies>
 
+
+  <profiles>
+    <!-- -Ddatabase= -->
+    <profile>
+      <id>database.config.overwrite</id>
+      <activation>
+        <property>
+          <name>database</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <executions>
+              <execution>
+                <phase>test-compile</phase>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+                <configuration>
+                  <tasks>
+                    <echo>Overwriting db configuration for ${database}</echo>
+                    <ant antfile="../distro/src/main/resources/config-tool/build.xml" target="create.configuration.files" inheritall="false">
+                      <property name="config.files.dir" value="${basedir}/target/test-classes" />
+                      <property name="tmp.dir" value="${basedir}/target/config-tmp" />
+                      <property name="database" value="${database}" />
+                    </ant>
+                  </tasks>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+
 </project>
\ No newline at end of file

Deleted: jbpm4/branches/tbaeyens/modules/jpdl/src/test/java/org/jbpm/test/xml/DbGenTest.java
===================================================================
--- jbpm4/branches/tbaeyens/modules/jpdl/src/test/java/org/jbpm/test/xml/DbGenTest.java	2009-03-06 09:07:19 UTC (rev 4166)
+++ jbpm4/branches/tbaeyens/modules/jpdl/src/test/java/org/jbpm/test/xml/DbGenTest.java	2009-03-06 14:12:52 UTC (rev 4167)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.test.xml;
-
-import org.jbpm.test.JbpmTestCase;
-import org.jbpm.Execution;
-
-/**
- * A simple test execution that force the generation of the
- * hypersomic database structure.
- * 
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class DbGenTest extends JbpmTestCase
-{
-
-  public void testWaitStatesSequence() {
-    deployJpdlResource("org/jbpm/test/xml/process.jpdl.xml");
-
-    Execution execution = executionService.startProcessInstanceByKey("StateSequence");
-    assertEquals("a", execution.getActivityName());
-
-    String executionId = execution.getId();
-    execution = executionService.signalExecutionById(executionId);
-    assertEquals("b", execution.getActivityName());
-
-    execution = executionService.signalExecutionById(executionId);
-    assertEquals("c", execution.getActivityName());
-  }
-}

Modified: jbpm4/branches/tbaeyens/modules/test-db/pom.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/test-db/pom.xml	2009-03-06 09:07:19 UTC (rev 4166)
+++ jbpm4/branches/tbaeyens/modules/test-db/pom.xml	2009-03-06 14:12:52 UTC (rev 4167)
@@ -41,4 +41,41 @@
 
   </dependencies>
 
+  <profiles>
+    <!-- -Ddatabase= -->
+    <profile>
+      <id>database.config.overwrite</id>
+      <activation>
+        <property>
+          <name>database</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <executions>
+              <execution>
+                <phase>test-compile</phase>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+                <configuration>
+                  <tasks>
+                    <echo>Overwriting db configuration for ${database}</echo>
+                    <ant antfile="../distro/src/main/resources/config-tool/build.xml" target="create.configuration.files" inheritall="false">
+                      <property name="config.files.dir" value="${basedir}/target/test-classes" />
+                      <property name="tmp.dir" value="${basedir}/target/config-tmp" />
+                      <property name="database" value="${database}" />
+                    </ant>
+                  </tasks>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+
 </project>
\ No newline at end of file

Modified: jbpm4/branches/tbaeyens/pom.xml
===================================================================
--- jbpm4/branches/tbaeyens/pom.xml	2009-03-06 09:07:19 UTC (rev 4166)
+++ jbpm4/branches/tbaeyens/pom.xml	2009-03-06 14:12:52 UTC (rev 4167)
@@ -351,10 +351,6 @@
           <artifactId>maven-assembly-plugin</artifactId>
           <version>2.2-beta-2</version>
         </plugin>
-        <!--
-          <plugin> <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-dependency-plugin</artifactId> </plugin>
-        -->
         <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>build-helper-maven-plugin</artifactId>
@@ -444,11 +440,7 @@
         </plugins>
       </build>
     </profile>
-
-    <!--
-       Name:  no-database
-       Descr: Setup the default database
-       -->
+    
     <profile>
       <id>no-database</id>
       <activation>
@@ -456,9 +448,6 @@
           <name>!database</name>
         </property>
       </activation>
-      <properties>
-        <database>hsqldb</database>
-      </properties>
       <dependencies>
         <dependency>
           <groupId>hsqldb</groupId>
@@ -468,28 +457,6 @@
       </dependencies>
     </profile>
 
-    <!--
-        Name:  hsqldb
-        Descr: Hypersonic Database Setup
-        -->
-    <profile>
-      <id>hsqldb</id>
-      <activation>
-        <property>
-          <name>database</name>
-          <value>hsqldb</value>
-        </property>
-      </activation>
-      <dependencies>
-        <dependency>
-          <groupId>hsqldb</groupId>
-          <artifactId>hsqldb</artifactId>
-          <scope>test</scope>
-        </dependency>
-      </dependencies>
-    </profile>
-
-
     <!-- -Ddatabase=oracle -->
     <profile>
       <id>oracle</id>




More information about the jbpm-commits mailing list