diff --git a/build.gradle b/build.gradle index 567e0f2314..46e1b3e0da 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ allprojects { apply plugin: 'maven' group = 'org.jpos.ee' - version = '2.2.0' + version = '2.2.1-SNAPSHOT' } subprojects { diff --git a/libraries.gradle b/libraries.gradle index a70feb24de..667a1f881e 100644 --- a/libraries.gradle +++ b/libraries.gradle @@ -2,7 +2,7 @@ ext { jposVersion = '2.0.6' slf4jVersion = '1.7.10' logbackVersion = '1.1.3' - hibernateVersion = '5.0.9.Final' + hibernateVersion = '5.1.0.Final' geronimoVersion = '1.1.1' jettyVersion = '9.2.14.v20151106' servletApiVersion = '3.0.1' diff --git a/modules/dbsupport/src/main/java/org/jpos/ee/DB.java b/modules/dbsupport/src/main/java/org/jpos/ee/DB.java index 72443de282..0d3c0772a9 100644 --- a/modules/dbsupport/src/main/java/org/jpos/ee/DB.java +++ b/modules/dbsupport/src/main/java/org/jpos/ee/DB.java @@ -34,6 +34,7 @@ import org.hibernate.resource.transaction.spi.TransactionStatus; import org.hibernate.stat.SessionStatistics; import org.hibernate.tool.hbm2ddl.SchemaExport; +import org.hibernate.tool.schema.TargetType; import org.jpos.core.ConfigurationException; import org.jpos.ee.support.ModuleUtils; import org.jpos.util.Log; @@ -243,15 +244,18 @@ private Properties loadProperties(String filename) throws IOException * @param create true to actually issue the create statements */ public void createSchema(String outputFile, boolean create) throws HibernateException, DocumentException { - try - { - SchemaExport export = new SchemaExport(getMetadata()); - if (outputFile != null) - { + try { + // SchemaExport export = new SchemaExport(getMetadata()); + SchemaExport export = new SchemaExport(); + EnumSet targetTypes = EnumSet.of(TargetType.STDOUT); + if (outputFile != null) { export.setOutputFile(outputFile); export.setDelimiter(";"); + targetTypes.add(TargetType.SCRIPT); } - export.create(true, create); + if (create) + targetTypes.add(TargetType.DATABASE); + export.create(targetTypes, getMetadata()); } catch (IOException | ConfigurationException e) {