Skip to content

Commit

Permalink
refactor(database): improve database support, clean maven profiles
Browse files Browse the repository at this point in the history
parent:
- rename database driver properties

database:
- introduce database-settings pom, contains shared database settings, engine and qa pom inherit from it

engine:
- remove checkspring, upgradeDatabase and testSchemaMetaData profiles
- rename postgres to postgresql, mssql to sqlserver, remove not needed versions
- change property file based database check mechanism to use only profiles

qa:
-

qa/glassfish:
- add domain-xa.xml to get rid of some maven properties
- s

qa/jboss/wildfly:
- support oracle-10 and -11 for testing
- align database profile names to the ones used in engine

qa/engine-it/webapps-it:
- move duplicate stuff to database-settings pom

settings/nexus-settings.xml
- add database properties

related to #CAM-3301
  • Loading branch information
hawky-4s- committed Jan 20, 2015
1 parent 8fdbf3b commit 07d4c4e
Show file tree
Hide file tree
Showing 57 changed files with 1,030 additions and 790 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,22 @@ The integration testsuites are located under `qa/`. There you'll find a folder n
In order to run the integration tests, first perform a full install build. Then navigate to the `qa` folder.

We have different maven profiles for selecting
* *Runtime containers & environments*: jboss, glassfish, tomcat
* *Runtime containers & environments*: jboss, glassfish, tomcat, wildfly
* *The testsuite*: engine-integration, webapps-integration
* *The database*: h2,h2-xa,db2,db2-xa,mssql,mssql-xa,oracle,oracle-xa,postgres,postgres-xa,mysql,mysql-xa (XA is only supprted on JBoss & Glassfish ATM)
* *The database*: h2,h2-xa,db2,db2-xa,sqlserver,sqlserver-xa,oracle,oracle-xa,postgresql,postgresql-xa,mysql,mysql-xa (XA is only supprted on JBoss & Glassfish ATM)

In order to configure the build, compose the profiles for runtime container, testsuite, database. Example:

```
mvn clean install -Pengine-integration,jboss,h2
```

If you want to test against an XA database, just add the corresponding XA database profile to the mvn cmdline above. Example:

```
mvn clean install -Pengine-integration,jboss,postgresql,postgresql-xa
```

You can select multiple testsuites but only a single database and a single runtime container. This is valid:

```
Expand Down
163 changes: 163 additions & 0 deletions database/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http:https://maven.apache.org/POM/4.0.0" xmlns:xsi="http:https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http:https://maven.apache.org/POM/4.0.0 http:https://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-parent</artifactId>
<relativePath>../parent</relativePath>
<version>7.3.0-SNAPSHOT</version>
</parent>

<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-database-settings</artifactId>
<packaging>pom</packaging>
<name>camunda BPM - database settings</name>

<properties>
</properties>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${version.mysql}</version>
</dependency>
<dependency>
<groupId>com.oracle.jdbc</groupId>
<artifactId>ojdbc6</artifactId>
<version>${version.oracle-11}</version>
</dependency>
<dependency>
<groupId>com.oracle.jdbc</groupId>
<artifactId>ojdbc14</artifactId>
<version>${version.oracle-10}</version>
</dependency>
<dependency>
<groupId>com.ibm.db2.jcc</groupId>
<artifactId>db2jcc4</artifactId>
<version>${version.db2}</version>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
<version>${version.sqlserver}</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${version.postgresql}</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${version.h2}</version>
</dependency>
</dependencies>
<configuration>
<driver>${database.driver}</driver>
<url>${database.url}</url>
<username>${database.username}</username>
<password>${database.password}</password>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

<profiles>
<profile>
<id>db2</id>
<properties>
<database.type>db2</database.type>
<database.driver>com.ibm.db2.jcc.DB2Driver</database.driver>
<database.datasource.class>com.ibm.db2.jcc.DB2SimpleDataSource</database.datasource.class>
</properties>
</profile>
<profile>
<id>db2-xa</id>
<properties>
<database.datasource.class>com.ibm.db2.jcc.DB2XADataSource</database.datasource.class>
</properties>
</profile>
<profile>
<id>h2</id>
<properties>
<database.host>${project.parent.basedir}/target/h2/</database.host>
<database.name>process-engine</database.name>
<database.username>sa</database.username>
<database.password>sa</database.password>
<database.port>18080</database.port>
<!-- This url has to consistent for the subprojects: {server}-runtime and webapp-integration-tests -->
<database.url>jdbc:h2:${database.host}${database.name};MVCC=TRUE;AUTO_SERVER=TRUE;AUTO_SERVER_PORT=${database.port}</database.url>

<database.type>h2</database.type>
<database.driver>org.h2.Driver</database.driver>
<database.datasource.class>org.h2.jdbcx.JdbcDataSource</database.datasource.class>
</properties>
</profile>
<profile>
<id>mysql</id>
<properties>
<database.type>mysql</database.type>
<database.driver>com.mysql.jdbc.Driver</database.driver>
<database.datasource.class>com.mysql.jdbc.jdbc2.optional.MysqlDataSource</database.datasource.class>
</properties>
</profile>
<profile>
<id>mysql-xa</id>
<properties>
<database.datasource.class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</database.datasource.class>
</properties>
</profile>
<profile>
<id>oracle</id>
<properties>
<database.type>oracle</database.type>
<database.driver>oracle.jdbc.OracleDriver</database.driver>
<database.datasource.class>oracle.jdbc.pool.OracleDataSource</database.datasource.class>
</properties>
</profile>
<profile>
<id>oracle-xa</id>
<properties>
<database.datasource.class>oracle.jdbc.xa.client.OracleXADataSource</database.datasource.class>
</properties>
</profile>
<profile>
<id>postgresql</id>
<properties>
<database.type>postgres</database.type>
<database.driver>org.postgresql.Driver</database.driver>
<database.datasource.class>org.postgresql.ds.PGSimpleDataSource</database.datasource.class>
</properties>
</profile>
<profile>
<id>postgresql-xa</id>
<properties>
<database.datasource.class>org.postgresql.xa.PGXADataSource</database.datasource.class>
</properties>
</profile>
<profile>
<id>sqlserver</id>
<properties>
<database.type>mssql</database.type>
<database.driver>com.microsoft.sqlserver.jdbc.SQLServerDriver</database.driver>
<database.datasource.class>com.microsoft.sqlserver.jdbc.SQLServerDataSource</database.datasource.class>
</properties>
</profile>
<profile>
<id>sqlserver-xa</id>
<properties>
<database.datasource.class>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</database.datasource.class>
</properties>
</profile>
</profiles>

</project>
Loading

0 comments on commit 07d4c4e

Please sign in to comment.