[jbpm-commits] JBoss JBPM SVN: r4614 - in jbpm4/branches/tbaeyens: modules/db and 7 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Fri Apr 24 11:51:44 EDT 2009
Author: tom.baeyens at jboss.com
Date: 2009-04-24 11:51:43 -0400 (Fri, 24 Apr 2009)
New Revision: 4614
Added:
jbpm4/branches/tbaeyens/modules/db/scripts/
jbpm4/branches/tbaeyens/modules/db/src/main/config/
jbpm4/branches/tbaeyens/modules/db/src/main/config/hsqldb.hibernate.cfg.xml
jbpm4/branches/tbaeyens/modules/db/src/main/config/mysql.hibernate.cfg.xml
jbpm4/branches/tbaeyens/modules/db/src/main/config/oracle.hibernate.cfg.xml
jbpm4/branches/tbaeyens/modules/db/src/main/config/postgresql.hibernate.cfg.xml
jbpm4/branches/tbaeyens/modules/distro/src/main/files/db/
jbpm4/branches/tbaeyens/modules/distro/src/main/files/db/build.xml
jbpm4/branches/tbaeyens/modules/distro/src/main/files/db/jdbc.properties
Removed:
jbpm4/branches/tbaeyens/modules/db/src/main/ant/
Modified:
jbpm4/branches/tbaeyens/modules/db/
jbpm4/branches/tbaeyens/modules/db/pom.xml
jbpm4/branches/tbaeyens/modules/distro/scripts/assembly-distro.xml
jbpm4/branches/tbaeyens/modules/distro/src/main/files/jboss/build.xml
jbpm4/branches/tbaeyens/pom.xml
jbpm4/branches/tbaeyens/qa/build.xml
Log:
adding database schema creation
Property changes on: jbpm4/branches/tbaeyens/modules/db
___________________________________________________________________
Name: svn:ignore
- *.iml
target
.settings
+ *.iml
target
.settings
Modified: jbpm4/branches/tbaeyens/modules/db/pom.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/db/pom.xml 2009-04-24 13:38:29 UTC (rev 4613)
+++ jbpm4/branches/tbaeyens/modules/db/pom.xml 2009-04-24 15:51:43 UTC (rev 4614)
@@ -51,112 +51,29 @@
</dependency>
</dependencies>
- <profiles>
- <!--profile>
- <id>database</id>
- <activation>
- <property>
- <name>database</name>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>get.config.tool</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <overWriteSnapshots>true</overWriteSnapshots>
- <outputDirectory>target/libs</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile-->
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>create-db-schemas</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property name="maven.runtime.classpath" refid="maven.runtime.classpath"/>
+ <ant antfile="scripts/antrun-schema.xml"
+ target="create-schema">
+ </ant>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
- <profile>
- <id>drop-tables</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>create-drop-tables</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <ant antfile="../distro/src/main/resources/config-tool/build.xml"
- target="db.drop"
- inheritall="false">
-
- <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="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>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <profile>
- <id>create-tables</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>create-drop-tables</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <ant antfile="../distro/src/main/resources/config-tool/build.xml"
- target="db.create"
- inheritall="false">
-
- <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="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>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- </profiles>
-
</project>
\ No newline at end of file
Added: jbpm4/branches/tbaeyens/modules/db/src/main/config/hsqldb.hibernate.cfg.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/db/src/main/config/hsqldb.hibernate.cfg.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/db/src/main/config/hsqldb.hibernate.cfg.xml 2009-04-24 15:51:43 UTC (rev 4614)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+
+ <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
+ <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
+ <property name="hibernate.format_sql">true</property>
+
+ <mapping resource="jbpm.repository.hbm.xml" />
+ <mapping resource="jbpm.execution.hbm.xml" />
+ <mapping resource="jbpm.history.hbm.xml" />
+ <mapping resource="jbpm.task.hbm.xml" />
+ <mapping resource="jbpm.jpdl.hbm.xml" />
+ <mapping resource="jbpm.identity.hbm.xml" />
+
+ </session-factory>
+</hibernate-configuration>
Property changes on: jbpm4/branches/tbaeyens/modules/db/src/main/config/hsqldb.hibernate.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/branches/tbaeyens/modules/db/src/main/config/mysql.hibernate.cfg.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/db/src/main/config/mysql.hibernate.cfg.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/db/src/main/config/mysql.hibernate.cfg.xml 2009-04-24 15:51:43 UTC (rev 4614)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+
+ <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
+ <property name="hibernate.format_sql">true</property>
+
+ <mapping resource="jbpm.repository.hbm.xml" />
+ <mapping resource="jbpm.execution.hbm.xml" />
+ <mapping resource="jbpm.history.hbm.xml" />
+ <mapping resource="jbpm.task.hbm.xml" />
+ <mapping resource="jbpm.jpdl.hbm.xml" />
+ <mapping resource="jbpm.identity.hbm.xml" />
+
+ </session-factory>
+</hibernate-configuration>
Property changes on: jbpm4/branches/tbaeyens/modules/db/src/main/config/mysql.hibernate.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/branches/tbaeyens/modules/db/src/main/config/oracle.hibernate.cfg.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/db/src/main/config/oracle.hibernate.cfg.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/db/src/main/config/oracle.hibernate.cfg.xml 2009-04-24 15:51:43 UTC (rev 4614)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+
+ <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
+ <property name="hibernate.format_sql">true</property>
+
+ <mapping resource="jbpm.repository.hbm.xml" />
+ <mapping resource="jbpm.execution.hbm.xml" />
+ <mapping resource="jbpm.history.hbm.xml" />
+ <mapping resource="jbpm.task.hbm.xml" />
+ <mapping resource="jbpm.jpdl.hbm.xml" />
+ <mapping resource="jbpm.identity.hbm.xml" />
+
+ </session-factory>
+</hibernate-configuration>
Property changes on: jbpm4/branches/tbaeyens/modules/db/src/main/config/oracle.hibernate.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/branches/tbaeyens/modules/db/src/main/config/postgresql.hibernate.cfg.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/db/src/main/config/postgresql.hibernate.cfg.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/db/src/main/config/postgresql.hibernate.cfg.xml 2009-04-24 15:51:43 UTC (rev 4614)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+
+ <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
+ <property name="hibernate.format_sql">true</property>
+
+ <mapping resource="jbpm.repository.hbm.xml" />
+ <mapping resource="jbpm.execution.hbm.xml" />
+ <mapping resource="jbpm.history.hbm.xml" />
+ <mapping resource="jbpm.task.hbm.xml" />
+ <mapping resource="jbpm.jpdl.hbm.xml" />
+ <mapping resource="jbpm.identity.hbm.xml" />
+
+ </session-factory>
+</hibernate-configuration>
Property changes on: jbpm4/branches/tbaeyens/modules/db/src/main/config/postgresql.hibernate.cfg.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: jbpm4/branches/tbaeyens/modules/distro/scripts/assembly-distro.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/distro/scripts/assembly-distro.xml 2009-04-24 13:38:29 UTC (rev 4613)
+++ jbpm4/branches/tbaeyens/modules/distro/scripts/assembly-distro.xml 2009-04-24 15:51:43 UTC (rev 4614)
@@ -121,6 +121,13 @@
<outputDirectory>doc/schemadocs</outputDirectory>
</fileSet>
<fileSet>
+ <directory>../db/target</directory>
+ <outputDirectory>db/schema.scripts</outputDirectory>
+ <includes>
+ <include>*.sql</include>
+ </includes>
+ </fileSet>
+ <fileSet>
<directory>../devguide/target/docbook/publish/en</directory>
<outputDirectory>doc/devguide</outputDirectory>
<excludes>
Added: jbpm4/branches/tbaeyens/modules/distro/src/main/files/db/build.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/distro/src/main/files/db/build.xml (rev 0)
+++ jbpm4/branches/tbaeyens/modules/distro/src/main/files/db/build.xml 2009-04-24 15:51:43 UTC (rev 4614)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project name="jbpm.db.install">
+
+ <!-- this allows for developer-specific configurations -->
+ <property file="jdbc.properties" />
+
+ <property name="jbpm.home" value="c:/software/jbpm-4.0.0-SNAPSHOT" />
+ <property name="database" value="hsqldb" />
+
+ <!-- ### CREATE JBPM SCHEMA ############################################# -->
+ <target name="create.jbpm.schema">
+ <sql driver="${jdbc.driver}"
+ url="${jdbc.url}"
+ userid="${jdbc.username}"
+ password="${jdbc.password}"
+ onerror="continue">
+ <transaction src="${jbpm.home}/db/schema.scripts/jbpm.${database}.create.sql"/>
+ <classpath>
+ <fileset dir="${jbpm.home}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </classpath>
+ </sql>
+ </target>
+
+ <!-- ### DROP JBPM SCHEMA ############################################### -->
+ <target name="drop.jbpm.schema">
+ <sql driver="${jdbc.driver}"
+ url="${jdbc.url}"
+ userid="${jdbc.username}"
+ password="${jdbc.password}"
+ onerror="continue">
+ <transaction src="${jbpm.home}/db/schema.scripts/jbpm.${database}.drop.sql"/>
+ <classpath>
+ <fileset dir="${jbpm.home}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </classpath>
+ </sql>
+ </target>
+
+ <!-- ### START HSQLDB DATABASE MGR ##################################### -->
+ <target name="hsqldb.databasemanager">
+ <java classname="org.hsqldb.util.DatabaseManager">
+ <arg line="-url jdbc:hsqldb:hsql://localhost/jbpm4DB"/>
+ <classpath>
+ <fileset dir="${jbpm.home}/lib">
+ <include name="hsqldb.jar"/>
+ </fileset>
+ </classpath>
+ </java>
+ </target>
+
+</project>
Property changes on: jbpm4/branches/tbaeyens/modules/distro/src/main/files/db/build.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: jbpm4/branches/tbaeyens/modules/distro/src/main/files/db/jdbc.properties
===================================================================
--- jbpm4/branches/tbaeyens/modules/distro/src/main/files/db/jdbc.properties (rev 0)
+++ jbpm4/branches/tbaeyens/modules/distro/src/main/files/db/jdbc.properties 2009-04-24 15:51:43 UTC (rev 4614)
@@ -0,0 +1,4 @@
+jdbc.driver=org.hsqldb.jdbcDriver
+jdbc.url=jdbc:hsqldb:hsql://localhost/jbpm4DB
+jdbc.username=sa
+jdbc.password=
Property changes on: jbpm4/branches/tbaeyens/modules/distro/src/main/files/db/jdbc.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: jbpm4/branches/tbaeyens/modules/distro/src/main/files/jboss/build.xml
===================================================================
--- jbpm4/branches/tbaeyens/modules/distro/src/main/files/jboss/build.xml 2009-04-24 13:38:29 UTC (rev 4613)
+++ jbpm4/branches/tbaeyens/modules/distro/src/main/files/jboss/build.xml 2009-04-24 15:51:43 UTC (rev 4614)
@@ -29,7 +29,7 @@
<!-- ### MAIN TARGET TO INSTALL JBPM INTO JBOSS ######################### -->
- <target name="install.jbpm.into.jboss">
+ <target name="install.jbpm.into.jboss" description="installs jBPM into JBoss">
<antcall target="install.jbpm.into.jboss.generics" />
<antcall target="install.jbpm.into.jboss.500specifics" />
<antcall target="install.jbpm.into.jboss.db.hsqldb" />
@@ -152,4 +152,24 @@
<get src="${jboss.distro.url}" dest="${jboss.distro.local.path}" />
</target>
+ <!-- ### JBOSS START ################################################### -->
+ <target name="jboss.start" description="starts jboss and waits till jboss is booted, then lets jboss run in the background">
+ <taskdef name="start-jboss"
+ classname="org.jbpm.pvm.internal.ant.StartJBossTask">
+ <classpath>
+ <fileset dir="${jbpm.home}">
+ <include name="jbpm.jar" />
+ </fileset>
+ </classpath>
+ </taskdef>
+ <start-jboss jbosshome="${jboss.home}" />
+ </target>
+
+ <!-- ### JBOSS STOP ################################################### -->
+ <target name="jboss.stop" description="signals jboss to stop, but doesn't wait till its finished">
+ <exec executable="${jboss.home}/bin/shutdown.bat" os="Windows Vista, Windows XP,Windows 2000,Windows 98">
+ <arg line="-S"/>
+ </exec>
+ </target>
+
</project>
Modified: jbpm4/branches/tbaeyens/pom.xml
===================================================================
--- jbpm4/branches/tbaeyens/pom.xml 2009-04-24 13:38:29 UTC (rev 4613)
+++ jbpm4/branches/tbaeyens/pom.xml 2009-04-24 15:51:43 UTC (rev 4614)
@@ -430,6 +430,7 @@
<id>distro</id>
<modules>
<module>modules/enterprise</module>
+ <module>modules/db</module>
<module>modules/devguide</module>
<module>modules/userguide</module>
<module>modules/distro</module>
Modified: jbpm4/branches/tbaeyens/qa/build.xml
===================================================================
--- jbpm4/branches/tbaeyens/qa/build.xml 2009-04-24 13:38:29 UTC (rev 4613)
+++ jbpm4/branches/tbaeyens/qa/build.xml 2009-04-24 15:51:43 UTC (rev 4614)
@@ -12,6 +12,7 @@
<property name="jbpm.distro.url" value="${maven.repository}/org/jbpm/jbpm4/jbpm-distro/${jbpm.version}/${jbpm.filename}" />
<property name="tmp.dir" value="c:/temp/jbpmqa" />
<property name="jbpm.home" value="c:/software/jbpm-${jbpm.version}" />
+ <property name="jboss.home" value="c:/software/jboss-5.0.0.GA" />
<target name="check.jbpm.home" unless="jbpm.home">
<fail message="specify jbpm.home like this: ant -Djbpm.home=... targetname" />
@@ -28,5 +29,11 @@
</target>
<target name="reinstall.jbpm" depends="delete.jbpm.installation, install.jbpm" />
+
+ <target name="reinstall.jboss">
+ <ant antfile="${jbpm.home}/jboss/build.xml" target="reinstall.jboss">
+ <property name="jboss.home" value="${jboss.home}" />
+ </ant>
+ </target>
</project>
More information about the jbpm-commits
mailing list