This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository lima. See https://gitlab.nuiton.org/chorem/lima.git commit a9201f42ede2ff183c1adf18875b3ed32f7a431c Author: David Cossé <cosse@codelutin.com> Date: Thu Oct 26 10:00:35 2017 +0200 refs #1394 [ISO] possibilité d'utiliser une base de données H2 --- lima-business/pom.xml | 5 +++++ .../main/java/org/chorem/lima/entity/LimaFlywayServiceImpl.java | 7 ++++--- pom.xml | 8 ++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/lima-business/pom.xml b/lima-business/pom.xml index 0f37000f..c302b482 100644 --- a/lima-business/pom.xml +++ b/lima-business/pom.xml @@ -101,6 +101,11 @@ <scope>compile</scope> </dependency> <dependency> + <groupId>org.postgresql</groupId> + <artifactId>postgresql</artifactId> + <scope>compile</scope> + </dependency> + <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> </dependency> diff --git a/lima-business/src/main/java/org/chorem/lima/entity/LimaFlywayServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/entity/LimaFlywayServiceImpl.java index c2109d87..e906898f 100644 --- a/lima-business/src/main/java/org/chorem/lima/entity/LimaFlywayServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/entity/LimaFlywayServiceImpl.java @@ -24,7 +24,6 @@ package org.chorem.lima.entity; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.h2.Driver; import org.nuiton.topia.flyway.TopiaFlywayServiceImpl; import org.nuiton.topia.persistence.TopiaApplicationContext; import org.nuiton.topia.persistence.TopiaConfigurationConstants; @@ -44,7 +43,7 @@ public class LimaFlywayServiceImpl extends TopiaFlywayServiceImpl { private static final Log log = LogFactory.getLog(LimaFlywayServiceImpl.class); - protected final static String INITIAL_VERSION = "0.3.0.0"; + protected final static String INITIAL_VERSION = ""; protected final static String OLD_TABLE_VERSION = "TMS_VERSION"; protected final static String VERSION_FROM_OLD_TABLE_VERSION = "SELECT VERSION FROM " + OLD_TABLE_VERSION + ";"; protected final static String FLYWAY_TABLE_VERSION = "schema_version"; @@ -57,7 +56,9 @@ public class LimaFlywayServiceImpl extends TopiaFlywayServiceImpl { String user = configuration.get(TopiaConfigurationConstants.CONFIG_USER); String password = configuration.get(TopiaConfigurationConstants.CONFIG_PASS); - DriverManager.registerDriver(new Driver()); + DriverManager.registerDriver(new org.h2.Driver()); + DriverManager.registerDriver(new org.postgresql.Driver()); + Connection connection = DriverManager.getConnection(url, user, password); return connection; diff --git a/pom.xml b/pom.xml index eb578652..943ee1a9 100644 --- a/pom.xml +++ b/pom.xml @@ -175,6 +175,7 @@ <googleGuavaVersion>19.0</googleGuavaVersion> <!-- h2Version 1.4.180 is beta, and db created with 1.3 are not compatible yet so don't use it for the moment--> <h2Version>1.3.176</h2Version> + <postgresqlVersion>42.1.4.jre7</postgresqlVersion> <hibernateVersion>4.3.11.Final</hibernateVersion> <itextVersion>4.2.1</itextVersion> <jasperreportsVersion>6.3.0</jasperreportsVersion> @@ -356,6 +357,13 @@ </dependency> <dependency> + <groupId>org.postgresql</groupId> + <artifactId>postgresql</artifactId> + <version>${postgresqlVersion}</version> + <scope>runtime</scope> + </dependency> + + <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>${hibernateVersion}</version> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.