[jbpm-commits] JBoss JBPM SVN: r3499 - in jbpm4/trunk: modules/db and 4 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Mon Dec 22 06:21:33 EST 2008
Author: tom.baeyens at jboss.com
Date: 2008-12-22 06:21:33 -0500 (Mon, 22 Dec 2008)
New Revision: 3499
Modified:
jbpm4/trunk/build.xml
jbpm4/trunk/modules/db/.project
jbpm4/trunk/modules/db/pom.xml
jbpm4/trunk/modules/db/src/main/ant/build.schema.xml
jbpm4/trunk/modules/db/src/main/resources/db.properties/oracle.properties
jbpm4/trunk/modules/test-load/pom.xml
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/JobExecutorTest.java
jbpm4/trunk/pom.xml
Log:
adding database support
Modified: jbpm4/trunk/build.xml
===================================================================
--- jbpm4/trunk/build.xml 2008-12-20 17:03:13 UTC (rev 3498)
+++ jbpm4/trunk/build.xml 2008-12-22 11:21:33 UTC (rev 3499)
@@ -19,7 +19,8 @@
<property name="linux.browser" value="mozilla" />
<property name="distro.installation.dir" value="c:/software" />
<property name="distro.version" value="4.0.0-SNAPSHOT" />
- <property name="distro.eclipse" value="c:/downloads/eclipse/eclipse-SDK-3.4.1-win32.zip" />
+ <property name="distro.eclipse" value="c:/downloads/eclipse/eclipse-jee-ganymede-SR1-win32.zip" />
+ <property name="distro.gef" value="c:/downloads/eclipse/GEF-runtime-3.4.1.zip" />
<target name="clean">
<exec executable="cmd">
@@ -62,8 +63,12 @@
<target name="distro.install" >
<delete dir="${distro.installation.dir}/jbpm-${distro.version}" />
- <unzip dest="${distro.installation.dir}" src="modules/distro/target/jbpm-${distro.version}.zip"/>
- <unzip dest="${distro.installation.dir}/jbpm-${distro.version}" src="${distro.eclipse}"/>
+ <unzip src="modules/distro/target/jbpm-${distro.version}.zip" dest="${distro.installation.dir}" />
+ <unzip src="${distro.eclipse}" dest="${distro.installation.dir}/jbpm-${distro.version}" />
+ <unzip src="${distro.gef}" dest="${distro.installation.dir}/jbpm-${distro.version}" />
+ <unzip src="${distro.installation.dir}/jbpm-${distro.version}/gpd/jbpm-gpd-site.zip"
+ dest="${distro.installation.dir}/jbpm-${distro.version}/eclipse"
+ overwrite="false" />
<exec executable="cmd" os="Windows Vista, Windows XP,Windows 2000,Windows 98">
<arg line="/C start "${distro.installation.dir}/jbpm-${distro.version}/eclipse/eclipse.exe" "-data" "${distro.installation.dir}/jbpm-${distro.version}/workspace"" />
</exec>
Modified: jbpm4/trunk/modules/db/.project
===================================================================
--- jbpm4/trunk/modules/db/.project 2008-12-20 17:03:13 UTC (rev 3498)
+++ jbpm4/trunk/modules/db/.project 2008-12-22 11:21:33 UTC (rev 3499)
@@ -6,18 +6,18 @@
</projects>
<buildSpec>
<buildCommand>
- <name>org.maven.ide.eclipse.maven2Builder</name>
+ <name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
- <name>org.eclipse.stp.bpmn.validation.BatchValidationBuilder</name>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.maven.ide.eclipse.maven2Nature</nature>
- <nature>org.eclipse.stp.bpmn.validation.BatchValidationBuildAbleNature</nature>
</natures>
</projectDescription>
Modified: jbpm4/trunk/modules/db/pom.xml
===================================================================
--- jbpm4/trunk/modules/db/pom.xml 2008-12-20 17:03:13 UTC (rev 3498)
+++ jbpm4/trunk/modules/db/pom.xml 2008-12-22 11:21:33 UTC (rev 3499)
@@ -51,12 +51,6 @@
<!-- Plugins -->
<build>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- </resource>
- </resources>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
Modified: jbpm4/trunk/modules/db/src/main/ant/build.schema.xml
===================================================================
--- jbpm4/trunk/modules/db/src/main/ant/build.schema.xml 2008-12-20 17:03:13 UTC (rev 3498)
+++ jbpm4/trunk/modules/db/src/main/ant/build.schema.xml 2008-12-22 11:21:33 UTC (rev 3499)
@@ -43,10 +43,12 @@
<schemaexport properties="src/main/resources/db.properties/oracle.properties"
output="target/classes/create/jbpm.oracle.create.sql"
- create="yes" drop="no" config="${cfg}" text="yes" />
+ create="yes" drop="no" config="${cfg}" text="yes"
+ delimiter=";" />
<schemaexport properties="src/main/resources/db.properties/oracle.properties"
output="target/classes/drop/jbpm.oracle.drop.sql"
- create="no" drop="yes" config="${cfg}" text="yes" />
+ create="no" drop="yes" config="${cfg}" text="yes"
+ delimiter=";" />
<schemaexport properties="src/main/resources/db.properties/postgresql.properties"
output="target/classes/create/jbpm.postgresql.create.sql"
Modified: jbpm4/trunk/modules/db/src/main/resources/db.properties/oracle.properties
===================================================================
--- jbpm4/trunk/modules/db/src/main/resources/db.properties/oracle.properties 2008-12-20 17:03:13 UTC (rev 3498)
+++ jbpm4/trunk/modules/db/src/main/resources/db.properties/oracle.properties 2008-12-22 11:21:33 UTC (rev 3499)
@@ -4,10 +4,13 @@
# fetch driver from http://www.oracle.com
hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver
-hibernate.connection.url=jdbc:oracle:thin:@[jdbc.server]:1521:[jdbc.dbname]
-hibernate.connection.username=[jdbc.username]
-hibernate.connection.password=[jdbc.password]
+hibernate.connection.url=jdbc:oracle:thin:@${jdbc.server}:1521:${jdbc.dbname}
+hibernate.connection.username=${jdbc.username}
+hibernate.connection.password=${jdbc.password}
hibernate.query.substitutions=true 1, false 0
hibernate.cache.use_second_level_cache=true
hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider
+
+# hibernate.hbm2ddl.auto=create-drop
+
Modified: jbpm4/trunk/modules/test-load/pom.xml
===================================================================
--- jbpm4/trunk/modules/test-load/pom.xml 2008-12-20 17:03:13 UTC (rev 3498)
+++ jbpm4/trunk/modules/test-load/pom.xml 2008-12-22 11:21:33 UTC (rev 3499)
@@ -44,6 +44,12 @@
<artifactId>jbpm-jpdl</artifactId>
<version>${version}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.jbpm.jbpm4</groupId>
+ <artifactId>jbpm-db</artifactId>
+ <version>${version}</version>
+ </dependency>
<!-- TODO remove PVM dependency for compilation (keep it for test)-->
<dependency>
@@ -52,15 +58,7 @@
<version>${version}</version>
<scope>test</scope>
</dependency>
-
- <dependency>
- <groupId>org.jbpm.jbpm4</groupId>
- <artifactId>jbpm-db</artifactId>
- <version>${version}</version>
- </dependency>
</dependencies>
- <!-- Plugins -->
-
</project>
\ No newline at end of file
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/JobExecutorTest.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/JobExecutorTest.java 2008-12-20 17:03:13 UTC (rev 3498)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/JobExecutorTest.java 2008-12-22 11:21:33 UTC (rev 3499)
@@ -61,11 +61,11 @@
static Map<String, Set<Long>> exclusiveThreadIds;
static List<Integer> failOnceMessageIds;
- static int nbrOfTestMessages = 500;
- static int timeoutMillis = 10 * 60 * 1000; // 10 minutes
+ static int nbrOfTestMessages = 10;
+ static int timeoutMillis = 2 * 60 * 1000; // 10 minutes
static int checkInterval = 400;
- static int nbrOfTestMessagesPerExecution = 10;
- static int nbrOfTestExecutions = 20;
+ static int nbrOfTestMessagesPerExecution = 5;
+ static int nbrOfTestExecutions = 5;
CommandService commandService;
Modified: jbpm4/trunk/pom.xml
===================================================================
--- jbpm4/trunk/pom.xml 2008-12-20 17:03:13 UTC (rev 3498)
+++ jbpm4/trunk/pom.xml 2008-12-22 11:21:33 UTC (rev 3499)
@@ -158,6 +158,7 @@
<version>${cactus.version}</version>
</dependency>
</dependencies>
+
</dependencyManagement>
<scm>
@@ -263,6 +264,11 @@
<artifactId>maven-taglib-plugin</artifactId>
<version>2.3</version>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.3</version>
+ </plugin>
</plugins>
</pluginManagement>
</build>
@@ -310,8 +316,8 @@
</plugins>
</build>
</profile>
-
- <profile>
+
+ <profile>
<id>database</id>
<activation>
<property>
@@ -320,12 +326,13 @@
</activation>
<build>
<plugins>
+
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack.jbpm.db</id>
- <phase>test-compile</phase>
+ <phase>validate</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
@@ -337,32 +344,44 @@
</execution>
</executions>
</plugin>
+
<plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>resolve props</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>target/resolved.properties</outputDirectory>
+ <resources>
+ <resource>
+ <directory>target/jbpm-db/db.properties</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>install.hibernate.database.properties</id>
- <phase>test-compile</phase>
+ <phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
- <copy file="target/jbpm-db/db.properties/${database}.properties"
+ <mkdir dir="target/test-classes" />
+ <copy file="target/resolved.properties/${database}.properties"
tofile="target/test-classes/hibernate.properties"
overwrite="true"/>
- <replace file="target/test-classes/hibernate.properties"
- token="[hibernate.property.username]"
- value="${hibernate.property.username}" />
- <replace file="target/test-classes/hibernate.properties"
- token="[hibernate.property.password]"
- value="${hibernate.property.password}" />
- <replace file="target/test-classes/hibernate.properties"
- token="[hibernate.property.server]"
- value="${hibernate.property.server}" />
- <replace file="target/test-classes/hibernate.properties"
- token="[hibernate.property.dbname]"
- value="${hibernate.property.dbname}" />
</tasks>
</configuration>
</execution>
@@ -378,43 +397,49 @@
<sql src="target/jbpm-db/drop/jbpm.${database}.drop.sql"
driver="${hibernate.connection.driver_class}"
url="${hibernate.connection.url}"
- user="${hibernate.connection.username}"
- password="${hibernate.connection.password}" />
+ userid="${hibernate.connection.username}"
+ password="${hibernate.connection.password}"
+ onerror="continue">
+ <classpath>
+ <path refid="maven.test.classpath" />
+ </classpath>
+ </sql>
<sql src="target/jbpm-db/create/jbpm.${database}.create.sql"
driver="${hibernate.connection.driver_class}"
url="${hibernate.connection.url}"
- user="${hibernate.connection.username}"
- password="${hibernate.connection.password}" />
+ userid="${hibernate.connection.username}"
+ password="${hibernate.connection.password}"
+ onerror="continue">
+ <classpath>
+ <path refid="maven.test.classpath" />
+ </classpath>
+ </sql>
</tasks>
</configuration>
</execution>
+ <execution>
+ <id>drop.schema</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property file="target/test-classes/hibernate.properties" />
+ <sql src="target/jbpm-db/drop/jbpm.${database}.drop.sql"
+ driver="${hibernate.connection.driver_class}"
+ url="${hibernate.connection.url}"
+ userid="${hibernate.connection.username}"
+ password="${hibernate.connection.password}">
+ <classpath>
+ <path refid="maven.test.classpath" />
+ </classpath>
+ </sql>
+ </tasks>
+ </configuration>
+ </execution>
</executions>
</plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <failIfNoTests>false</failIfNoTests>
- <trimStackTrace>false</trimStackTrace>
- <systemProperties>
- <property>
- <name>hibernate.property.username</name>
- <value>${hibernate.property.username}</value>
- </property>
- <property>
- <name>hibernate.property.pwd</name>
- <value>${hibernate.property.pwd}</value>
- </property>
- <property>
- <name>hibernate.property.server</name>
- <value>${hibernate.property.server}</value>
- </property>
- <property>
- <name>hibernate.property.dbname</name>
- <value>${hibernate.property.dbname}</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
</plugins>
</build>
</profile>
More information about the jbpm-commits
mailing list