From ff60c131882477c9d5cb582297120297607fc065 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 6 Feb 2018 15:34:55 +0100 Subject: [PATCH 001/560] HBX-1521: Update the version to 5.3.0-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 23734d3e42..c90225a1c4 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 6.0.0-SNAPSHOT + 5.3.0-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 21e59a7dd0..442aca5a39 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "6.0.0-SNAPSHOT"; + public static final String VERSION = "5.3.0-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/pom.xml b/pom.xml index 8ac0164d04..275819bc17 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 6.0.0-SNAPSHOT + 5.3.0-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 240a47d15e..26d931b2d1 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 6.0.0-SNAPSHOT + 5.3.0-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index f0ccf5c2f6..000b58173e 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 6.0.0-SNAPSHOT + 5.3.0-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 11177befa6..04f1320c59 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 6.0.0-SNAPSHOT + 5.3.0-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 0944f7c29b..96c9b43616 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 6.0.0-SNAPSHOT + 5.3.0-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 706d9da93e..caf5e1e0ec 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 6.0.0-SNAPSHOT + 5.3.0-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index a5394bec28..a2d4cb533e 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 6.0.0-SNAPSHOT + 5.3.0-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index d04014beb9..46736ead5a 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 6.0.0-SNAPSHOT + 5.3.0-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index d962dd5d06..41fe62b156 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 6.0.0-SNAPSHOT + 5.3.0-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index b5d0526e35..a3ff42aa0c 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 6.0.0-SNAPSHOT + 5.3.0-SNAPSHOT hibernate-tools-tests-utils From 229dfe335900a910f694ea3a305c02cc3be5fbe3 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 7 Feb 2018 09:02:53 +0100 Subject: [PATCH 002/560] HBX-1522: Update Hibernate core dependency to 5.3.0.Beta2 Signed-off-by: Koen Aers --- .../org/hibernate/tool/hbm2x/pojo/EntityPOJOClass.java | 8 ++++---- pom.xml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/main/src/main/java/org/hibernate/tool/hbm2x/pojo/EntityPOJOClass.java b/main/src/main/java/org/hibernate/tool/hbm2x/pojo/EntityPOJOClass.java index 9d701e1045..feab4cb949 100644 --- a/main/src/main/java/org/hibernate/tool/hbm2x/pojo/EntityPOJOClass.java +++ b/main/src/main/java/org/hibernate/tool/hbm2x/pojo/EntityPOJOClass.java @@ -257,14 +257,14 @@ else if ( "sequence".equals( strategy ) ) { else if ( TableGenerator.class.getName().equals( strategy ) ) { builder.resetAnnotation( importType("javax.persistence.GeneratedValue") ) .addAttribute( "strategy", staticImport("javax.persistence.GenerationType", "TABLE" ) ) - .addQuotedAttribute( "generator", "generator" ); + .addQuotedAttribute( "generator", clazz.getClassName()+"IdGenerator" ); idResult.append(builder.getResult()); buildAnnTableGenerator( wholeString, properties ); } else { isGenericGenerator = true; builder.resetAnnotation( importType("javax.persistence.GeneratedValue") ); - builder.addQuotedAttribute( "generator", "generator" ); + builder.addQuotedAttribute( "generator", clazz.getClassName()+"IdGenerator" ); idResult.append(builder.getResult()); } } else { @@ -274,7 +274,7 @@ else if ( TableGenerator.class.getName().equals( strategy ) ) { } if ( isGenericGenerator ) { builder.resetAnnotation( importType("org.hibernate.annotations.GenericGenerator") ) - .addQuotedAttribute( "name", "generator" ) + .addQuotedAttribute( "name", clazz.getClassName()+"IdGenerator" ) .addQuotedAttribute( "strategy", strategy); List params = new ArrayList(); @@ -301,7 +301,7 @@ else if ( TableGenerator.class.getName().equals( strategy ) ) { private void buildAnnTableGenerator(StringBuffer wholeString, Properties properties) { AnnotationBuilder builder = AnnotationBuilder.createAnnotation( importType("javax.persistence.TableGenerator") ); - builder.addQuotedAttribute( "name", "generator" ); + builder.addQuotedAttribute( "name", clazz.getClassName()+"IdGenerator" ); builder.addQuotedAttribute( "table", properties.getProperty( "generatorTableName", "hibernate_sequences" ) ); if ( ! isPropertyDefault( PersistentIdentifierGenerator.CATALOG, properties ) ) { builder.addQuotedAttribute( "catalog", properties.getProperty( PersistentIdentifierGenerator.CATALOG, "") ); diff --git a/pom.xml b/pom.xml index 275819bc17..3e163faf9f 100644 --- a/pom.xml +++ b/pom.xml @@ -34,7 +34,7 @@ 2.3.23 1.4.194 5.0.0.Final - 5.2.12.Final + 5.3.0.Beta2 1.0.0.Final 2.3.3 7.0 From b4583802178a2c7435eac191a1ff2067b96e09e7 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 9 Mar 2018 16:24:01 +0100 Subject: [PATCH 003/560] HBX-1527: Module hibernate-tools-parent needs to be installed and deployed after build Signed-off-by: Koen Aers --- main/pom.xml | 5 ----- pom.xml | 3 --- test/pom.xml | 5 +++++ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index c90225a1c4..1f337e22c2 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -55,11 +55,6 @@ - - false - false - - commons-collections diff --git a/pom.xml b/pom.xml index 3e163faf9f..6850289c4f 100644 --- a/pom.xml +++ b/pom.xml @@ -24,9 +24,6 @@ - true - true - 1.10.1 3.2.2 1.2 diff --git a/test/pom.xml b/test/pom.xml index 41fe62b156..3671832305 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -17,6 +17,11 @@ Hibernate Tools Integration Tests Parent Project + + true + true + + all From f5f684dc3cbae0b836ba6fb35f65dd0cfb162d96 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 14 Mar 2018 12:28:50 +0100 Subject: [PATCH 004/560] HBX-1533: Update version identifier to 5.3.0.Beta1 Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 1f337e22c2..be8a61aff4 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta1 hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 442aca5a39..f534a2151e 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.3.0-SNAPSHOT"; + public static final String VERSION = "5.3.0.Beta1"; private static final Version instance = new Version(); diff --git a/pom.xml b/pom.xml index 6850289c4f..4fc5007537 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta1 pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 26d931b2d1..88e9ff061a 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta1 hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 000b58173e..761dd2786b 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta1 hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 04f1320c59..2a4cb35e49 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta1 hibernate-tools-tests-hsql diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 96c9b43616..da5df2a2b9 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta1 hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index caf5e1e0ec..2dcc07c618 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta1 hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index a2d4cb533e..2ce7da9913 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta1 hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 46736ead5a..b7a5783b48 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta1 hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 3671832305..98697ecfea 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta1 hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index a3ff42aa0c..b8a1c639e4 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta1 hibernate-tools-tests-utils From dee88922338a48b628d1c5f00c0cd3fdafebbe6a Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 14 Mar 2018 15:17:05 +0100 Subject: [PATCH 005/560] HBX-1534: Update the version to 5.3.0-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index be8a61aff4..1f337e22c2 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.3.0.Beta1 + 5.3.0-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index f534a2151e..442aca5a39 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.3.0.Beta1"; + public static final String VERSION = "5.3.0-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/pom.xml b/pom.xml index 4fc5007537..6850289c4f 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.3.0.Beta1 + 5.3.0-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 88e9ff061a..26d931b2d1 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta1 + 5.3.0-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 761dd2786b..000b58173e 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta1 + 5.3.0-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 2a4cb35e49..04f1320c59 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta1 + 5.3.0-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index da5df2a2b9..96c9b43616 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta1 + 5.3.0-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 2dcc07c618..caf5e1e0ec 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta1 + 5.3.0-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 2ce7da9913..a2d4cb533e 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta1 + 5.3.0-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index b7a5783b48..46736ead5a 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta1 + 5.3.0-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 98697ecfea..3671832305 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.3.0.Beta1 + 5.3.0-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index b8a1c639e4..a3ff42aa0c 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta1 + 5.3.0-SNAPSHOT hibernate-tools-tests-utils From b8311f50fc2551bdc494ae6aa6722be3dc6b7590 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sat, 17 Mar 2018 01:43:33 +0100 Subject: [PATCH 006/560] HBX-1027: Reveng of Oracle db finds wrong lengths for unicode CHAR columns Signed-off-by: Koen Aers --- .../reveng/dialect/OracleMetaDataDialect.java | 13 ++- .../cfg/reveng/dialect/TestCase.java | 87 +++++++++++++++++++ .../hibernate/cfg/reveng/dialect/create.sql | 1 + .../org/hibernate/cfg/reveng/dialect/drop.sql | 1 + .../tool/test/db/oracle/TestSuite.java | 1 + 5 files changed, 100 insertions(+), 3 deletions(-) create mode 100644 test/oracle/src/main/java/org/hibernate/cfg/reveng/dialect/TestCase.java create mode 100644 test/oracle/src/main/resources/org/hibernate/cfg/reveng/dialect/create.sql create mode 100644 test/oracle/src/main/resources/org/hibernate/cfg/reveng/dialect/drop.sql diff --git a/main/src/main/java/org/hibernate/cfg/reveng/dialect/OracleMetaDataDialect.java b/main/src/main/java/org/hibernate/cfg/reveng/dialect/OracleMetaDataDialect.java index e0a7736b52..689ec1808a 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/dialect/OracleMetaDataDialect.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/dialect/OracleMetaDataDialect.java @@ -17,6 +17,7 @@ * * @author David Channon * @author Eric Kershner (added preparedstatements HBX-817) + * @author Jacques Stadler (added HBX-1027) * */ @@ -93,9 +94,15 @@ public OracleMetaDataDialect() { /* ****** COLUMN QUERIES ******* */ private static final String SQL_COLUMN_BASE = "select a.column_name as COLUMN_NAME, a.owner as TABLE_SCHEM, " + "decode(a.nullable,'N',0,1) as NULLABLE, " - + "decode(a.data_type, 'FLOAT',decode(a.data_precision,null, " - + "a.data_length, a.data_precision), 'NUMBER', decode(a.data_precision,null, " - + "a.data_length, a.data_precision), a.data_length) as COLUMN_SIZE, " + + "decode(a.data_type, " + + "'FLOAT', decode(a.data_precision, null, a.data_length, a.data_precision), " + + "'NUMBER', decode(a.data_precision, null, a.data_length, a.data_precision), " + + "'VARCHAR2', a.char_length, " + + "'VARCHAR', a.char_length, " + + "'NVARCHAR2', a.char_length, " + + "'CHAR', a.char_length, " + + "'NCHAR', a.char_length, " + + "a.data_length) as COLUMN_SIZE, " + "decode(a.data_type,'CHAR',1, 'DATE',91, 'FLOAT',6, " + "'LONG',-1, 'NUMBER',2, 'VARCHAR2',12, 'BFILE',-13, " + "'BLOB',2004, 'CLOB',2005, 'MLSLABEL',1111, 'NCHAR',1, 'NCLOB',2005, 'NVARCHAR2',12, " diff --git a/test/oracle/src/main/java/org/hibernate/cfg/reveng/dialect/TestCase.java b/test/oracle/src/main/java/org/hibernate/cfg/reveng/dialect/TestCase.java new file mode 100644 index 0000000000..dab7e9b9b9 --- /dev/null +++ b/test/oracle/src/main/java/org/hibernate/cfg/reveng/dialect/TestCase.java @@ -0,0 +1,87 @@ +package org.hibernate.cfg.reveng.dialect; + +import org.hibernate.boot.registry.StandardServiceRegistryBuilder; +import org.hibernate.cfg.AvailableSettings; +import org.hibernate.cfg.Environment; +import org.hibernate.cfg.reveng.DefaultDatabaseCollector; +import org.hibernate.cfg.reveng.ReverseEngineeringRuntimeInfo; +import org.hibernate.engine.jdbc.connections.spi.ConnectionProvider; +import org.hibernate.engine.jdbc.spi.JdbcServices; +import org.hibernate.service.ServiceRegistry; +import org.hibernate.tools.test.util.JdbcUtil; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import java.util.Iterator; +import java.util.Map; +import java.util.Properties; + +import static org.hamcrest.CoreMatchers.equalTo; +import static org.junit.Assert.assertThat; + +public class TestCase { + + private Properties properties = null; + private ServiceRegistry serviceRegistry; + + @Before + public void setUp() { + JdbcUtil.createDatabase(this); + properties = Environment.getProperties(); + StandardServiceRegistryBuilder ssrb = new StandardServiceRegistryBuilder(); + serviceRegistry = ssrb.build(); + } + + @After + public void tearDown() { + JdbcUtil.dropDatabase(this); + } + + @Test + public void testColumnTypeSizes() { + MetaDataDialect dialect = configureOracleMetaDataDialect(); + + assertSqlTypeLengths(dialect, "a_varchar2_char", "VARCHAR2", 10, 0); + assertSqlTypeLengths(dialect, "a_varchar2_byte", "VARCHAR2", 10, 0); + assertSqlTypeLengths(dialect, "a_varchar_char", "VARCHAR2", 10, 0); + assertSqlTypeLengths(dialect, "a_varchar_byte", "VARCHAR2", 10, 0); + assertSqlTypeLengths(dialect, "a_nvarchar", "NVARCHAR2", 10, 0); + assertSqlTypeLengths(dialect, "a_char_char", "CHAR", 10, 0); + assertSqlTypeLengths(dialect, "a_char_byte", "CHAR", 10, 0); + assertSqlTypeLengths(dialect, "a_nchar_char", "NCHAR", 10, 0); + assertSqlTypeLengths(dialect, "a_nchar_byte", "NCHAR", 10, 0); + assertSqlTypeLengths(dialect, "a_number_int", "NUMBER", 10, 0); + assertSqlTypeLengths(dialect, "a_number_dec", "NUMBER", 10, 2); + assertSqlTypeLengths(dialect, "a_float", "FLOAT", 10, 0); + } + + private MetaDataDialect configureOracleMetaDataDialect() { + MetaDataDialect dialect = new OracleMetaDataDialect(); + JdbcServices jdbcServices = serviceRegistry.getService(JdbcServices.class); + ConnectionProvider connectionProvider = serviceRegistry.getService(ConnectionProvider.class); + dialect.configure( + ReverseEngineeringRuntimeInfo.createInstance( + connectionProvider, + jdbcServices.getSqlExceptionHelper().getSqlExceptionConverter(), + new DefaultDatabaseCollector(dialect))); + return dialect; + } + + private void assertSqlTypeLengths(MetaDataDialect dialect, String columnName, String typeName, int columnSize, int decimalDigits) { + columnName = columnName.toUpperCase(); + String catalog = properties.getProperty(AvailableSettings.DEFAULT_CATALOG); + String schema = properties.getProperty(AvailableSettings.DEFAULT_SCHEMA); + Iterator> columns = dialect.getColumns(catalog, schema, "PERSON", columnName); + boolean found = false; + while (columns.hasNext()) { + Map column = columns.next(); + assertThat(column.get("COLUMN_NAME"), equalTo(columnName.toUpperCase())); + assertThat(column.get("TYPE_NAME"), equalTo(typeName)); + assertThat(column.get("COLUMN_SIZE"), equalTo(columnSize)); + assertThat(column.get("DECIMAL_DIGITS"), equalTo(decimalDigits)); + found = true; + } + assertThat("Expected column '" + columnName + "'to exist.", found, equalTo(true)); + } +} diff --git a/test/oracle/src/main/resources/org/hibernate/cfg/reveng/dialect/create.sql b/test/oracle/src/main/resources/org/hibernate/cfg/reveng/dialect/create.sql new file mode 100644 index 0000000000..e04b390dc2 --- /dev/null +++ b/test/oracle/src/main/resources/org/hibernate/cfg/reveng/dialect/create.sql @@ -0,0 +1 @@ +CREATE TABLE person ( id NUMBER(2) PRIMARY KEY, a_varchar2_char VARCHAR2(10 CHAR), a_varchar2_byte VARCHAR2(10 BYTE), a_varchar_char VARCHAR(10 CHAR), a_varchar_byte VARCHAR(10 BYTE), a_nvarchar NVARCHAR2(10), a_char_char CHAR(10 CHAR), a_char_byte CHAR(10 BYTE), a_nchar_char NCHAR(10), a_nchar_byte NCHAR(10), a_number_int NUMBER(10), a_number_dec NUMBER(10, 2), a_float FLOAT(10)) \ No newline at end of file diff --git a/test/oracle/src/main/resources/org/hibernate/cfg/reveng/dialect/drop.sql b/test/oracle/src/main/resources/org/hibernate/cfg/reveng/dialect/drop.sql new file mode 100644 index 0000000000..716ca00b53 --- /dev/null +++ b/test/oracle/src/main/resources/org/hibernate/cfg/reveng/dialect/drop.sql @@ -0,0 +1 @@ +DROP TABLE PERSON \ No newline at end of file diff --git a/test/oracle/src/test/java/org/hibernate/tool/test/db/oracle/TestSuite.java b/test/oracle/src/test/java/org/hibernate/tool/test/db/oracle/TestSuite.java index 68c945d1ac..c0aec0a645 100644 --- a/test/oracle/src/test/java/org/hibernate/tool/test/db/oracle/TestSuite.java +++ b/test/oracle/src/test/java/org/hibernate/tool/test/db/oracle/TestSuite.java @@ -6,6 +6,7 @@ @RunWith(DbSuite.class) @SuiteClasses({ + org.hibernate.cfg.reveng.dialect.TestCase.class, org.hibernate.tool.jdbc2cfg.CompositeIdOrder.TestCase.class, org.hibernate.tool.jdbc2cfg.Views.TestCase.class, org.hibernate.tool.test.db.CommonTestSuite.class From 273d5e633a45ba7d2eff87597165a44e343b9ed6 Mon Sep 17 00:00:00 2001 From: Jacques Stadler Date: Tue, 16 Jan 2018 22:05:16 +0100 Subject: [PATCH 007/560] HBX-1516: Initial migration of hibernate-tools-maven-plugin to hibernate-tools project * Copies files from https://github.com/stadler/hibernate-tools-maven-plugin as of version 1.1.0. * Adapted pom.xml to fit this project * Changed README.mds to readme.txt and adapted content * Add this maven-plugin as module to parent --- maven-plugin/lgpl.txt | 504 ++++++++++++++++++ maven-plugin/pom.xml | 166 ++++++ maven-plugin/readme.txt | 109 ++++ .../src/it/hbm2ddl/invoker.properties | 2 + maven-plugin/src/it/hbm2ddl/pom.xml | 53 ++ .../src/main/hibernate/hibernate.cfg.xml | 13 + .../src/main/hibernate/hibernate.reveng.xml | 11 + maven-plugin/src/it/hbm2ddl/test.mv.db | Bin 0 -> 28672 bytes maven-plugin/src/it/hbm2ddl/verify.groovy | 6 + .../src/it/hbm2java/invoker.properties | 2 + maven-plugin/src/it/hbm2java/pom.xml | 53 ++ .../src/main/hibernate/hibernate.cfg.xml | 13 + .../src/main/hibernate/hibernate.reveng.xml | 11 + .../main/resources/templates/pojo/Pojo.ftl | 29 + .../resources/templates/pojo/PojoFields.ftl | 7 + maven-plugin/src/it/hbm2java/test.mv.db | Bin 0 -> 28672 bytes maven-plugin/src/it/hbm2java/verify.groovy | 6 + maven-plugin/src/it/settings.xml | 46 ++ .../com/github/stadler/AbstractHbm2xMojo.java | 81 +++ .../java/com/github/stadler/Hbm2DdlMojo.java | 52 ++ .../java/com/github/stadler/Hbm2JavaMojo.java | 42 ++ maven-plugin/src/site/site.xml | 29 + pom.xml | 1 + 23 files changed, 1236 insertions(+) create mode 100644 maven-plugin/lgpl.txt create mode 100644 maven-plugin/pom.xml create mode 100644 maven-plugin/readme.txt create mode 100644 maven-plugin/src/it/hbm2ddl/invoker.properties create mode 100644 maven-plugin/src/it/hbm2ddl/pom.xml create mode 100644 maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.cfg.xml create mode 100644 maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.reveng.xml create mode 100644 maven-plugin/src/it/hbm2ddl/test.mv.db create mode 100644 maven-plugin/src/it/hbm2ddl/verify.groovy create mode 100644 maven-plugin/src/it/hbm2java/invoker.properties create mode 100644 maven-plugin/src/it/hbm2java/pom.xml create mode 100644 maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.cfg.xml create mode 100644 maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.reveng.xml create mode 100644 maven-plugin/src/it/hbm2java/src/main/resources/templates/pojo/Pojo.ftl create mode 100644 maven-plugin/src/it/hbm2java/src/main/resources/templates/pojo/PojoFields.ftl create mode 100644 maven-plugin/src/it/hbm2java/test.mv.db create mode 100644 maven-plugin/src/it/hbm2java/verify.groovy create mode 100644 maven-plugin/src/it/settings.xml create mode 100644 maven-plugin/src/main/java/com/github/stadler/AbstractHbm2xMojo.java create mode 100644 maven-plugin/src/main/java/com/github/stadler/Hbm2DdlMojo.java create mode 100644 maven-plugin/src/main/java/com/github/stadler/Hbm2JavaMojo.java create mode 100644 maven-plugin/src/site/site.xml diff --git a/maven-plugin/lgpl.txt b/maven-plugin/lgpl.txt new file mode 100644 index 0000000000..1c03f74b99 --- /dev/null +++ b/maven-plugin/lgpl.txt @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml new file mode 100644 index 0000000000..8e06a24fe0 --- /dev/null +++ b/maven-plugin/pom.xml @@ -0,0 +1,166 @@ + + 4.0.0 + + + org.hibernate + hibernate-tools-parent + 6.0.0-SNAPSHOT + + + hibernate-tools-maven-plugin + + maven-plugin + + Hibernate Tools Maven Plugin + Maven plugin to provide hibernate-tools reverse engineering and code/schema generation abilities. + + https://stadler.github.io/hibernate-tools-maven-plugin/ + + + JIRA + http://hibernate.onjira.com/browse/HBX + + + + scm:git:git://github.com/hibernate/hibernate-tools.git + scm:git:git@github.com:hibernate/hibernate-tools.git + http://github.com/hibernate/hibernate-tools + + + + Hibernate + http://www.hibernate.org + + + + + GNU Lesser General Public License + http://www.gnu.org/licenses/lgpl-2.1.html + + + + + + stadler + Jacques Stadler + jacques.stadler+github@gmail.com + + + + + 3.0 + + + + 3.5 + 3.5.2 + + + 3.5 + 3.0.2 + 2.5.2 + 3.0.0 + 3.7.0 + 3.0.1 + 1.6 + 2.5.3 + 2.8.2 + 2.20.1 + 3.0.0 + 3.0.1 + 2.9 + 3.7 + 0.12 + + + + + + org.hibernate + hibernate-tools + ${project.version} + + + + org.apache.maven + maven-plugin-api + ${maven-plugin-api.version} + + + org.apache.maven.plugin-tools + maven-plugin-annotations + ${maven-plugin-annotations.version} + provided + + + + + + + maven-plugin-plugin + + + default-descriptor + process-classes + + + help-goal + + helpmojo + + + + + + maven-invoker-plugin + + true + ${project.build.directory}/it + src/it/settings.xml + ${project.build.directory}/local-repo + verify + install + + + + integration-test + + run + + + + + + + + + + + + + + + + + + + + + + + + + + + + + maven-project-info-reports-plugin + + + maven-plugin-plugin + + + + + diff --git a/maven-plugin/readme.txt b/maven-plugin/readme.txt new file mode 100644 index 0000000000..fca41775d7 --- /dev/null +++ b/maven-plugin/readme.txt @@ -0,0 +1,109 @@ +Hibernate Tools Maven Plugin +============================ +Version: 6.0.0, January 2016 + +What is it +---------- +A Maven Plugin to generate JPA Entities from an existing database using hibernate-tools. + +Development status +------------------ +Currently the plugin allows database reverse engineering configurations (JDBCMetaDataConfiguration) +to export JPA Entities (hbm2java) and Schema Files (hbm2ddl). + +History +------- +The hibernate-tools-maven-plugin was originally developed by Jacques Stadler +in the following repository and was based on version 1.1.0: +https://github.com/stadler/hibernate-tools-maven-plugin + +Licensing +--------- +This software is distributed under the terms of the FSF Lesser Gnu Public +License (see lgpl.txt). + +Maven Plugin Site +----------------- +TODO: To be migrated... +https://stadler.github.io/hibernate-tools-maven-plugin/ + +Usage +----- +TODO: To be migrated... +An example project using this plugin can be found here: +https://github.com/stadler/hibernate-tools-maven-plugin-sample + +The plugin declaration may look as follows: +``` + + com.github.stadler + hibernate-tools-maven-plugin + ${hibernate-tools-maven-plugin.version} + + + Display Help + validate + + help + + + + Entity generation + generate-sources + + hbm2java + + + ${project.basedir}/src/main/resources/templates/ + + ${project.build.directory}/generated-sources/ + false + false + + + + Schema generation + generate-resources + + hbm2ddl + + + + + SCRIPT + STDOUT + DATABASE + + + ${project.build.directory}/generated-resources/ + + CREATE + schema.ddl + ; + true + true + + + + + ${project.basedir}/src/main/hibernate/hibernate.reveng.xml + + + ${project.basedir}/src/main/hibernate/hibernate.cfg.xml + true + true + true + true + true + + + + + com.h2database + h2 + ${h2.version} + + + + +``` diff --git a/maven-plugin/src/it/hbm2ddl/invoker.properties b/maven-plugin/src/it/hbm2ddl/invoker.properties new file mode 100644 index 0000000000..13598db400 --- /dev/null +++ b/maven-plugin/src/it/hbm2ddl/invoker.properties @@ -0,0 +1,2 @@ +invoker.java.version = 1.8+ +invoker.goals = generate-resources \ No newline at end of file diff --git a/maven-plugin/src/it/hbm2ddl/pom.xml b/maven-plugin/src/it/hbm2ddl/pom.xml new file mode 100644 index 0000000000..e3962a340f --- /dev/null +++ b/maven-plugin/src/it/hbm2ddl/pom.xml @@ -0,0 +1,53 @@ + + + 4.0.0 + + com.github.stadler + hbm2ddl + 0.0.1-SNAPSHOT + + + UTF-8 + UTF-8 + + 1.8 + 1.4.195 + 0.1.1-SNAPSHOT + + + + + + com.github.stadler + hibernate-tools-maven-plugin + ${hibernate-tools-maven-plugin.version} + + + Schema generation + generate-resources + + hbm2ddl + + + BOTH + + + + + ${project.basedir}/src/main/hibernate/hibernate.reveng.xml + + + + + com.h2database + h2 + ${h2.version} + + + + + + + \ No newline at end of file diff --git a/maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.cfg.xml b/maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.cfg.xml new file mode 100644 index 0000000000..fe2b99a46a --- /dev/null +++ b/maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.cfg.xml @@ -0,0 +1,13 @@ + + + + + org.hibernate.dialect.H2Dialect + org.h2.Driver + jdbc:h2:./test;DB_CLOSE_ON_EXIT=FALSE + sa + + 1 + true + + \ No newline at end of file diff --git a/maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.reveng.xml b/maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.reveng.xml new file mode 100644 index 0000000000..7ac52fd2cf --- /dev/null +++ b/maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.reveng.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/maven-plugin/src/it/hbm2ddl/test.mv.db b/maven-plugin/src/it/hbm2ddl/test.mv.db new file mode 100644 index 0000000000000000000000000000000000000000..72d79270f88b69518fe17598ef53debfe7371c91 GIT binary patch literal 28672 zcmeI4TWcFf6vuZJtBI93AWCQ-S{NtPPC+O$yV{#*OJr$-L?zisa!8)c>@6{IBxB1V z^r3{d^r_Hq(9hAAmVAOd=B*IOW4}Y`XlG}4t&1bas&UB?W-qg=oio4H#sB}Aqk35> zIC}&4iCA}czw^rkV_a|_AN8M<00AHX1b_e#00KY&2mk>f00e*l5V!yY>O%L6HR%5f za91D%AOHk_01yBIKmZ5;0U!VbfB+Bx0*fUOC;7!BfIYv@vieWyewni6^D=R8q3=H* zmes;OedHf9pWt9HV3~izWRnCiRt&5bhPzMMq=A4C*KwWHlmK*=$7uGzs`OTpWl8$v zg(Tf+v-Mp`dj0D1^(+gps7sPOkbjXbOIN~S6g5|Dc;N{oTq@yG4VR^GsXdE^?M8DS zv;rUY-tIHM#RjdYxG>t@ibkB^(EJF89^udgj*td+a2kiEQY*pXif+BATYaosVy3%I z--VL63r5tfD!MIAxeJ=+7)iI@jXq_!XRz=0dk3_CNZlcuuyJ@TY(46GgXZ87-x*S8 z&oAPu;gP+8)1v$FcE=AE`^tl>0RbQY1b_e#00KY&2mk>f00cfP0u%as+I;#zQ3F@? zoU^Fu>CeqY{RfdERU<_@Mevr!1+N<_&trmDF;pw1|AXnB&e_WJzx}sP`Y39DnFWo|`D_=!?wmPh}^ALS&Ka7LoO*^b< z$3&a$xSa>vsIg0|qc2t-F^CNAlmW5v*HCq{-R*TMqcKIJOQyt%Cmt2- z(Lo*p`y5!yyuF;2@|jhV&)ihM6SXP*8)p8r=2%`L^5XC0p+lF3tf{{OE~+kMJz*PV_e zjn=PUEyvm}^IN7WEuWuHm?|29U2mk>f z00e*l5C8&c0$g>b^taIetSSCIJy*x38Bl9dBcHWJ9U z`G0M!N=O%p=~P(^wo2GdI&~JR|9|{24HsU06y^W<4(R{%7cFc90U!VbfB+Bx0zlw` z5SYk13;nOTiT)3;>bt~q&m^a(K3VAh@qBZl|7Yg^jX5gMr}jB-BhUZ8;o9yl&;RrK z|6}?8?^F5zDcVkmJojXg7iYZBLFFYGZ*sg+--`49=OX)N#zA8m=b!^;M&SqzJZ?@2 zG5R0f@D2iz{!jFG VtpB}~{wErC70;hnInRGy?qAGfE9C$H literal 0 HcmV?d00001 diff --git a/maven-plugin/src/it/hbm2ddl/verify.groovy b/maven-plugin/src/it/hbm2ddl/verify.groovy new file mode 100644 index 0000000000..14485800e0 --- /dev/null +++ b/maven-plugin/src/it/hbm2ddl/verify.groovy @@ -0,0 +1,6 @@ +import java.io.*; + +File schema = new File(basedir, "target/generated-resources/schema.ddl"); +if (!schema.isFile()) { + throw new FileNotFoundException("Could not find generated schema file: " + schema); +} diff --git a/maven-plugin/src/it/hbm2java/invoker.properties b/maven-plugin/src/it/hbm2java/invoker.properties new file mode 100644 index 0000000000..4537ab14c4 --- /dev/null +++ b/maven-plugin/src/it/hbm2java/invoker.properties @@ -0,0 +1,2 @@ +invoker.java.version = 1.8+ +invoker.goals = generate-sources \ No newline at end of file diff --git a/maven-plugin/src/it/hbm2java/pom.xml b/maven-plugin/src/it/hbm2java/pom.xml new file mode 100644 index 0000000000..cf7c359284 --- /dev/null +++ b/maven-plugin/src/it/hbm2java/pom.xml @@ -0,0 +1,53 @@ + + + 4.0.0 + + com.github.stadler + hbm2java + 0.0.1-SNAPSHOT + + + UTF-8 + UTF-8 + + 1.8 + 1.4.195 + 0.1.1-SNAPSHOT + + + + + + com.github.stadler + hibernate-tools-maven-plugin + ${hibernate-tools-maven-plugin.version} + + + Entity generation + generate-sources + + hbm2java + + + ${project.basedir}/src/main/resources/templates/ + + + + + ${project.basedir}/src/main/hibernate/hibernate.reveng.xml + + + + + com.h2database + h2 + ${h2.version} + + + + + + + \ No newline at end of file diff --git a/maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.cfg.xml b/maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.cfg.xml new file mode 100644 index 0000000000..fe2b99a46a --- /dev/null +++ b/maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.cfg.xml @@ -0,0 +1,13 @@ + + + + + org.hibernate.dialect.H2Dialect + org.h2.Driver + jdbc:h2:./test;DB_CLOSE_ON_EXIT=FALSE + sa + + 1 + true + + \ No newline at end of file diff --git a/maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.reveng.xml b/maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.reveng.xml new file mode 100644 index 0000000000..7ac52fd2cf --- /dev/null +++ b/maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.reveng.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/maven-plugin/src/it/hbm2java/src/main/resources/templates/pojo/Pojo.ftl b/maven-plugin/src/it/hbm2java/src/main/resources/templates/pojo/Pojo.ftl new file mode 100644 index 0000000000..84ff76a5b2 --- /dev/null +++ b/maven-plugin/src/it/hbm2java/src/main/resources/templates/pojo/Pojo.ftl @@ -0,0 +1,29 @@ +${pojo.getPackageDeclaration()} +// Generated ${date} by Hibernate Tools ${version} + +<#assign classbody> +<#include "PojoTypeDeclaration.ftl"/> { + +<#if !pojo.isInterface()> +<#include "PojoFields.ftl"/> + +<#include "PojoConstructors.ftl"/> + +<#include "PojoPropertyAccessors.ftl"/> + +<#include "PojoToString.ftl"/> + +<#include "PojoEqualsHashcode.ftl"/> + +<#else> +<#include "PojoInterfacePropertyAccessors.ftl"/> + + +<#include "PojoExtraClassCode.ftl"/> + +} + + +${pojo.generateImports()} +${classbody} + diff --git a/maven-plugin/src/it/hbm2java/src/main/resources/templates/pojo/PojoFields.ftl b/maven-plugin/src/it/hbm2java/src/main/resources/templates/pojo/PojoFields.ftl new file mode 100644 index 0000000000..098e5ef030 --- /dev/null +++ b/maven-plugin/src/it/hbm2java/src/main/resources/templates/pojo/PojoFields.ftl @@ -0,0 +1,7 @@ +<#-- // Fields --> +<#foreach field in pojo.getAllPropertiesIterator()><#if pojo.getMetaAttribAsBool(field, "gen-property", true)><#if pojo.hasMetaAttribute(field, "field-description")> /** + ${pojo.getFieldJavaDoc(field, 0)} + */ + ${pojo.getFieldModifiers(field)} ${pojo.getJavaTypeName(field, jdk5)} ${c2j.keyWordCheck(field.name)}<#if pojo.hasFieldInitializor(field, jdk5)> = ${pojo.getFieldInitialization(field, jdk5)}; + + diff --git a/maven-plugin/src/it/hbm2java/test.mv.db b/maven-plugin/src/it/hbm2java/test.mv.db new file mode 100644 index 0000000000000000000000000000000000000000..72d79270f88b69518fe17598ef53debfe7371c91 GIT binary patch literal 28672 zcmeI4TWcFf6vuZJtBI93AWCQ-S{NtPPC+O$yV{#*OJr$-L?zisa!8)c>@6{IBxB1V z^r3{d^r_Hq(9hAAmVAOd=B*IOW4}Y`XlG}4t&1bas&UB?W-qg=oio4H#sB}Aqk35> zIC}&4iCA}czw^rkV_a|_AN8M<00AHX1b_e#00KY&2mk>f00e*l5V!yY>O%L6HR%5f za91D%AOHk_01yBIKmZ5;0U!VbfB+Bx0*fUOC;7!BfIYv@vieWyewni6^D=R8q3=H* zmes;OedHf9pWt9HV3~izWRnCiRt&5bhPzMMq=A4C*KwWHlmK*=$7uGzs`OTpWl8$v zg(Tf+v-Mp`dj0D1^(+gps7sPOkbjXbOIN~S6g5|Dc;N{oTq@yG4VR^GsXdE^?M8DS zv;rUY-tIHM#RjdYxG>t@ibkB^(EJF89^udgj*td+a2kiEQY*pXif+BATYaosVy3%I z--VL63r5tfD!MIAxeJ=+7)iI@jXq_!XRz=0dk3_CNZlcuuyJ@TY(46GgXZ87-x*S8 z&oAPu;gP+8)1v$FcE=AE`^tl>0RbQY1b_e#00KY&2mk>f00cfP0u%as+I;#zQ3F@? zoU^Fu>CeqY{RfdERU<_@Mevr!1+N<_&trmDF;pw1|AXnB&e_WJzx}sP`Y39DnFWo|`D_=!?wmPh}^ALS&Ka7LoO*^b< z$3&a$xSa>vsIg0|qc2t-F^CNAlmW5v*HCq{-R*TMqcKIJOQyt%Cmt2- z(Lo*p`y5!yyuF;2@|jhV&)ihM6SXP*8)p8r=2%`L^5XC0p+lF3tf{{OE~+kMJz*PV_e zjn=PUEyvm}^IN7WEuWuHm?|29U2mk>f z00e*l5C8&c0$g>b^taIetSSCIJy*x38Bl9dBcHWJ9U z`G0M!N=O%p=~P(^wo2GdI&~JR|9|{24HsU06y^W<4(R{%7cFc90U!VbfB+Bx0zlw` z5SYk13;nOTiT)3;>bt~q&m^a(K3VAh@qBZl|7Yg^jX5gMr}jB-BhUZ8;o9yl&;RrK z|6}?8?^F5zDcVkmJojXg7iYZBLFFYGZ*sg+--`49=OX)N#zA8m=b!^;M&SqzJZ?@2 zG5R0f@D2iz{!jFG VtpB}~{wErC70;hnInRGy?qAGfE9C$H literal 0 HcmV?d00001 diff --git a/maven-plugin/src/it/hbm2java/verify.groovy b/maven-plugin/src/it/hbm2java/verify.groovy new file mode 100644 index 0000000000..b42495d3d5 --- /dev/null +++ b/maven-plugin/src/it/hbm2java/verify.groovy @@ -0,0 +1,6 @@ +import java.io.*; + +File entity = new File(basedir, "target/generated-sources/Person.java"); +if (!entity.isFile()) { + throw new FileNotFoundException("Could not find generated JPA Entity: " + entity); +} diff --git a/maven-plugin/src/it/settings.xml b/maven-plugin/src/it/settings.xml new file mode 100644 index 0000000000..15b3aee62b --- /dev/null +++ b/maven-plugin/src/it/settings.xml @@ -0,0 +1,46 @@ + + + + + it-repo + + true + + + + local.central + @localRepositoryUrl@ + + true + + + true + + + + + false + + + true + + plexus-snapshots + Plexus Snapshot Repository + https://oss.sonatype.org/content/repositories/plexus-snapshots + + + + + local.central + @localRepositoryUrl@ + + true + + + true + + + + + + \ No newline at end of file diff --git a/maven-plugin/src/main/java/com/github/stadler/AbstractHbm2xMojo.java b/maven-plugin/src/main/java/com/github/stadler/AbstractHbm2xMojo.java new file mode 100644 index 0000000000..8cbc42daee --- /dev/null +++ b/maven-plugin/src/main/java/com/github/stadler/AbstractHbm2xMojo.java @@ -0,0 +1,81 @@ +package com.github.stadler; + +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugin.MojoFailureException; +import org.apache.maven.plugins.annotations.Parameter; +import org.hibernate.cfg.Configuration; +import org.hibernate.cfg.JDBCMetaDataConfiguration; +import org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy; +import org.hibernate.cfg.reveng.OverrideRepository; +import org.hibernate.cfg.reveng.ReverseEngineeringSettings; +import org.hibernate.cfg.reveng.ReverseEngineeringStrategy; + +import java.io.File; + +public abstract class AbstractHbm2xMojo extends AbstractMojo { + + // For reveng strategy + @Parameter + private String packageName; + @Parameter + private File revengFile; + @Parameter(defaultValue = "true") + private boolean detectManyToMany; + @Parameter(defaultValue = "true") + private boolean detectOneToOne; + @Parameter(defaultValue = "true") + private boolean detectOptimisticLock; + @Parameter(defaultValue = "true") + private boolean createCollectionForForeignKey; + @Parameter(defaultValue = "true") + private boolean createManyToOneForForeignKey; + + // For configuration + @Parameter(defaultValue = "${project.basedir}/src/main/hibernate/hibernate.cfg.xml") + private File configFile; + + public void execute() throws MojoExecutionException, MojoFailureException { + getLog().info("Starting " + this.getClass().getSimpleName() + "..."); + ReverseEngineeringStrategy strategy = setupReverseEngineeringStrategy(); + JDBCMetaDataConfiguration cfg = setupJdbcMetaDataConfiguration(strategy); + executeExporter(cfg); + getLog().info("Finished " + this.getClass().getSimpleName() + "!"); + } + + private ReverseEngineeringStrategy setupReverseEngineeringStrategy() { + ReverseEngineeringStrategy strategy = new DefaultReverseEngineeringStrategy(); + + if (revengFile != null) { + OverrideRepository override = new OverrideRepository(); + override.addFile(revengFile); + strategy = override.getReverseEngineeringStrategy(strategy); + } + + ReverseEngineeringSettings settings = + new ReverseEngineeringSettings(strategy) + .setDefaultPackageName(packageName) + .setDetectManyToMany(detectManyToMany) + .setDetectOneToOne(detectOneToOne) + .setDetectOptimisticLock(detectOptimisticLock) + .setCreateCollectionForForeignKey(createCollectionForForeignKey) + .setCreateManyToOneForForeignKey(createManyToOneForForeignKey); + + strategy.setSettings(settings); + return strategy; + } + + private JDBCMetaDataConfiguration setupJdbcMetaDataConfiguration(ReverseEngineeringStrategy strategy) { + JDBCMetaDataConfiguration cfg = new JDBCMetaDataConfiguration(); + cfg.setReverseEngineeringStrategy(strategy); + + getLog().info("Configuring using file: " + configFile + "..."); + cfg.configure(configFile); + + getLog().info("Reading from JDBC..."); + cfg.readFromJDBC(); + return cfg; + } + + protected abstract void executeExporter(Configuration cfg); +} diff --git a/maven-plugin/src/main/java/com/github/stadler/Hbm2DdlMojo.java b/maven-plugin/src/main/java/com/github/stadler/Hbm2DdlMojo.java new file mode 100644 index 0000000000..919cc92960 --- /dev/null +++ b/maven-plugin/src/main/java/com/github/stadler/Hbm2DdlMojo.java @@ -0,0 +1,52 @@ +package com.github.stadler; + +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.hibernate.boot.Metadata; +import org.hibernate.cfg.Configuration; +import org.hibernate.tool.hbm2ddl.SchemaExport; +import org.hibernate.tool.schema.TargetType; +import org.hibernate.tool.util.MetadataHelper; + +import java.io.File; +import java.util.EnumSet; +import java.util.Set; + +import static org.apache.maven.plugins.annotations.LifecyclePhase.GENERATE_RESOURCES; + +/** + * Mojo to generate DDL Scripts from an existing database. + *

+ * See https://docs.jboss.org/tools/latest/en/hibernatetools/html_single/#d0e4651 + */ +@Mojo(name = "hbm2ddl", defaultPhase = GENERATE_RESOURCES) +public class Hbm2DdlMojo extends AbstractHbm2xMojo { + + @Parameter(defaultValue = "${project.build.directory}/generated-resources/") + private File outputDirectory; + @Parameter(defaultValue = "schema.ddl") + private String outputFileName; + @Parameter(defaultValue = "SCRIPT") + private Set targetTypes; + @Parameter(defaultValue = "CREATE") + private SchemaExport.Action schemaExportAction; + @Parameter(defaultValue = ";") + private String delimiter; + @Parameter(defaultValue = "true") + private boolean format; + @Parameter(defaultValue = "true") + private boolean haltOnError; + + + @Override + protected void executeExporter(Configuration cfg) { + Metadata metadata = MetadataHelper.getMetadata(cfg); + + SchemaExport export = new SchemaExport(); + export.setOutputFile(new File(outputDirectory, outputFileName).toString()); + export.setDelimiter(delimiter); + export.setHaltOnError(haltOnError); + export.setFormat(format); + export.execute(EnumSet.copyOf(this.targetTypes), schemaExportAction, metadata); + } +} diff --git a/maven-plugin/src/main/java/com/github/stadler/Hbm2JavaMojo.java b/maven-plugin/src/main/java/com/github/stadler/Hbm2JavaMojo.java new file mode 100644 index 0000000000..90ce8cf1fb --- /dev/null +++ b/maven-plugin/src/main/java/com/github/stadler/Hbm2JavaMojo.java @@ -0,0 +1,42 @@ +package com.github.stadler; + +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.hibernate.cfg.Configuration; +import org.hibernate.tool.hbm2x.POJOExporter; + +import java.io.File; + +import static org.apache.maven.plugins.annotations.LifecyclePhase.GENERATE_SOURCES; + +/** + * Mojo to generate Java JPA Entities from an existing database. + *

+ * See: https://docs.jboss.org/tools/latest/en/hibernatetools/html_single/#d0e4821 + */ +@Mojo(name = "hbm2java", defaultPhase = GENERATE_SOURCES) +public class Hbm2JavaMojo extends AbstractHbm2xMojo { + + @Parameter(defaultValue = "${project.build.directory}/generated-sources/") + private File outputDirectory; + @Parameter(defaultValue = "false") + private boolean ejb3; + @Parameter(defaultValue = "false") + private boolean jdk5; + @Parameter + private String templatePath; + + protected void executeExporter(Configuration cfg) { + POJOExporter pojoExporter = new POJOExporter(cfg, outputDirectory); + if (templatePath != null) { + getLog().info("Setting template path to: " + templatePath); + pojoExporter.setTemplatePath(new String[]{templatePath}); + } + pojoExporter.getProperties().setProperty("ejb3", String.valueOf(ejb3)); + pojoExporter.getProperties().setProperty("jdk5", String.valueOf(jdk5)); + getLog().info("Starting POJO export to directory: " + outputDirectory + "..."); + pojoExporter.start(); + } + + +} diff --git a/maven-plugin/src/site/site.xml b/maven-plugin/src/site/site.xml new file mode 100644 index 0000000000..44e762a10c --- /dev/null +++ b/maven-plugin/src/site/site.xml @@ -0,0 +1,29 @@ + + + + + org.apache.maven.skins + maven-fluido-skin + 1.7 + + + + + + apache/maven-skins + right + gray + + + + + +

+ + + + + + diff --git a/pom.xml b/pom.xml index 6850289c4f..27a4f2f6da 100644 --- a/pom.xml +++ b/pom.xml @@ -20,6 +20,7 @@ main + maven-plugin test From 67d75a5014276b12a8862d2ef534de61c51b0091 Mon Sep 17 00:00:00 2001 From: Jacques Stadler Date: Wed, 17 Jan 2018 22:26:04 +0100 Subject: [PATCH 008/560] HBX-1516: Switch the maven-plugin to hibernate-tools 6.0.0 API And with it switch to hibernate.properties instead of hibernate.cfg.xml file for configuration as it seems no longer to be possible to configure hibernate JDBC Configuration with xml --- maven-plugin/pom.xml | 22 +------ .../src/main/hibernate/hibernate.cfg.xml | 13 ----- .../src/main/hibernate/hibernate.cfg.xml | 13 ----- .../hibernate/mvn}/AbstractHbm2xMojo.java | 53 ++++++++++++----- .../hibernate/mvn}/Hbm2DdlMojo.java | 9 ++- .../hibernate/mvn}/Hbm2JavaMojo.java | 10 ++-- test/maven-plugin/pom.xml | 55 ++++++++++++++++++ .../src/it/hbm2ddl/invoker.properties | 0 .../maven-plugin}/src/it/hbm2ddl/pom.xml | 6 +- .../src/main/hibernate/hibernate.properties | 7 +++ .../src/main/hibernate/hibernate.reveng.xml | 0 .../maven-plugin}/src/it/hbm2ddl/test.mv.db | Bin .../src/it/hbm2ddl/verify.groovy | 0 .../src/it/hbm2java/invoker.properties | 0 .../maven-plugin}/src/it/hbm2java/pom.xml | 6 +- .../src/main/hibernate/hibernate.properties | 7 +++ .../src/main/hibernate/hibernate.reveng.xml | 0 .../main/resources/templates/pojo/Pojo.ftl | 0 .../resources/templates/pojo/PojoFields.ftl | 0 .../maven-plugin}/src/it/hbm2java/test.mv.db | Bin 28672 -> 24576 bytes .../src/it/hbm2java/verify.groovy | 0 .../maven-plugin}/src/it/settings.xml | 0 test/pom.xml | 12 ++-- 23 files changed, 132 insertions(+), 81 deletions(-) delete mode 100644 maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.cfg.xml delete mode 100644 maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.cfg.xml rename maven-plugin/src/main/java/{com/github/stadler => org/hibernate/mvn}/AbstractHbm2xMojo.java (60%) rename maven-plugin/src/main/java/{com/github/stadler => org/hibernate/mvn}/Hbm2DdlMojo.java (87%) rename maven-plugin/src/main/java/{com/github/stadler => org/hibernate/mvn}/Hbm2JavaMojo.java (79%) create mode 100644 test/maven-plugin/pom.xml rename {maven-plugin => test/maven-plugin}/src/it/hbm2ddl/invoker.properties (100%) rename {maven-plugin => test/maven-plugin}/src/it/hbm2ddl/pom.xml (92%) create mode 100644 test/maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.properties rename {maven-plugin => test/maven-plugin}/src/it/hbm2ddl/src/main/hibernate/hibernate.reveng.xml (100%) rename {maven-plugin => test/maven-plugin}/src/it/hbm2ddl/test.mv.db (100%) rename {maven-plugin => test/maven-plugin}/src/it/hbm2ddl/verify.groovy (100%) rename {maven-plugin => test/maven-plugin}/src/it/hbm2java/invoker.properties (100%) rename {maven-plugin => test/maven-plugin}/src/it/hbm2java/pom.xml (92%) create mode 100644 test/maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.properties rename {maven-plugin => test/maven-plugin}/src/it/hbm2java/src/main/hibernate/hibernate.reveng.xml (100%) rename {maven-plugin => test/maven-plugin}/src/it/hbm2java/src/main/resources/templates/pojo/Pojo.ftl (100%) rename {maven-plugin => test/maven-plugin}/src/it/hbm2java/src/main/resources/templates/pojo/PojoFields.ftl (100%) rename {maven-plugin => test/maven-plugin}/src/it/hbm2java/test.mv.db (77%) rename {maven-plugin => test/maven-plugin}/src/it/hbm2java/verify.groovy (100%) rename {maven-plugin => test/maven-plugin}/src/it/settings.xml (100%) diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 8e06a24fe0..5e67f002ea 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -53,6 +53,9 @@ + false + false + 3.5 3.5.2 @@ -112,25 +115,6 @@ - - maven-invoker-plugin - - true - ${project.build.directory}/it - src/it/settings.xml - ${project.build.directory}/local-repo - verify - install - - - - integration-test - - run - - - - diff --git a/maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.cfg.xml b/maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.cfg.xml deleted file mode 100644 index fe2b99a46a..0000000000 --- a/maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.cfg.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - org.hibernate.dialect.H2Dialect - org.h2.Driver - jdbc:h2:./test;DB_CLOSE_ON_EXIT=FALSE - sa - - 1 - true - - \ No newline at end of file diff --git a/maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.cfg.xml b/maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.cfg.xml deleted file mode 100644 index fe2b99a46a..0000000000 --- a/maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.cfg.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - org.hibernate.dialect.H2Dialect - org.h2.Driver - jdbc:h2:./test;DB_CLOSE_ON_EXIT=FALSE - sa - - 1 - true - - \ No newline at end of file diff --git a/maven-plugin/src/main/java/com/github/stadler/AbstractHbm2xMojo.java b/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java similarity index 60% rename from maven-plugin/src/main/java/com/github/stadler/AbstractHbm2xMojo.java rename to maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java index 8cbc42daee..33d3044dff 100644 --- a/maven-plugin/src/main/java/com/github/stadler/AbstractHbm2xMojo.java +++ b/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java @@ -1,17 +1,22 @@ -package com.github.stadler; +package org.hibernate.mvn; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugins.annotations.Parameter; -import org.hibernate.cfg.Configuration; -import org.hibernate.cfg.JDBCMetaDataConfiguration; +import org.apache.tools.ant.BuildException; import org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy; import org.hibernate.cfg.reveng.OverrideRepository; import org.hibernate.cfg.reveng.ReverseEngineeringSettings; import org.hibernate.cfg.reveng.ReverseEngineeringStrategy; +import org.hibernate.tool.api.metadata.MetadataDescriptor; +import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.Properties; public abstract class AbstractHbm2xMojo extends AbstractMojo { @@ -32,14 +37,18 @@ public abstract class AbstractHbm2xMojo extends AbstractMojo { private boolean createManyToOneForForeignKey; // For configuration - @Parameter(defaultValue = "${project.basedir}/src/main/hibernate/hibernate.cfg.xml") - private File configFile; + @Parameter(defaultValue = "${project.basedir}/src/main/hibernate/hibernate.properties") + private File propertyFile; + + // Not exposed for now + private boolean preferBasicCompositeIds = true; public void execute() throws MojoExecutionException, MojoFailureException { getLog().info("Starting " + this.getClass().getSimpleName() + "..."); ReverseEngineeringStrategy strategy = setupReverseEngineeringStrategy(); - JDBCMetaDataConfiguration cfg = setupJdbcMetaDataConfiguration(strategy); - executeExporter(cfg); + Properties properties = loadPropertiesFile(); + MetadataDescriptor jdbcDescriptor = createJdbcDescriptor(strategy, properties); + executeExporter(jdbcDescriptor); getLog().info("Finished " + this.getClass().getSimpleName() + "!"); } @@ -65,17 +74,29 @@ private ReverseEngineeringStrategy setupReverseEngineeringStrategy() { return strategy; } - private JDBCMetaDataConfiguration setupJdbcMetaDataConfiguration(ReverseEngineeringStrategy strategy) { - JDBCMetaDataConfiguration cfg = new JDBCMetaDataConfiguration(); - cfg.setReverseEngineeringStrategy(strategy); + private Properties loadPropertiesFile() { + if (propertyFile == null) { + return null; + } - getLog().info("Configuring using file: " + configFile + "..."); - cfg.configure(configFile); + Properties properties = new Properties(); + try (FileInputStream is = new FileInputStream(propertyFile);) { + properties.load(is); + return properties; + } catch (FileNotFoundException e) { + throw new BuildException(propertyFile + " not found.", e); + } catch (IOException e) { + throw new BuildException("Problem while loading " + propertyFile, e); + } + } - getLog().info("Reading from JDBC..."); - cfg.readFromJDBC(); - return cfg; + private MetadataDescriptor createJdbcDescriptor(ReverseEngineeringStrategy strategy, Properties properties) { + return MetadataDescriptorFactory + .createJdbcDescriptor( + strategy, + properties, + preferBasicCompositeIds); } - protected abstract void executeExporter(Configuration cfg); + protected abstract void executeExporter(MetadataDescriptor metadataDescriptor); } diff --git a/maven-plugin/src/main/java/com/github/stadler/Hbm2DdlMojo.java b/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2DdlMojo.java similarity index 87% rename from maven-plugin/src/main/java/com/github/stadler/Hbm2DdlMojo.java rename to maven-plugin/src/main/java/org/hibernate/mvn/Hbm2DdlMojo.java index 919cc92960..b2b4fc2886 100644 --- a/maven-plugin/src/main/java/com/github/stadler/Hbm2DdlMojo.java +++ b/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2DdlMojo.java @@ -1,12 +1,11 @@ -package com.github.stadler; +package org.hibernate.mvn; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; import org.hibernate.boot.Metadata; -import org.hibernate.cfg.Configuration; +import org.hibernate.tool.api.metadata.MetadataDescriptor; import org.hibernate.tool.hbm2ddl.SchemaExport; import org.hibernate.tool.schema.TargetType; -import org.hibernate.tool.util.MetadataHelper; import java.io.File; import java.util.EnumSet; @@ -39,8 +38,8 @@ public class Hbm2DdlMojo extends AbstractHbm2xMojo { @Override - protected void executeExporter(Configuration cfg) { - Metadata metadata = MetadataHelper.getMetadata(cfg); + protected void executeExporter(MetadataDescriptor metadataDescriptor) { + Metadata metadata = metadataDescriptor.createMetadata(); SchemaExport export = new SchemaExport(); export.setOutputFile(new File(outputDirectory, outputFileName).toString()); diff --git a/maven-plugin/src/main/java/com/github/stadler/Hbm2JavaMojo.java b/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2JavaMojo.java similarity index 79% rename from maven-plugin/src/main/java/com/github/stadler/Hbm2JavaMojo.java rename to maven-plugin/src/main/java/org/hibernate/mvn/Hbm2JavaMojo.java index 90ce8cf1fb..d600eee8e7 100644 --- a/maven-plugin/src/main/java/com/github/stadler/Hbm2JavaMojo.java +++ b/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2JavaMojo.java @@ -1,8 +1,8 @@ -package com.github.stadler; +package org.hibernate.mvn; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; -import org.hibernate.cfg.Configuration; +import org.hibernate.tool.api.metadata.MetadataDescriptor; import org.hibernate.tool.hbm2x.POJOExporter; import java.io.File; @@ -26,8 +26,10 @@ public class Hbm2JavaMojo extends AbstractHbm2xMojo { @Parameter private String templatePath; - protected void executeExporter(Configuration cfg) { - POJOExporter pojoExporter = new POJOExporter(cfg, outputDirectory); + protected void executeExporter(MetadataDescriptor metadataDescriptor) { + POJOExporter pojoExporter = new POJOExporter(); + pojoExporter.setMetadataDescriptor(metadataDescriptor); + pojoExporter.setOutputDirectory(outputDirectory); if (templatePath != null) { getLog().info("Setting template path to: " + templatePath); pojoExporter.setTemplatePath(new String[]{templatePath}); diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml new file mode 100644 index 0000000000..fe0db15186 --- /dev/null +++ b/test/maven-plugin/pom.xml @@ -0,0 +1,55 @@ + + + 4.0.0 + + + org.hibernate + hibernate-tools-tests-parent + 6.0.0-SNAPSHOT + + + hibernate-tools-tests-maven-plugin + + Hibernate Tools Maven Plugin Tests Project + + + 3.0.1 + + + + + org.hibernate + hibernate-tools-maven-plugin + ${project.version} + + + + + + + maven-invoker-plugin + ${maven-invoker-plugin.version} + + true + ${project.build.directory}/it + src/it/settings.xml + ${project.build.directory}/local-repo + verify + install + + + + integration-test + + run + + + + + + + + diff --git a/maven-plugin/src/it/hbm2ddl/invoker.properties b/test/maven-plugin/src/it/hbm2ddl/invoker.properties similarity index 100% rename from maven-plugin/src/it/hbm2ddl/invoker.properties rename to test/maven-plugin/src/it/hbm2ddl/invoker.properties diff --git a/maven-plugin/src/it/hbm2ddl/pom.xml b/test/maven-plugin/src/it/hbm2ddl/pom.xml similarity index 92% rename from maven-plugin/src/it/hbm2ddl/pom.xml rename to test/maven-plugin/src/it/hbm2ddl/pom.xml index e3962a340f..73aff79576 100644 --- a/maven-plugin/src/it/hbm2ddl/pom.xml +++ b/test/maven-plugin/src/it/hbm2ddl/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.github.stadler + org.hibernate hbm2ddl 0.0.1-SNAPSHOT @@ -14,13 +14,13 @@ 1.8 1.4.195 - 0.1.1-SNAPSHOT + 6.0.0-SNAPSHOT - com.github.stadler + org.hibernate hibernate-tools-maven-plugin ${hibernate-tools-maven-plugin.version} diff --git a/test/maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.properties b/test/maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.properties new file mode 100644 index 0000000000..71496b3adc --- /dev/null +++ b/test/maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.properties @@ -0,0 +1,7 @@ +hibernate.dialect=org.hibernate.dialect.H2Dialect +hibernate.connection.driver_class=org.h2.Driver +hibernate.connection.url=jdbc:h2:./test;DB_CLOSE_ON_EXIT=FALSE +hibernate.connection.username=sa +hibernate.connection.password= +hibernate.connection.pool_size=1 +hibernate.show_sql=true \ No newline at end of file diff --git a/maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.reveng.xml b/test/maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.reveng.xml similarity index 100% rename from maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.reveng.xml rename to test/maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.reveng.xml diff --git a/maven-plugin/src/it/hbm2ddl/test.mv.db b/test/maven-plugin/src/it/hbm2ddl/test.mv.db similarity index 100% rename from maven-plugin/src/it/hbm2ddl/test.mv.db rename to test/maven-plugin/src/it/hbm2ddl/test.mv.db diff --git a/maven-plugin/src/it/hbm2ddl/verify.groovy b/test/maven-plugin/src/it/hbm2ddl/verify.groovy similarity index 100% rename from maven-plugin/src/it/hbm2ddl/verify.groovy rename to test/maven-plugin/src/it/hbm2ddl/verify.groovy diff --git a/maven-plugin/src/it/hbm2java/invoker.properties b/test/maven-plugin/src/it/hbm2java/invoker.properties similarity index 100% rename from maven-plugin/src/it/hbm2java/invoker.properties rename to test/maven-plugin/src/it/hbm2java/invoker.properties diff --git a/maven-plugin/src/it/hbm2java/pom.xml b/test/maven-plugin/src/it/hbm2java/pom.xml similarity index 92% rename from maven-plugin/src/it/hbm2java/pom.xml rename to test/maven-plugin/src/it/hbm2java/pom.xml index cf7c359284..2c861977e3 100644 --- a/maven-plugin/src/it/hbm2java/pom.xml +++ b/test/maven-plugin/src/it/hbm2java/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.github.stadler + org.hibernate hbm2java 0.0.1-SNAPSHOT @@ -14,13 +14,13 @@ 1.8 1.4.195 - 0.1.1-SNAPSHOT + 6.0.0-SNAPSHOT - com.github.stadler + org.hibernate hibernate-tools-maven-plugin ${hibernate-tools-maven-plugin.version} diff --git a/test/maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.properties b/test/maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.properties new file mode 100644 index 0000000000..71496b3adc --- /dev/null +++ b/test/maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.properties @@ -0,0 +1,7 @@ +hibernate.dialect=org.hibernate.dialect.H2Dialect +hibernate.connection.driver_class=org.h2.Driver +hibernate.connection.url=jdbc:h2:./test;DB_CLOSE_ON_EXIT=FALSE +hibernate.connection.username=sa +hibernate.connection.password= +hibernate.connection.pool_size=1 +hibernate.show_sql=true \ No newline at end of file diff --git a/maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.reveng.xml b/test/maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.reveng.xml similarity index 100% rename from maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.reveng.xml rename to test/maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.reveng.xml diff --git a/maven-plugin/src/it/hbm2java/src/main/resources/templates/pojo/Pojo.ftl b/test/maven-plugin/src/it/hbm2java/src/main/resources/templates/pojo/Pojo.ftl similarity index 100% rename from maven-plugin/src/it/hbm2java/src/main/resources/templates/pojo/Pojo.ftl rename to test/maven-plugin/src/it/hbm2java/src/main/resources/templates/pojo/Pojo.ftl diff --git a/maven-plugin/src/it/hbm2java/src/main/resources/templates/pojo/PojoFields.ftl b/test/maven-plugin/src/it/hbm2java/src/main/resources/templates/pojo/PojoFields.ftl similarity index 100% rename from maven-plugin/src/it/hbm2java/src/main/resources/templates/pojo/PojoFields.ftl rename to test/maven-plugin/src/it/hbm2java/src/main/resources/templates/pojo/PojoFields.ftl diff --git a/maven-plugin/src/it/hbm2java/test.mv.db b/test/maven-plugin/src/it/hbm2java/test.mv.db similarity index 77% rename from maven-plugin/src/it/hbm2java/test.mv.db rename to test/maven-plugin/src/it/hbm2java/test.mv.db index 72d79270f88b69518fe17598ef53debfe7371c91..aba76d3403bc1e1b54e2526be9b9bc7c2f09288c 100644 GIT binary patch delta 833 zcmbW#&ubGw6bJB`MBR0fCSXHC6`Ru7f-K#c$?oiQQCK5*Y{eY)GP~~D(qt3z>sHv4 zN724NpyEHEAr}t{{t4bi>RIsUvFavGnne78oy(iUgL&`so%l13-{WU1DNdiSuH`t@ z!&=bscY>B9g)eC!iPo2g892_A{@Js?t!1e0)f)bu!}MAZITY?y7fnlV%Ev+5vGi7> z(Q&9S$?$lDl=aSTJ#a!EdV>2z?**;)ZX?lx@>Onq`RK}iWH>!JKbn+!wSb2PT-4s4R;Pm9$r^fFw6oxC|`u5 ziivv%ZXOIzg;%%B;JBp=xkx4>!LpTuLzCf~An$xDj7MfRC6^}iOD@O-eu6CntJ9u;w%-;uE4{pntX%*{|HV%7{>3yM-mI#EKv|hkdjcO%B|0K?8FvnlOlw~kfs?rAtC#Grd8V{%9mI` zkw8p{54{5$ZTSzPEG$U;1&qu=jNREvxqLWIgaQcR#b@c>$Io-W=h~leyN6#d1T^+0 zu^82u=e$>-0jlw{-BT$T7c@E= z(jY=E!@c|xyi|q0>mYZHf8f>b`}hgQJvh96BlmF_fyen!3c%@uw}%hz+kcV-VlG1RLvN{{Nv5#q&Xb zQId&~BGgy1r+_Hutils nodb common - h2 - hsql - mssql - oracle - mysql + maven-plugin + h2 + hsql + mssql + oracle + mysql @@ -45,6 +46,7 @@ utils nodb common + maven-plugin h2 From c6fc5b70170ca579f6c90826e5b780490fde41d3 Mon Sep 17 00:00:00 2001 From: Jacques Stadler Date: Wed, 17 Jan 2018 22:51:24 +0100 Subject: [PATCH 009/560] HBX-1516: Ensure that the site works as expected and drop obsolete properties --- maven-plugin/pom.xml | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 5e67f002ea..4f01f0f754 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -60,18 +60,6 @@ 3.5.2 - 3.5 - 3.0.2 - 2.5.2 - 3.0.0 - 3.7.0 - 3.0.1 - 1.6 - 2.5.3 - 2.8.2 - 2.20.1 - 3.0.0 - 3.0.1 2.9 3.7 0.12 @@ -99,6 +87,22 @@ + + + + maven-project-info-reports-plugin + ${maven-project-info-reports-plugin.version} + + + maven-site-plugin + ${maven-site-plugin.version} + + true + + + + + maven-plugin-plugin From 91ad34e8ef9a7354da788279bcb2f1c2145d3915 Mon Sep 17 00:00:00 2001 From: Jacques Stadler Date: Thu, 18 Jan 2018 20:25:30 +0100 Subject: [PATCH 010/560] HBX-1516: Remove declared but unused dependency --- test/maven-plugin/pom.xml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index fe0db15186..b1a32e89bf 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -19,14 +19,6 @@ 3.0.1 - - - org.hibernate - hibernate-tools-maven-plugin - ${project.version} - - - From e0bb24e04607053563164658ecefc5abe95d2fb4 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 22 Mar 2018 11:07:19 +0100 Subject: [PATCH 011/560] HBX-1516: Module versions should be 5.3.0-SNAPSHOT Signed-off-by: Koen Aers --- maven-plugin/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 4f01f0f754..fd8e5fbdee 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 6.0.0-SNAPSHOT + 5.3.0-SNAPSHOT hibernate-tools-maven-plugin diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index b1a32e89bf..544b800fb1 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 6.0.0-SNAPSHOT + 5.3.0-SNAPSHOT hibernate-tools-tests-maven-plugin From 3af360fd39a2a103755495cfe87b3c400e42af84 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sat, 24 Mar 2018 17:23:55 +0100 Subject: [PATCH 012/560] HBX-1404: Guard against connection leaks - Initial implementation of a connection leak detection class Signed-off-by: Koen Aers --- .../tools/test/util/ConnectionLeakUtil.java | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 test/utils/src/main/java/org/hibernate/tools/test/util/ConnectionLeakUtil.java diff --git a/test/utils/src/main/java/org/hibernate/tools/test/util/ConnectionLeakUtil.java b/test/utils/src/main/java/org/hibernate/tools/test/util/ConnectionLeakUtil.java new file mode 100644 index 0000000000..1046f5f2ec --- /dev/null +++ b/test/utils/src/main/java/org/hibernate/tools/test/util/ConnectionLeakUtil.java @@ -0,0 +1,65 @@ +package org.hibernate.tools.test.util; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; + +public class ConnectionLeakUtil { + + public static ConnectionLeakUtil forH2() { + ConnectionLeakUtil result = new ConnectionLeakUtil(); + result.idleConnectionCounter = new H2IdleConnectionCounter(); + return result; + } + + private IdleConnectionCounter idleConnectionCounter = null; + + private int connectionCount = 0; + + public void initialize() { + connectionCount = idleConnectionCounter.countConnections(); + } + + public int getLeakedConnectionCount() { + int previousCount = connectionCount; + connectionCount = idleConnectionCounter.countConnections(); + return connectionCount - previousCount; + } + + private static interface IdleConnectionCounter { + int countConnections(); + } + + private static class H2IdleConnectionCounter implements IdleConnectionCounter { + private Connection newConnection() { + try { + return DriverManager.getConnection("jdbc:h2:mem:test", "sa", ""); + } catch (SQLException e) { + throw new RuntimeException(e); + } + } + public int countConnections() { + try { + int result = 0; + Connection connection = newConnection(); + Statement statement = connection.createStatement(); + ResultSet resultSet = statement.executeQuery( + "SELECT COUNT(*) " + + "FROM information_schema.sessions " + + "WHERE statement IS NULL"); + while (resultSet.next()) { + result = resultSet.getInt(1); + } + statement.close(); + connection.close(); + return result; + } catch (SQLException e) { + throw new RuntimeException(e); + } + } + + } + +} From 7248a0101157d26612ea4fe9bd4993bc8dc7a6d3 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 27 Mar 2018 18:03:25 +0200 Subject: [PATCH 013/560] HBX-1404: Guard against connection leaks - Improve the connection leak detection class and add tests for it Signed-off-by: Koen Aers --- .../tools/test/util/ConnectionLeakUtil.java | 9 ++++- .../test/util/ConnectionLeakUtilTest.java | 38 +++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 test/utils/src/test/java/org/hibernate/tools/test/util/ConnectionLeakUtilTest.java diff --git a/test/utils/src/main/java/org/hibernate/tools/test/util/ConnectionLeakUtil.java b/test/utils/src/main/java/org/hibernate/tools/test/util/ConnectionLeakUtil.java index 1046f5f2ec..82858df7ef 100644 --- a/test/utils/src/main/java/org/hibernate/tools/test/util/ConnectionLeakUtil.java +++ b/test/utils/src/main/java/org/hibernate/tools/test/util/ConnectionLeakUtil.java @@ -6,6 +6,8 @@ import java.sql.SQLException; import java.sql.Statement; +import org.junit.Assert; + public class ConnectionLeakUtil { public static ConnectionLeakUtil forH2() { @@ -22,7 +24,12 @@ public void initialize() { connectionCount = idleConnectionCounter.countConnections(); } - public int getLeakedConnectionCount() { + public void assertNoLeaks() { + int leaked = getLeakedConnectionCount(); + Assert.assertTrue(leaked + " connections are leaked.", leaked == 0); + } + + private int getLeakedConnectionCount() { int previousCount = connectionCount; connectionCount = idleConnectionCounter.countConnections(); return connectionCount - previousCount; diff --git a/test/utils/src/test/java/org/hibernate/tools/test/util/ConnectionLeakUtilTest.java b/test/utils/src/test/java/org/hibernate/tools/test/util/ConnectionLeakUtilTest.java new file mode 100644 index 0000000000..262ef0430b --- /dev/null +++ b/test/utils/src/test/java/org/hibernate/tools/test/util/ConnectionLeakUtilTest.java @@ -0,0 +1,38 @@ +package org.hibernate.tools.test.util; + +import java.sql.Connection; +import java.sql.DriverManager; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +public class ConnectionLeakUtilTest { + + private ConnectionLeakUtil connectionLeakUtil = null; + + @Before + public void before() { + connectionLeakUtil = ConnectionLeakUtil.forH2(); + connectionLeakUtil.initialize(); + } + + @Test + public void testLeaks() throws Exception { + try { + DriverManager.getConnection("jdbc:h2:mem:test", "sa", ""); + connectionLeakUtil.assertNoLeaks(); + throw new RuntimeException("should not happen"); + } catch (AssertionError e) { + Assert.assertEquals("1 connections are leaked.", e.getMessage()); + } + } + + @Test + public void testNoLeaks() throws Exception { + Connection connection = DriverManager.getConnection("jdbc:h2:mem:test", "sa", ""); + connection.close(); + connectionLeakUtil.assertNoLeaks(); + } + +} From 214fe4b5c6d131ea5b576c609f853b4af5c6dfb1 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 28 Mar 2018 12:45:58 +0200 Subject: [PATCH 014/560] HBX-1538: 'formula' attribute is erroneously generated in addition to the nested element - Add test proving the problem Signed-off-by: Koen Aers --- .../tool/stat/Statistics/TestCase.java | 6 +- .../hbm2x/hbm2hbmxml/FormulaTest/Address.java | 49 +++++++++++ .../hbm2hbmxml/FormulaTest/AddressId.java | 39 +++++++++ .../hbm2hbmxml/FormulaTest/Customer.java | 34 ++++++++ .../hbm2hbmxml/FormulaTest/TestCase.java | 85 +++++++++++++++++++ .../hbm2hbmxml/FormulaTest/Customer.hbm.xml | 85 +++++++++++++++++++ 6 files changed, 293 insertions(+), 5 deletions(-) create mode 100644 test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Address.java create mode 100644 test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/AddressId.java create mode 100644 test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Customer.java create mode 100644 test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/TestCase.java create mode 100644 test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Customer.hbm.xml diff --git a/test/common/src/main/java/org/hibernate/tool/stat/Statistics/TestCase.java b/test/common/src/main/java/org/hibernate/tool/stat/Statistics/TestCase.java index 87734da755..471e6e3592 100644 --- a/test/common/src/main/java/org/hibernate/tool/stat/Statistics/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/stat/Statistics/TestCase.java @@ -27,11 +27,6 @@ public void tearDown() { public void testBrowser() throws Exception { MetadataSources mds = new MetadataSources(); mds.addResource("/org/hibernate/tool/stat/Statistics/UserGroup.hbm.xml"); -// StandardServiceRegistryBuilder ssrb = new StandardServiceRegistryBuilder(); -// ssrb.applySetting("hibernate.hbm2ddl.auto", "create"); -// ssrb.applySetting("hibernate.hbm2dll.create_namespaces", true); -// ssrb.applySetting("hibernate.show_sql", true); -// Metadata md = mds.buildMetadata(ssrb.build()); Metadata md = mds.buildMetadata(); SessionFactory sf = md.buildSessionFactory(); sf.getStatistics().setStatisticsEnabled(true); @@ -57,6 +52,7 @@ public void testBrowser() throws Exception { s.createQuery( "from java.lang.Object" ).getResultList(); tx.commit(); s.close(); + sf.close(); } } diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Address.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Address.java new file mode 100644 index 0000000000..3c157182d5 --- /dev/null +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Address.java @@ -0,0 +1,49 @@ +package org.hibernate.tool.hbm2x.hbm2hbmxml.FormulaTest; + +public class Address { + + private AddressId addressId; + private String street; + private String city; + private String state; + private String zip; + private Customer customer; + + public Customer getCustomer() { + return customer; + } + public void setCustomer(Customer customer) { + this.customer = customer; + } + + public String getCity() { + return city; + } + public void setCity(String city) { + this.city = city; + } + public String getState() { + return state; + } + public void setState(String state) { + this.state = state; + } + public String getStreet() { + return street; + } + public void setStreet(String street) { + this.street = street; + } + public String getZip() { + return zip; + } + public void setZip(String zip) { + this.zip = zip; + } + public AddressId getAddressId() { + return addressId; + } + public void setAddressId(AddressId addressId) { + this.addressId = addressId; + } +} diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/AddressId.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/AddressId.java new file mode 100644 index 0000000000..43ca6b1be1 --- /dev/null +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/AddressId.java @@ -0,0 +1,39 @@ +package org.hibernate.tool.hbm2x.hbm2hbmxml.FormulaTest; + +public class AddressId { + private String type; + private String addressId; + + public AddressId(String type, String customerId) { + this.addressId = customerId; + this.type = type; + } + + public AddressId() {} + + public String getType() { + return type; + } + public void setType(String type) { + this.type = type; + } + public String getAddressId() { + return addressId; + } + public void setAddressId(String customerId) { + this.addressId = customerId; + } + public boolean equals(Object other) { + if ( !(other instanceof AddressId) ) return false; + AddressId add = (AddressId) other; + return type.equals(add.type) && addressId.equals(add.addressId); + } + public int hashCode() { + return addressId.hashCode() + type.hashCode(); + } + + public String toString() { + return type + '#' + addressId; + } + +} diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Customer.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Customer.java new file mode 100644 index 0000000000..0af5a2ee64 --- /dev/null +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Customer.java @@ -0,0 +1,34 @@ +package org.hibernate.tool.hbm2x.hbm2hbmxml.FormulaTest; + +public class Customer { + + private String name; + private String customerId; + private Address billingAddress; + private Address shippingAddress; + + public Address getBillingAddress() { + return billingAddress; + } + public void setBillingAddress(Address billingAddress) { + this.billingAddress = billingAddress; + } + public String getCustomerId() { + return customerId; + } + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public Address getShippingAddress() { + return shippingAddress; + } + public void setShippingAddress(Address shippingAddress) { + this.shippingAddress = shippingAddress; + } +} diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/TestCase.java new file mode 100644 index 0000000000..fa51742be4 --- /dev/null +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/TestCase.java @@ -0,0 +1,85 @@ +/* + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.hibernate.tool.hbm2x.hbm2hbmxml.FormulaTest; + +import java.io.File; +import java.util.ArrayList; +import java.util.Properties; + +import org.hibernate.cfg.AvailableSettings; +import org.hibernate.tool.api.metadata.MetadataDescriptor; +import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; +import org.hibernate.tool.hbm2x.Exporter; +import org.hibernate.tool.hbm2x.HibernateMappingExporter; +import org.hibernate.tools.test.util.HibernateUtil; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; + +/** + * @author koen + */ +public class TestCase { + + private static final String[] HBM_XML_FILES = new String[] { + "Customer.hbm.xml" + }; + + @Rule + public TemporaryFolder temporaryFolder = new TemporaryFolder(); + + private File outputDir = null; + private File resourcesDir = null; + + private Exporter hbmexporter = null; + + @Before + public void setUp() throws Exception { + outputDir = new File(temporaryFolder.getRoot(), "output"); + outputDir.mkdir(); + resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir.mkdir(); + MetadataDescriptor metadataDescriptor = HibernateUtil + .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); + hbmexporter = new HibernateMappingExporter(); + hbmexporter.setMetadataDescriptor(metadataDescriptor); + hbmexporter.setOutputDirectory(outputDir); + hbmexporter.start(); + } + + @Test + public void testReadable() { + ArrayList files = new ArrayList(4); + files.add(new File( + outputDir, + "/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Customer.hbm.xml")); + files.add(new File( + outputDir, + "/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/BillingAddress.hbm.xml")); + files.add(new File( + outputDir, + "/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/ShippingAddress.hbm.xml")); + Properties properties = new Properties(); + properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory + .createNativeDescriptor(null, files.toArray(new File[2]), properties); + Assert.assertNotNull(metadataDescriptor.createMetadata()); + } + +} diff --git a/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Customer.hbm.xml b/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Customer.hbm.xml new file mode 100644 index 0000000000..5a878b2209 --- /dev/null +++ b/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Customer.hbm.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + 'BILLING' + + + + + 'SHIPPING' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 82e1eae97002e4ed5d2e0ef54e8ffcf55106373e Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 28 Mar 2018 13:39:20 +0200 Subject: [PATCH 015/560] HBX-1538: 'formula' attribute is erroneously generated in addition to the nested element - Problem solution Signed-off-by: Koen Aers --- main/src/main/resources/hbm/many-to-one.hbm.ftl | 6 ------ 1 file changed, 6 deletions(-) diff --git a/main/src/main/resources/hbm/many-to-one.hbm.ftl b/main/src/main/resources/hbm/many-to-one.hbm.ftl index 11fd1805b2..3a0cff5978 100644 --- a/main/src/main/resources/hbm/many-to-one.hbm.ftl +++ b/main/src/main/resources/hbm/many-to-one.hbm.ftl @@ -23,12 +23,6 @@ <#if !property.optimisticLocked> optimistic-lock="false" - -<#if property.value.hasFormula()> -<#assign formula = c2h.getFormulaForProperty(property)> -<#if formula?exists> - formula="${formula.text}" - > <#assign metaattributable=property> From 61ffc79ddd11e73e14a4cfe5231b00ca61d9b046 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 28 Mar 2018 15:29:08 +0200 Subject: [PATCH 016/560] HBX-1539: Update version identifier to 5.3.0.Beta2 Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 1f337e22c2..5432509c0f 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta2 hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 442aca5a39..f116d42126 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.3.0-SNAPSHOT"; + public static final String VERSION = "5.3.0.Beta2"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index fd8e5fbdee..c24e369300 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta2 hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 27a4f2f6da..68a8414f14 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta2 pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 26d931b2d1..4fc1c734ef 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta2 hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 000b58173e..6b3a45140a 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta2 hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 04f1320c59..0f6344a24a 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta2 hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 544b800fb1..d82412e8e4 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta2 hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 96c9b43616..2dfa2cc4d0 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta2 hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index caf5e1e0ec..6764583773 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta2 hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index a2d4cb533e..8b3c5406f0 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta2 hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 46736ead5a..f2765b12ca 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta2 hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 97ad6b320e..7f548d1789 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta2 hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index a3ff42aa0c..bb412c56bf 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta2 hibernate-tools-tests-utils From e8b147b4f4e2260d1bfb580574f62e9478c8e69b Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 28 Mar 2018 19:18:29 +0200 Subject: [PATCH 017/560] HBX-1540: Update the version to 5.3.0-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 5432509c0f..1f337e22c2 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.3.0.Beta2 + 5.3.0-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index f116d42126..442aca5a39 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.3.0.Beta2"; + public static final String VERSION = "5.3.0-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index c24e369300..fd8e5fbdee 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.3.0.Beta2 + 5.3.0-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 68a8414f14..27a4f2f6da 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.3.0.Beta2 + 5.3.0-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 4fc1c734ef..26d931b2d1 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta2 + 5.3.0-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 6b3a45140a..000b58173e 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta2 + 5.3.0-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 0f6344a24a..04f1320c59 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta2 + 5.3.0-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index d82412e8e4..544b800fb1 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta2 + 5.3.0-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 2dfa2cc4d0..96c9b43616 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta2 + 5.3.0-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 6764583773..caf5e1e0ec 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta2 + 5.3.0-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 8b3c5406f0..a2d4cb533e 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta2 + 5.3.0-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index f2765b12ca..46736ead5a 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta2 + 5.3.0-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 7f548d1789..97ad6b320e 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.3.0.Beta2 + 5.3.0-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index bb412c56bf..a3ff42aa0c 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta2 + 5.3.0-SNAPSHOT hibernate-tools-tests-utils From f920433388ac914f43c2ed261d23b25bd491590c Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 2 Apr 2018 11:05:31 +0200 Subject: [PATCH 018/560] HBX-1541: element is generated at wrong location - add a test that shows the problem Signed-off-by: Koen Aers --- .../tool/hbm2x/hbm2hbmxml/JoinTest/Child.java | 47 +++++++++++ .../hbm2x/hbm2hbmxml/JoinTest/Parent.java | 50 +++++++++++ .../hbm2x/hbm2hbmxml/JoinTest/TestCase.java | 82 +++++++++++++++++++ .../hbm2x/hbm2hbmxml/JoinTest/Parent.hbm.xml | 49 +++++++++++ 4 files changed, 228 insertions(+) create mode 100644 test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Child.java create mode 100644 test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Parent.java create mode 100644 test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/TestCase.java create mode 100644 test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Parent.hbm.xml diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Child.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Child.java new file mode 100644 index 0000000000..7fc6739d69 --- /dev/null +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Child.java @@ -0,0 +1,47 @@ +//$Id$ +package org.hibernate.tool.hbm2x.hbm2hbmxml.JoinTest; + +/** + * @author gavin + */ +public class Child { + private Long id; + private String name; + private Parent parent; + /** + * @return Returns the id. + */ + public Long getId() { + return id; + } + /** + * @param id The id to set. + */ + public void setId(Long id) { + this.id = id; + } + /** + * @return Returns the name. + */ + public String getName() { + return name; + } + /** + * @param name The name to set. + */ + public void setName(String name) { + this.name = name; + } + /** + * @return Returns the parent. + */ + public Parent getParent() { + return parent; + } + /** + * @param parent The parent to set. + */ + public void setParent(Parent parent) { + this.parent = parent; + } +} diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Parent.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Parent.java new file mode 100644 index 0000000000..0a272620d8 --- /dev/null +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Parent.java @@ -0,0 +1,50 @@ +//$Id$ +package org.hibernate.tool.hbm2x.hbm2hbmxml.JoinTest; + +import java.util.Collection; +import java.util.HashSet; + +/** + * @author gavin + */ +public class Parent { + private Long id; + private String name; + private Collection children = new HashSet(); + /** + * @return Returns the children. + */ + public Collection getChildren() { + return children; + } + /** + * @param children The children to set. + */ + public void setChildren(Collection children) { + this.children = children; + } + /** + * @return Returns the id. + */ + public Long getId() { + return id; + } + /** + * @param id The id to set. + */ + public void setId(Long id) { + this.id = id; + } + /** + * @return Returns the name. + */ + public String getName() { + return name; + } + /** + * @param name The name to set. + */ + public void setName(String name) { + this.name = name; + } +} diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/TestCase.java new file mode 100644 index 0000000000..9171be79de --- /dev/null +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/TestCase.java @@ -0,0 +1,82 @@ +/* + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.hibernate.tool.hbm2x.hbm2hbmxml.JoinTest; + +import java.io.File; +import java.util.ArrayList; +import java.util.Properties; + +import org.hibernate.cfg.AvailableSettings; +import org.hibernate.tool.api.metadata.MetadataDescriptor; +import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; +import org.hibernate.tool.hbm2x.Exporter; +import org.hibernate.tool.hbm2x.HibernateMappingExporter; +import org.hibernate.tools.test.util.HibernateUtil; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; + +/** + * @author koen + */ +public class TestCase { + + private static final String[] HBM_XML_FILES = new String[] { + "Parent.hbm.xml" + }; + + @Rule + public TemporaryFolder temporaryFolder = new TemporaryFolder(); + + private File outputDir = null; + private File resourcesDir = null; + + private Exporter hbmexporter = null; + + @Before + public void setUp() throws Exception { + outputDir = new File(temporaryFolder.getRoot(), "output"); + outputDir.mkdir(); + resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir.mkdir(); + MetadataDescriptor metadataDescriptor = HibernateUtil + .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); + hbmexporter = new HibernateMappingExporter(); + hbmexporter.setMetadataDescriptor(metadataDescriptor); + hbmexporter.setOutputDirectory(outputDir); + hbmexporter.start(); + } + + @Test + public void testReadable() { + ArrayList files = new ArrayList(4); + files.add(new File( + outputDir, + "/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Parent.hbm.xml")); + files.add(new File( + outputDir, + "/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Child.hbm.xml")); + Properties properties = new Properties(); + properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory + .createNativeDescriptor(null, files.toArray(new File[2]), properties); + Assert.assertNotNull(metadataDescriptor.createMetadata()); + } + +} diff --git a/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Parent.hbm.xml b/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Parent.hbm.xml new file mode 100644 index 0000000000..8f353f0db6 --- /dev/null +++ b/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Parent.hbm.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 7b5d33a2fdf722f46ceb7cb21ec2f6fe000ba939 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 2 Apr 2018 11:28:39 +0200 Subject: [PATCH 019/560] HBX-1541: element is generated at wrong location - Problem solution implementation Signed-off-by: Koen Aers --- .../resources/hbm/persistentclass.hbm.ftl | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/main/src/main/resources/hbm/persistentclass.hbm.ftl b/main/src/main/resources/hbm/persistentclass.hbm.ftl index 623b74104e..6fa0c0ac9f 100644 --- a/main/src/main/resources/hbm/persistentclass.hbm.ftl +++ b/main/src/main/resources/hbm/persistentclass.hbm.ftl @@ -65,24 +65,6 @@ <#if clazz.table.comment?exists && clazz.table.comment?trim?length!=0> ${clazz.table.comment} -<#foreach join in clazz.joinIterator> - - table="${join.table.name}" - > - <#if join.table.comment?exists && join.table.comment?trim?length!=0> - ${comment} - - - <#foreach column in join.key.columnIterator> - <#include "column.hbm.ftl"> - - - <#foreach property in join.propertyIterator> - <#include "${c2h.getTag(property)}.hbm.ftl"/> - - - <#-- TODO: move this to id.hbm.ftl --> <#if !c2h.isSubclass(clazz)> <#if clazz.hasIdentifierProperty()> @@ -141,4 +123,23 @@ +<#foreach join in clazz.joinIterator> + + table="${join.table.name}" + > + <#if join.table.comment?exists && join.table.comment?trim?length!=0> + ${comment} + + + <#foreach column in join.key.columnIterator> + <#include "column.hbm.ftl"> + + + <#foreach property in join.propertyIterator> + <#include "${c2h.getTag(property)}.hbm.ftl"/> + + + + From 8574db854a62ee68403b649206bfb50c4cb367d8 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sun, 8 Apr 2018 00:52:38 +0200 Subject: [PATCH 020/560] HBX-1543: Update version identifier to 5.3.0.Beta3 Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 1f337e22c2..051bf345e7 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta3 hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 442aca5a39..7f410f0baf 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.3.0-SNAPSHOT"; + public static final String VERSION = "5.3.0.Beta3"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index fd8e5fbdee..2ae76e633f 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta3 hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 27a4f2f6da..3106a73385 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta3 pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 26d931b2d1..b9691a9c44 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta3 hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 000b58173e..51a36089cb 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta3 hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 04f1320c59..ad7946de5b 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta3 hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 544b800fb1..e7b268a786 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta3 hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 96c9b43616..7aa3e612b3 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta3 hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index caf5e1e0ec..7c88110576 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta3 hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index a2d4cb533e..58d8d2fd44 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta3 hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 46736ead5a..c71287eed7 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta3 hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 97ad6b320e..043963b7db 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta3 hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index a3ff42aa0c..f3db69fbd2 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Beta3 hibernate-tools-tests-utils From 08a25417c5f7e1db5361300d5cd0d1db84eb5342 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 20 Apr 2018 11:12:09 +0200 Subject: [PATCH 021/560] HBX-1566: Update version identifier to 5.3.0-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 051bf345e7..1f337e22c2 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.3.0.Beta3 + 5.3.0-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 7f410f0baf..442aca5a39 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.3.0.Beta3"; + public static final String VERSION = "5.3.0-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 2ae76e633f..fd8e5fbdee 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.3.0.Beta3 + 5.3.0-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 3106a73385..27a4f2f6da 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.3.0.Beta3 + 5.3.0-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index b9691a9c44..26d931b2d1 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta3 + 5.3.0-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 51a36089cb..000b58173e 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta3 + 5.3.0-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index ad7946de5b..04f1320c59 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta3 + 5.3.0-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index e7b268a786..544b800fb1 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta3 + 5.3.0-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 7aa3e612b3..96c9b43616 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta3 + 5.3.0-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 7c88110576..caf5e1e0ec 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta3 + 5.3.0-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 58d8d2fd44..a2d4cb533e 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta3 + 5.3.0-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index c71287eed7..46736ead5a 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta3 + 5.3.0-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 043963b7db..97ad6b320e 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.3.0.Beta3 + 5.3.0-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index f3db69fbd2..a3ff42aa0c 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Beta3 + 5.3.0-SNAPSHOT hibernate-tools-tests-utils From 8abce9e64a4652d43f5e1df0b890096244f39ee8 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 20 Apr 2018 11:39:20 +0200 Subject: [PATCH 022/560] HBX-1567: Update Hibernate core dependency to 5.3.0.CR1 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 27a4f2f6da..fb2d44752c 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ 2.3.23 1.4.194 5.0.0.Final - 5.3.0.Beta2 + 5.3.0.CR1 1.0.0.Final 2.3.3 7.0 From 420c4ca92248838c27cbe4de00096433b1dcd66c Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sat, 21 Apr 2018 11:15:12 +0200 Subject: [PATCH 023/560] HBX-1568: Update the version to 5.3.0.CR1 Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 1f337e22c2..20ccd5e0b7 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.3.0-SNAPSHOT + 5.3.0.CR1 hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 442aca5a39..edbfb03374 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.3.0-SNAPSHOT"; + public static final String VERSION = "5.3.0.CR1"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index fd8e5fbdee..9392e7c71e 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.3.0-SNAPSHOT + 5.3.0.CR1 hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index fb2d44752c..918de6a15a 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.3.0-SNAPSHOT + 5.3.0.CR1 pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 26d931b2d1..a995aef81a 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.CR1 hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 000b58173e..813daa32e1 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.CR1 hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 04f1320c59..f221633533 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.CR1 hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 544b800fb1..553b03368a 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.CR1 hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 96c9b43616..ddad58992b 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.CR1 hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index caf5e1e0ec..f50c4ff40a 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.CR1 hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index a2d4cb533e..b1dffe252e 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.CR1 hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 46736ead5a..93acd00df2 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.CR1 hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 97ad6b320e..1afe150fc1 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.3.0-SNAPSHOT + 5.3.0.CR1 hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index a3ff42aa0c..fe81f347c2 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.CR1 hibernate-tools-tests-utils From d49ca28e40650a75ec1a3d4b093b3e5fe1269a89 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sun, 22 Apr 2018 07:47:17 +0200 Subject: [PATCH 024/560] HBX-1569: Update the version to 5.3.0-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 20ccd5e0b7..1f337e22c2 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.3.0.CR1 + 5.3.0-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index edbfb03374..442aca5a39 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.3.0.CR1"; + public static final String VERSION = "5.3.0-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 9392e7c71e..fd8e5fbdee 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.3.0.CR1 + 5.3.0-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 918de6a15a..fb2d44752c 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.3.0.CR1 + 5.3.0-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index a995aef81a..26d931b2d1 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.CR1 + 5.3.0-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 813daa32e1..000b58173e 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.CR1 + 5.3.0-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index f221633533..04f1320c59 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.CR1 + 5.3.0-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 553b03368a..544b800fb1 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.CR1 + 5.3.0-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index ddad58992b..96c9b43616 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.CR1 + 5.3.0-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index f50c4ff40a..caf5e1e0ec 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.CR1 + 5.3.0-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index b1dffe252e..a2d4cb533e 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.CR1 + 5.3.0-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 93acd00df2..46736ead5a 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.CR1 + 5.3.0-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 1afe150fc1..97ad6b320e 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.3.0.CR1 + 5.3.0-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index fe81f347c2..a3ff42aa0c 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.CR1 + 5.3.0-SNAPSHOT hibernate-tools-tests-utils From dcac2b6dff374df33553788ae63f2fbe2ffcd0e5 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 3 May 2018 15:43:51 +0200 Subject: [PATCH 025/560] HBX-1575: Update Hibernate core dependency to 5.3.0.CR2 Signed-off-by: Koen Aers --- .../hibernate/tool/hbm2x/Cfg2JavaTool.java | 4 +- .../detector/InstrumentationDetector.java | 25 ++--- .../metadata/JdbcMetadataDescriptor.java | 95 ++++--------------- pom.xml | 2 +- 4 files changed, 35 insertions(+), 91 deletions(-) diff --git a/main/src/main/java/org/hibernate/tool/hbm2x/Cfg2JavaTool.java b/main/src/main/java/org/hibernate/tool/hbm2x/Cfg2JavaTool.java index 21f0fac6cc..b690db649a 100644 --- a/main/src/main/java/org/hibernate/tool/hbm2x/Cfg2JavaTool.java +++ b/main/src/main/java/org/hibernate/tool/hbm2x/Cfg2JavaTool.java @@ -34,6 +34,7 @@ import org.hibernate.type.PrimitiveType; import org.hibernate.type.Type; import org.hibernate.type.TypeResolver; +import org.hibernate.type.spi.TypeConfiguration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -337,13 +338,14 @@ public String asArgumentList(List fields) { public String asFinderArgumentList(Map parameterTypes, ImportContext ctx) { StringBuffer buf = new StringBuffer(); Iterator> iter = parameterTypes.entrySet().iterator(); + TypeResolver typeResolver = new TypeConfiguration().getTypeResolver(); while ( iter.hasNext() ) { Entry entry = iter.next(); String typename = null; Type type = null; if(entry.getValue() instanceof String) { try { - type = new TypeResolver().heuristicType((String) entry.getValue()); + type = typeResolver.heuristicType((String) entry.getValue()); } catch(Throwable t) { type = null; typename = (String) entry.getValue(); diff --git a/main/src/main/java/org/hibernate/tool/hbmlint/detector/InstrumentationDetector.java b/main/src/main/java/org/hibernate/tool/hbmlint/detector/InstrumentationDetector.java index bf4a71ddf7..0ff24cb818 100644 --- a/main/src/main/java/org/hibernate/tool/hbmlint/detector/InstrumentationDetector.java +++ b/main/src/main/java/org/hibernate/tool/hbmlint/detector/InstrumentationDetector.java @@ -2,8 +2,9 @@ import org.hibernate.MappingException; import org.hibernate.boot.Metadata; -import org.hibernate.bytecode.internal.javassist.BytecodeProviderImpl; +import org.hibernate.bytecode.spi.BytecodeProvider; import org.hibernate.cfg.Environment; +import org.hibernate.engine.spi.Managed; import org.hibernate.mapping.PersistentClass; import org.hibernate.mapping.Property; import org.hibernate.tool.hbmlint.Issue; @@ -15,13 +16,15 @@ public String getName() { return "instrument"; } - private boolean javassistEnabled; + private boolean enhanceEnabled; public void initialize(Metadata metadata) { super.initialize(metadata); - if(Environment.getBytecodeProvider() instanceof BytecodeProviderImpl) { - javassistEnabled = true; - } + BytecodeProvider bytecodeProvider = Environment.getBytecodeProvider(); + if(bytecodeProvider instanceof org.hibernate.bytecode.internal.javassist.BytecodeProviderImpl || + bytecodeProvider instanceof org.hibernate.bytecode.internal.bytebuddy.BytecodeProviderImpl) { + enhanceEnabled = true; + } } protected void visit(PersistentClass clazz, IssueCollector collector) { @@ -45,17 +48,17 @@ protected void visit(PersistentClass clazz, IssueCollector collector) { return; } - } else if(javassistEnabled){ + } else if(enhanceEnabled){ Class[] interfaces = mappedClass.getInterfaces(); - boolean javaassist = false; + boolean enhanced = false; for (int i = 0; i < interfaces.length; i++) { - Class intface = interfaces[i]; - if(intface.getName().equals( "org.hibernate.bytecode.internal.javassist.FieldHandled" )) { - javaassist = true; + Class intface = interfaces[i]; + if(intface.getName().equals(Managed.class.getName())) { + enhanced = true; } } - if (javassistEnabled && !javaassist) { + if (enhanceEnabled && !enhanced) { collector.reportIssue( new Issue("LAZY_NOT_INSTRUMENTED", Issue.HIGH_PRIORITY, "'" + clazz.getEntityName() + "' has lazy='false', but its class '" + mappedClass.getName() + "' has not been instrumented with javaassist") ); return; } else { diff --git a/main/src/main/java/org/hibernate/tool/internal/metadata/JdbcMetadataDescriptor.java b/main/src/main/java/org/hibernate/tool/internal/metadata/JdbcMetadataDescriptor.java index a12997f1d2..d996484e78 100644 --- a/main/src/main/java/org/hibernate/tool/internal/metadata/JdbcMetadataDescriptor.java +++ b/main/src/main/java/org/hibernate/tool/internal/metadata/JdbcMetadataDescriptor.java @@ -4,37 +4,26 @@ import org.hibernate.MappingException; import org.hibernate.boot.Metadata; -import org.hibernate.boot.internal.ClassLoaderAccessImpl; +import org.hibernate.boot.internal.BootstrapContextImpl; import org.hibernate.boot.internal.InFlightMetadataCollectorImpl; import org.hibernate.boot.internal.MetadataBuilderImpl.MetadataBuildingOptionsImpl; import org.hibernate.boot.internal.MetadataBuildingContextRootImpl; -import org.hibernate.boot.model.TypeContributions; -import org.hibernate.boot.model.TypeContributor; +import org.hibernate.boot.internal.MetadataImpl; import org.hibernate.boot.registry.StandardServiceRegistry; import org.hibernate.boot.registry.StandardServiceRegistryBuilder; -import org.hibernate.boot.registry.classloading.spi.ClassLoaderService; -import org.hibernate.boot.spi.BasicTypeRegistration; -import org.hibernate.boot.spi.ClassLoaderAccess; +import org.hibernate.boot.spi.BootstrapContext; import org.hibernate.boot.spi.MetadataBuildingContext; import org.hibernate.boot.spi.MetadataBuildingOptions; import org.hibernate.cfg.Environment; import org.hibernate.cfg.JDBCBinder; import org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy; import org.hibernate.cfg.reveng.ReverseEngineeringStrategy; -import org.hibernate.dialect.Dialect; -import org.hibernate.engine.jdbc.spi.JdbcServices; import org.hibernate.engine.spi.Mapping; import org.hibernate.id.factory.IdentifierGeneratorFactory; import org.hibernate.mapping.PersistentClass; import org.hibernate.mapping.Property; import org.hibernate.tool.api.metadata.MetadataDescriptor; -import org.hibernate.type.BasicType; -import org.hibernate.type.BasicTypeRegistry; import org.hibernate.type.Type; -import org.hibernate.type.TypeFactory; -import org.hibernate.type.TypeResolver; -import org.hibernate.usertype.CompositeUserType; -import org.hibernate.usertype.UserType; public class JdbcMetadataDescriptor implements MetadataDescriptor { @@ -66,19 +55,24 @@ public Metadata createMetadata() { StandardServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder() .applySettings(getProperties()) .build(); - MetadataBuildingOptions metadataBuildingOptions = + MetadataBuildingOptionsImpl metadataBuildingOptions = new MetadataBuildingOptionsImpl( serviceRegistry ); + BootstrapContextImpl bootstrapContext = new BootstrapContextImpl( + serviceRegistry, + metadataBuildingOptions); + metadataBuildingOptions.setBootstrapContext(bootstrapContext); InFlightMetadataCollectorImpl metadataCollector = - getMetadataCollector(metadataBuildingOptions); - ClassLoaderAccess classLoaderAccess = - getClassLoaderAccess(metadataBuildingOptions); + getMetadataCollector( + bootstrapContext, + metadataBuildingOptions); MetadataBuildingContext metadataBuildingContext = new MetadataBuildingContextRootImpl( + bootstrapContext, metadataBuildingOptions, - classLoaderAccess, metadataCollector); - Metadata metadata = metadataCollector + MetadataImpl metadata = metadataCollector .buildMetadataInstance(metadataBuildingContext); + metadata.getTypeConfiguration().scope(metadataBuildingContext); JDBCBinder binder = new JDBCBinder( serviceRegistry, getProperties(), @@ -93,66 +87,11 @@ public Metadata createMetadata() { } private InFlightMetadataCollectorImpl getMetadataCollector( + BootstrapContext bootstrapContext, MetadataBuildingOptions metadataBuildingOptions) { - BasicTypeRegistry basicTypeRegistry = handleTypes( metadataBuildingOptions ); return new InFlightMetadataCollectorImpl( - metadataBuildingOptions, - new TypeResolver( basicTypeRegistry, new TypeFactory() ) - ); - } - - private BasicTypeRegistry handleTypes(MetadataBuildingOptions options) { - final ClassLoaderService classLoaderService = options.getServiceRegistry().getService( ClassLoaderService.class ); - - // ultimately this needs to change a little bit to account for HHH-7792 - final BasicTypeRegistry basicTypeRegistry = new BasicTypeRegistry(); - - final TypeContributions typeContributions = new TypeContributions() { - public void contributeType(BasicType type) { - basicTypeRegistry.register( type ); - } - - public void contributeType(BasicType type, String... keys) { - basicTypeRegistry.register( type, keys ); - } - - public void contributeType(UserType type, String... keys) { - basicTypeRegistry.register( type, keys ); - } - - public void contributeType(CompositeUserType type, String... keys) { - basicTypeRegistry.register( type, keys ); - } - }; - - // add Dialect contributed types - final Dialect dialect = options.getServiceRegistry().getService( JdbcServices.class ).getDialect(); - dialect.contributeTypes( typeContributions, options.getServiceRegistry() ); - - // add TypeContributor contributed types. - for ( TypeContributor contributor : classLoaderService.loadJavaServices( TypeContributor.class ) ) { - contributor.contribute( typeContributions, options.getServiceRegistry() ); - } - - // add explicit application registered types - for ( BasicTypeRegistration basicTypeRegistration : options.getBasicTypeRegistrations() ) { - basicTypeRegistry.register( - basicTypeRegistration.getBasicType(), - basicTypeRegistration.getRegistrationKeys() - ); - } - - return basicTypeRegistry; - } - - private ClassLoaderAccess getClassLoaderAccess( - MetadataBuildingOptions metadataBuildingOptions) { - ClassLoaderService classLoaderService = - metadataBuildingOptions.getServiceRegistry().getService( - ClassLoaderService.class ); - return new ClassLoaderAccessImpl( - metadataBuildingOptions.getTempClassLoader(), - classLoaderService); + bootstrapContext, + metadataBuildingOptions); } private Mapping buildMapping(final Metadata metadata) { diff --git a/pom.xml b/pom.xml index fb2d44752c..01249c93ea 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ 2.3.23 1.4.194 5.0.0.Final - 5.3.0.CR1 + 5.3.0.CR2 1.0.0.Final 2.3.3 7.0 From 1f99b931350b62f1c2c5195afa3651dfbe53443d Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 3 May 2018 17:44:30 +0200 Subject: [PATCH 026/560] HBX-1576: Update the version to 5.3.0.CR2 Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 1f337e22c2..7e6a2c5378 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.3.0-SNAPSHOT + 5.3.0.CR2 hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 442aca5a39..35c616b972 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.3.0-SNAPSHOT"; + public static final String VERSION = "5.3.0.CR2"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index fd8e5fbdee..69a6c1931c 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.3.0-SNAPSHOT + 5.3.0.CR2 hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 01249c93ea..095599a4e1 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.3.0-SNAPSHOT + 5.3.0.CR2 pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 26d931b2d1..9e24a3cb07 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.CR2 hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 000b58173e..950a962828 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.CR2 hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 04f1320c59..2416a66b5e 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.CR2 hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 544b800fb1..f0bc28cf7b 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.CR2 hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 96c9b43616..237b822ebb 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.CR2 hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index caf5e1e0ec..cd72425bc0 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.CR2 hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index a2d4cb533e..3ce7015de3 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.CR2 hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 46736ead5a..34dc3c17b6 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.CR2 hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 97ad6b320e..f1de1dbd4c 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.3.0-SNAPSHOT + 5.3.0.CR2 hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index a3ff42aa0c..9c06763ca9 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.CR2 hibernate-tools-tests-utils From 2c381043d2ee3d626d099296a1f57fb29643e3ff Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 4 May 2018 09:38:34 +0200 Subject: [PATCH 027/560] HBX-1577: Update version identifier to 5.3.0-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 7e6a2c5378..1f337e22c2 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.3.0.CR2 + 5.3.0-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 35c616b972..442aca5a39 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.3.0.CR2"; + public static final String VERSION = "5.3.0-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 69a6c1931c..fd8e5fbdee 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.3.0.CR2 + 5.3.0-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 095599a4e1..01249c93ea 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.3.0.CR2 + 5.3.0-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 9e24a3cb07..26d931b2d1 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.CR2 + 5.3.0-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 950a962828..000b58173e 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.CR2 + 5.3.0-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 2416a66b5e..04f1320c59 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.CR2 + 5.3.0-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index f0bc28cf7b..544b800fb1 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.CR2 + 5.3.0-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 237b822ebb..96c9b43616 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.CR2 + 5.3.0-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index cd72425bc0..caf5e1e0ec 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.CR2 + 5.3.0-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 3ce7015de3..a2d4cb533e 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.CR2 + 5.3.0-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 34dc3c17b6..46736ead5a 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.CR2 + 5.3.0-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index f1de1dbd4c..97ad6b320e 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.3.0.CR2 + 5.3.0-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 9c06763ca9..a3ff42aa0c 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.CR2 + 5.3.0-SNAPSHOT hibernate-tools-tests-utils From 28b8a4310dcc78a2410905a997b939bf341e1288 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 16 May 2018 15:47:44 +0200 Subject: [PATCH 028/560] HBX-1611: Update Hibernate core dependency to 5.3.0.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 01249c93ea..7d27f7980e 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ 2.3.23 1.4.194 5.0.0.Final - 5.3.0.CR2 + 5.3.0.Final 1.0.0.Final 2.3.3 7.0 From 8ef5bcfbe805dd0518e811c3b62b8f559d1c81e8 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 16 May 2018 16:12:41 +0200 Subject: [PATCH 029/560] HBX-1544: Update version identifier to 5.3.0.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 1f337e22c2..5dd9a2db36 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.3.0-SNAPSHOT + 5.3.0.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 442aca5a39..78ef5eaf23 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.3.0-SNAPSHOT"; + public static final String VERSION = "5.3.0.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index fd8e5fbdee..fc5fbb3c75 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.3.0-SNAPSHOT + 5.3.0.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 7d27f7980e..993fb53912 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.3.0-SNAPSHOT + 5.3.0.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 26d931b2d1..b70a6c5dec 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 000b58173e..968313b6ca 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 04f1320c59..e0380a3b6b 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 544b800fb1..455df08e59 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 96c9b43616..f1991ef7d3 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index caf5e1e0ec..1ae07ca28e 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index a2d4cb533e..afe7e688ac 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 46736ead5a..adafa005b4 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 97ad6b320e..e87ed3014c 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.3.0-SNAPSHOT + 5.3.0.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index a3ff42aa0c..cfd7309755 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0-SNAPSHOT + 5.3.0.Final hibernate-tools-tests-utils From ec6e032c0a07a6d39a04dd1cfa278e7683fd12a9 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 17 May 2018 07:58:31 +0200 Subject: [PATCH 030/560] HBX-1612: Update version identifier to 5.3.1-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 5dd9a2db36..4d6e1a61dc 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.3.0.Final + 5.3.1-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 78ef5eaf23..2ff0bc2c3e 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.3.0.Final"; + public static final String VERSION = "5.3.1-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index fc5fbb3c75..2c277dedca 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.3.0.Final + 5.3.1-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 993fb53912..dd295429c1 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.3.0.Final + 5.3.1-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index b70a6c5dec..2a9fce6abb 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Final + 5.3.1-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 968313b6ca..c6e1a9536c 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Final + 5.3.1-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index e0380a3b6b..91eefdb31e 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Final + 5.3.1-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 455df08e59..78254644c3 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Final + 5.3.1-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index f1991ef7d3..2e1e5090b1 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Final + 5.3.1-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 1ae07ca28e..2be8bb1664 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Final + 5.3.1-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index afe7e688ac..e51c8a31a5 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Final + 5.3.1-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index adafa005b4..68052dd5f3 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Final + 5.3.1-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index e87ed3014c..bb3e968937 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.3.0.Final + 5.3.1-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index cfd7309755..ed49c8a353 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.0.Final + 5.3.1-SNAPSHOT hibernate-tools-tests-utils From 85ba385d8ef3a3ef29ac8aa7eec5b1b102759291 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 17 May 2018 15:23:39 +0200 Subject: [PATCH 031/560] HBX-1615: Update Hibernate Commons Annotations dependency to version 5.0.3.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dd295429c1..ebdcc8783e 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ 3.12.2 2.3.23 1.4.194 - 5.0.0.Final + 5.0.3.Final 5.3.0.Final 1.0.0.Final 2.3.3 From 5095b48166ba09fcd74ac75e288bbb1180aee6d1 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 18 May 2018 07:36:49 +0200 Subject: [PATCH 032/560] HBX-1617: Replace the use of 'hibernate-jpa-2.1-api' with 'javax.persistence-api' Signed-off-by: Koen Aers --- main/pom.xml | 4 ++-- pom.xml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 4d6e1a61dc..24b30a8dfb 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -89,8 +89,8 @@ hibernate-commons-annotations - org.hibernate.javax.persistence - hibernate-jpa-2.1-api + javax.persistence + javax.persistence-api org.slf4j diff --git a/pom.xml b/pom.xml index ebdcc8783e..b05e68e9d0 100644 --- a/pom.xml +++ b/pom.xml @@ -33,7 +33,7 @@ 1.4.194 5.0.3.Final 5.3.0.Final - 1.0.0.Final + 2.2 2.3.3 7.0 1.1.6 @@ -138,9 +138,9 @@ ${hibernate-commons-annotations.version} - org.hibernate.javax.persistence - hibernate-jpa-2.1-api - ${hibernate-jpa.version} + javax.persistence + javax.persistence-api + ${javax.persistence-api.version} org.hsqldb From cef5aa2a8ee5503e18cafd024870cd342d3261ef Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 29 May 2018 08:54:37 +0200 Subject: [PATCH 033/560] HBX-1634: Update Hibernate core dependency to 5.3.1.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b05e68e9d0..6cb7ba3fc9 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ 2.3.23 1.4.194 5.0.3.Final - 5.3.0.Final + 5.3.1.Final 2.2 2.3.3 7.0 From d5c238e07e132aae7b619a1e17a7a4b90d7b2393 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 29 May 2018 16:31:22 +0200 Subject: [PATCH 034/560] HBX-1613: Update version identifier to 5.3.1.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 24b30a8dfb..cef59c2e89 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.3.1-SNAPSHOT + 5.3.1.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 2ff0bc2c3e..80b59e05dc 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.3.1-SNAPSHOT"; + public static final String VERSION = "5.3.1.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 2c277dedca..85f27d8d59 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.3.1-SNAPSHOT + 5.3.1.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 6cb7ba3fc9..114f5de5e0 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.3.1-SNAPSHOT + 5.3.1.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 2a9fce6abb..38e0b49f47 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.1-SNAPSHOT + 5.3.1.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index c6e1a9536c..dd75ba76a5 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.1-SNAPSHOT + 5.3.1.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 91eefdb31e..0ef3631283 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.1-SNAPSHOT + 5.3.1.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 78254644c3..02a3284aca 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.1-SNAPSHOT + 5.3.1.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 2e1e5090b1..0f9b77b97e 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.1-SNAPSHOT + 5.3.1.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 2be8bb1664..3d8e0a89e3 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.1-SNAPSHOT + 5.3.1.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index e51c8a31a5..8d4e8cf03b 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.1-SNAPSHOT + 5.3.1.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 68052dd5f3..6c3b4c37f9 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.1-SNAPSHOT + 5.3.1.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index bb3e968937..eb1b01d955 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.3.1-SNAPSHOT + 5.3.1.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index ed49c8a353..016a02982d 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.1-SNAPSHOT + 5.3.1.Final hibernate-tools-tests-utils From 9e02b1eab358e267ff1e4c6b6ce6fd3cd29a9c31 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 29 May 2018 17:58:51 +0200 Subject: [PATCH 035/560] HBX-1635: Update version identifier to 5.3.2-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index cef59c2e89..5eaed34597 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.3.1.Final + 5.3.2-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 80b59e05dc..d05f2c9c0e 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.3.1.Final"; + public static final String VERSION = "5.3.2-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 85f27d8d59..a5fb89e525 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.3.1.Final + 5.3.2-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 114f5de5e0..b0c7d8a499 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.3.1.Final + 5.3.2-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 38e0b49f47..382e6cbd5a 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.1.Final + 5.3.2-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index dd75ba76a5..476d8eaaf3 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.1.Final + 5.3.2-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 0ef3631283..94b30c1e80 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.1.Final + 5.3.2-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 02a3284aca..2282a3249c 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.1.Final + 5.3.2-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 0f9b77b97e..78d296000a 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.1.Final + 5.3.2-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 3d8e0a89e3..c08a4706a4 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.1.Final + 5.3.2-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 8d4e8cf03b..992d213097 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.1.Final + 5.3.2-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 6c3b4c37f9..dea5a0451b 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.1.Final + 5.3.2-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index eb1b01d955..dc893f278f 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.3.1.Final + 5.3.2-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 016a02982d..af988e36e8 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.1.Final + 5.3.2-SNAPSHOT hibernate-tools-tests-utils From b1f57da10b56d3384d4de7e310c334541b9e6535 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 26 Jun 2018 14:40:30 +0200 Subject: [PATCH 036/560] HBX-1093: Missing inverseJoinColumn at ManyToMany relations with composite keys - Add test that proves the issue Signed-off-by: Koen Aers --- .../org/hibernate/tool/hbx1093/TestCase.java | 65 +++++++++++++++++++ .../org/hibernate/tool/hbx1093/create.sql | 3 + .../org/hibernate/tool/hbx1093/drop.sql | 3 + 3 files changed, 71 insertions(+) create mode 100644 test/h2/src/test/java/org/hibernate/tool/hbx1093/TestCase.java create mode 100644 test/h2/src/test/resources/org/hibernate/tool/hbx1093/create.sql create mode 100644 test/h2/src/test/resources/org/hibernate/tool/hbx1093/drop.sql diff --git a/test/h2/src/test/java/org/hibernate/tool/hbx1093/TestCase.java b/test/h2/src/test/java/org/hibernate/tool/hbx1093/TestCase.java new file mode 100644 index 0000000000..420eec7d59 --- /dev/null +++ b/test/h2/src/test/java/org/hibernate/tool/hbx1093/TestCase.java @@ -0,0 +1,65 @@ +/* + * Created on 07-Dec-2004 + * + */ +package org.hibernate.tool.hbx1093; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; + +import org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy; +import org.hibernate.cfg.reveng.ReverseEngineeringSettings; +import org.hibernate.tool.api.metadata.MetadataDescriptor; +import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; +import org.hibernate.tool.hbm2x.POJOExporter; +import org.hibernate.tools.test.util.JdbcUtil; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; + +/** + * @author koen + */ +public class TestCase { + + @Rule + public TemporaryFolder temporaryFolder = new TemporaryFolder(); + + private MetadataDescriptor metadataDescriptor = null; + private File outputDir = null; + + @Before + public void setUp() { + JdbcUtil.createDatabase(this); + outputDir = temporaryFolder.getRoot(); + DefaultReverseEngineeringStrategy c = new DefaultReverseEngineeringStrategy(); + c.setSettings(new ReverseEngineeringSettings(c).setDetectManyToMany(true)); + metadataDescriptor = MetadataDescriptorFactory + .createJdbcDescriptor(c, null, true); + } + + @After + public void tearDown() { + JdbcUtil.dropDatabase(this); + } + + @Test + public void testGenerateJava() throws IOException { + POJOExporter exporter = new POJOExporter(); + exporter.setMetadataDescriptor(metadataDescriptor); + exporter.setOutputDirectory(outputDir); + exporter.getProperties().setProperty("ejb3", "true"); + exporter.start(); + File etManyToManyComp1 = new File(outputDir, "EtManyToManyComp1.java"); + String str = new String(Files.readAllBytes(etManyToManyComp1.toPath())); + Assert.assertTrue(str.contains("@JoinColumn(name=\"FK_ET_MANY_TO_MANY_COMP22_ID\"")); + File etManyToManyComp2 = new File(outputDir, "EtManyToManyComp2.java"); + str = new String(Files.readAllBytes(etManyToManyComp2.toPath())); + Assert.assertTrue(str.contains("@JoinColumn(name=\"FK_ET_MANY_TO_MANY_COMP11_ID\"")); + } + +} diff --git a/test/h2/src/test/resources/org/hibernate/tool/hbx1093/create.sql b/test/h2/src/test/resources/org/hibernate/tool/hbx1093/create.sql new file mode 100644 index 0000000000..cdf1ffd9ff --- /dev/null +++ b/test/h2/src/test/resources/org/hibernate/tool/hbx1093/create.sql @@ -0,0 +1,3 @@ +CREATE TABLE ET_MANY_TO_MANY_COMP1 (ET_MANY_TO_MANY_COMP1_ID NUMBER, ET_MANY_TO_MANY_COMP11_ID NUMBER, FIELD VARCHAR2(10), PRIMARY KEY (ET_MANY_TO_MANY_COMP1_ID, ET_MANY_TO_MANY_COMP11_ID)) +CREATE TABLE ET_MANY_TO_MANY_COMP2 ( ET_MANY_TO_MANY_COMP2_ID NUMBER, ET_MANY_TO_MANY_COMP22_ID NUMBER, FIELD VARCHAR2(10), PRIMARY KEY (ET_MANY_TO_MANY_COMP2_ID, ET_MANY_TO_MANY_COMP22_ID)) +CREATE TABLE ET_MANY_TO_MANY_COMP_MAPPING ( FK_ET_MANY_TO_MANY_COMP1_ID NUMBER, FK_ET_MANY_TO_MANY_COMP11_ID NUMBER, FK_ET_MANY_TO_MANY_COMP2_ID NUMBER, FK_ET_MANY_TO_MANY_COMP22_ID NUMBER, FOREIGN KEY (FK_ET_MANY_TO_MANY_COMP1_ID,FK_ET_MANY_TO_MANY_COMP11_ID) REFERENCES ET_MANY_TO_MANY_COMP1(ET_MANY_TO_MANY_COMP1_ID,ET_MANY_TO_MANY_COMP11_ID), FOREIGN KEY (FK_ET_MANY_TO_MANY_COMP2_ID, FK_ET_MANY_TO_MANY_COMP22_ID) REFERENCES ET_MANY_TO_MANY_COMP2(ET_MANY_TO_MANY_COMP2_ID, ET_MANY_TO_MANY_COMP22_ID), PRIMARY KEY (FK_ET_MANY_TO_MANY_COMP1_ID,FK_ET_MANY_TO_MANY_COMP11_ID,FK_ET_MANY_TO_MANY_COMP2_ID,FK_ET_MANY_TO_MANY_COMP22_ID) ) diff --git a/test/h2/src/test/resources/org/hibernate/tool/hbx1093/drop.sql b/test/h2/src/test/resources/org/hibernate/tool/hbx1093/drop.sql new file mode 100644 index 0000000000..ffc413a279 --- /dev/null +++ b/test/h2/src/test/resources/org/hibernate/tool/hbx1093/drop.sql @@ -0,0 +1,3 @@ +DROP TABLE ET_MANY_TO_MANY_COMP_MAPPING +DROP TABLE ET_MANY_TO_MANY_COMP2 +DROP TABLE ET_MANY_TO_MANY_COMP1 \ No newline at end of file From 2aa6d80e56f201849b9efe7acdb1f5007ada927b Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 26 Jun 2018 14:48:18 +0200 Subject: [PATCH 037/560] HBX-1093: Missing inverseJoinColumn at ManyToMany relations with composite keys - Problem solution Signed-off-by: Koen Aers --- main/src/main/java/org/hibernate/cfg/JDBCBinder.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main/src/main/java/org/hibernate/cfg/JDBCBinder.java b/main/src/main/java/org/hibernate/cfg/JDBCBinder.java index 625513ded8..aadf797bd9 100644 --- a/main/src/main/java/org/hibernate/cfg/JDBCBinder.java +++ b/main/src/main/java/org/hibernate/cfg/JDBCBinder.java @@ -489,7 +489,14 @@ private Property bindOneToMany(PersistentClass rc, ForeignKey foreignKey, Set columnIterator = fk.getColumns().iterator(); + while (columnIterator.hasNext()) { + Column fkcolumn = (Column) columnIterator.next(); + if(fkcolumn.getSqlTypeCode() != null) { // TODO: user defined foreign ref columns does not have a type set. + guessAndAlignType(fk.getTable(), fkcolumn, mapping, false); // needed to ensure foreign key columns has same type as the "property" column. + } + element.addColumn(fkcolumn); + } collection.setElement( element ); } else { From 3a5f312e4971ba89c15ea4c4f07898d059a6b816 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 10 Jul 2018 16:38:54 +0200 Subject: [PATCH 038/560] HBX-1698: Update Hibernate core dependency to 5.3.2.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b0c7d8a499..4db87146f4 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ 2.3.23 1.4.194 5.0.3.Final - 5.3.1.Final + 5.3.2.Final 2.2 2.3.3 7.0 From 294dab2ec8d72fe4049b7f6ccdeb479d43ddd1e8 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 10 Jul 2018 17:23:29 +0200 Subject: [PATCH 039/560] HBX-1636: Update version identifier to 5.3.2.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 5eaed34597..05b7cbb87e 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.3.2-SNAPSHOT + 5.3.2.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index d05f2c9c0e..8461c518d7 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.3.2-SNAPSHOT"; + public static final String VERSION = "5.3.2.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index a5fb89e525..fcfc8c2457 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.3.2-SNAPSHOT + 5.3.2.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 4db87146f4..8415108c1a 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.3.2-SNAPSHOT + 5.3.2.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 382e6cbd5a..f09f410ff7 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.2-SNAPSHOT + 5.3.2.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 476d8eaaf3..e3e6f8e6d1 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.2-SNAPSHOT + 5.3.2.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 94b30c1e80..34acd2ecbf 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.2-SNAPSHOT + 5.3.2.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 2282a3249c..145760c46f 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.2-SNAPSHOT + 5.3.2.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 78d296000a..273083a95f 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.2-SNAPSHOT + 5.3.2.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index c08a4706a4..11a5c6b62f 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.2-SNAPSHOT + 5.3.2.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 992d213097..6261cc3401 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.2-SNAPSHOT + 5.3.2.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index dea5a0451b..844d2fb71f 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.2-SNAPSHOT + 5.3.2.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index dc893f278f..a4cdc8a4a6 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.3.2-SNAPSHOT + 5.3.2.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index af988e36e8..d291004e23 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.2-SNAPSHOT + 5.3.2.Final hibernate-tools-tests-utils From faf46bd77ce59628c0530f6cfd95c4801f7dc72f Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 11 Jul 2018 10:02:30 +0200 Subject: [PATCH 040/560] HBX-1700: Update version identifier to 5.4.0-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 05b7cbb87e..4858f90eb0 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.3.2.Final + 5.4.0-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 8461c518d7..82aa6949d3 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.3.2.Final"; + public static final String VERSION = "5.4.0-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index fcfc8c2457..6eba28e982 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.3.2.Final + 5.4.0-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 8415108c1a..93c7355932 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.3.2.Final + 5.4.0-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index f09f410ff7..97b1dd746d 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.2.Final + 5.4.0-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index e3e6f8e6d1..dab404399d 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.2.Final + 5.4.0-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 34acd2ecbf..d204ebf586 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.2.Final + 5.4.0-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 145760c46f..620a151845 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.2.Final + 5.4.0-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 273083a95f..9a86338d6c 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.2.Final + 5.4.0-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 11a5c6b62f..7799f86ecc 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.2.Final + 5.4.0-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 6261cc3401..785ecce19e 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.2.Final + 5.4.0-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 844d2fb71f..65805a4910 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.2.Final + 5.4.0-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index a4cdc8a4a6..314ef30d7d 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.3.2.Final + 5.4.0-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index d291004e23..c504090a37 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.3.2.Final + 5.4.0-SNAPSHOT hibernate-tools-tests-utils From 278cf33dc0eea38f4e82156d3e8e7bf9040ca905 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 31 Jul 2018 11:08:02 +0200 Subject: [PATCH 041/560] HBX-1714: Make the build run on Java 9 and Java 10 Signed-off-by: Koen Aers --- pom.xml | 28 +++++++++++++++++++++++++++- test/utils/pom.xml | 16 ++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 93c7355932..5b34dca145 100644 --- a/pom.xml +++ b/pom.xml @@ -33,9 +33,11 @@ 1.4.194 5.0.3.Final 5.3.2.Final + 1.2.0 2.2 2.3.3 7.0 + 2.3.0 1.1.6 4.12 6.0.6 @@ -137,11 +139,35 @@ hibernate-commons-annotations ${hibernate-commons-annotations.version} - + + javax.activation + javax.activation-api + ${javax.activation-api.version} + runtime + + javax.persistence javax.persistence-api ${javax.persistence-api.version} + + javax.xml.bind + jaxb-api + ${jaxb.version} + runtime + + + com.sun.xml.bind + jaxb-impl + ${jaxb.version} + runtime + + + com.sun.xml.bind + jaxb-core + ${jaxb.version} + runtime + org.hsqldb hsqldb diff --git a/test/utils/pom.xml b/test/utils/pom.xml index c504090a37..ac06e58455 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -34,6 +34,22 @@ org.hibernate hibernate-tools + + javax.xml.bind + jaxb-api + + + com.sun.xml.bind + jaxb-impl + + + com.sun.xml.bind + jaxb-core + + + javax.activation + javax.activation-api + From 3dd248ad4bec00bc25950dba02c787307e49caed Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 3 Aug 2018 18:03:41 +0200 Subject: [PATCH 042/560] HBX-1719: Update jboss parent version to 28 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5b34dca145..bff5cd2301 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ org.jboss jboss-parent - 24 + 28 org.hibernate From cc59d52fcdfd02907c0b98efc6bef01d2131e3d5 Mon Sep 17 00:00:00 2001 From: dgf Date: Wed, 4 Jul 2018 18:01:39 +0100 Subject: [PATCH 043/560] HBX-1720: Re-add RevengStrategy Parameter Signed-off-by: Koen Aers --- .../main/java/org/hibernate/mvn/AbstractHbm2xMojo.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java b/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java index 33d3044dff..de7bfa592d 100644 --- a/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java +++ b/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java @@ -5,7 +5,6 @@ import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugins.annotations.Parameter; import org.apache.tools.ant.BuildException; -import org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy; import org.hibernate.cfg.reveng.OverrideRepository; import org.hibernate.cfg.reveng.ReverseEngineeringSettings; import org.hibernate.cfg.reveng.ReverseEngineeringStrategy; @@ -25,6 +24,8 @@ public abstract class AbstractHbm2xMojo extends AbstractMojo { private String packageName; @Parameter private File revengFile; + @Parameter(defaultValue = "org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy") + private String revengStrategy; @Parameter(defaultValue = "true") private boolean detectManyToMany; @Parameter(defaultValue = "true") @@ -53,7 +54,12 @@ public void execute() throws MojoExecutionException, MojoFailureException { } private ReverseEngineeringStrategy setupReverseEngineeringStrategy() { - ReverseEngineeringStrategy strategy = new DefaultReverseEngineeringStrategy(); + ReverseEngineeringStrategy strategy; + try { + strategy = ReverseEngineeringStrategy.class.cast(Class.forName(revengStrategy).newInstance()); + } catch (InstantiationException | IllegalAccessException | ClassNotFoundException | ClassCastException e) { + throw new BuildException(revengStrategy + " not instanced.", e); + } if (revengFile != null) { OverrideRepository override = new OverrideRepository(); From 660bf0b25444211711a415554c0fc836117c279b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20Gr=C3=A4f?= Date: Sat, 4 Aug 2018 14:42:03 +0100 Subject: [PATCH 044/560] HBX-1720: Re-add RevengStrategy Parameter - document revengStrategy parameter Signed-off-by: Koen Aers --- .../src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java b/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java index de7bfa592d..1d7578110c 100644 --- a/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java +++ b/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java @@ -24,6 +24,9 @@ public abstract class AbstractHbm2xMojo extends AbstractMojo { private String packageName; @Parameter private File revengFile; + /** The class name of the reverse engineering strategy to use. + * Extend the DefaultReverseEngineeringStrategy and override the corresponding methods, e.g. + * to adapt the generate class names or to provide custom type mappings. */ @Parameter(defaultValue = "org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy") private String revengStrategy; @Parameter(defaultValue = "true") From dd63c22fa6480406e101d38de357c9372e988128 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 7 Aug 2018 13:38:11 +0200 Subject: [PATCH 045/560] HBX-1721: Update Hibernate core dependency to 5.3.4.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bff5cd2301..00e81348ec 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ 2.3.23 1.4.194 5.0.3.Final - 5.3.2.Final + 5.3.4.Final 1.2.0 2.2 2.3.3 From 097aa51a0a58e298be0531cdd4d5b60d7c882cb4 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sun, 9 Sep 2018 00:33:25 +0200 Subject: [PATCH 046/560] HBX-1726: Update Hibernate core dependency to 5.3.5.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 00e81348ec..3bbd8846ff 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ 2.3.23 1.4.194 5.0.3.Final - 5.3.4.Final + 5.3.5.Final 1.2.0 2.2 2.3.3 From 44b36beb06a50208ca2be398141c24fe90ed234a Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 11 Sep 2018 09:53:33 +0200 Subject: [PATCH 047/560] HBX-1730: Update Hibernate core dependency to 5.3.6.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3bbd8846ff..ac19feff08 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ 2.3.23 1.4.194 5.0.3.Final - 5.3.5.Final + 5.3.6.Final 1.2.0 2.2 2.3.3 From 00bd0444cf39990b506abae21880f605ebb1aa9d Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 19 Oct 2018 21:49:05 +0200 Subject: [PATCH 048/560] HBX-1746: Update jboss-parent dependency to version 29 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ac19feff08..d71cb2bfed 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ org.jboss jboss-parent - 28 + 29 org.hibernate From d48d656d6e1b59155133d8efea7d4da37a263622 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 22 Oct 2018 12:27:11 +0200 Subject: [PATCH 049/560] HBX-1747: Update Hibernate core dependency to 5.3.7.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d71cb2bfed..0aed946591 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ 2.3.23 1.4.194 5.0.3.Final - 5.3.6.Final + 5.3.7.Final 1.2.0 2.2 2.3.3 From 17f4b2995308fcdd55adcf30cd0dbcd3e8d9edc7 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 25 Oct 2018 10:21:35 +0200 Subject: [PATCH 050/560] HBX-1749: Use @project.version@ instead of hardcoded version in the tests for hibernate-tools-maven Signed-off-by: Koen Aers --- test/maven-plugin/src/it/hbm2ddl/pom.xml | 3 +-- test/maven-plugin/src/it/hbm2java/pom.xml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/test/maven-plugin/src/it/hbm2ddl/pom.xml b/test/maven-plugin/src/it/hbm2ddl/pom.xml index 73aff79576..1bb46c5661 100644 --- a/test/maven-plugin/src/it/hbm2ddl/pom.xml +++ b/test/maven-plugin/src/it/hbm2ddl/pom.xml @@ -14,7 +14,6 @@ 1.8 1.4.195 - 6.0.0-SNAPSHOT @@ -22,7 +21,7 @@ org.hibernate hibernate-tools-maven-plugin - ${hibernate-tools-maven-plugin.version} + @project.version@ Schema generation diff --git a/test/maven-plugin/src/it/hbm2java/pom.xml b/test/maven-plugin/src/it/hbm2java/pom.xml index 2c861977e3..35fd6256d2 100644 --- a/test/maven-plugin/src/it/hbm2java/pom.xml +++ b/test/maven-plugin/src/it/hbm2java/pom.xml @@ -14,7 +14,6 @@ 1.8 1.4.195 - 6.0.0-SNAPSHOT @@ -22,7 +21,7 @@ org.hibernate hibernate-tools-maven-plugin - ${hibernate-tools-maven-plugin.version} + @project.version@ Entity generation From 603c442b09dbf7ea1c69f10a6106e7f5ba247baf Mon Sep 17 00:00:00 2001 From: Graham Collinson Date: Thu, 4 Oct 2018 12:16:21 +0100 Subject: [PATCH 051/560] HBX-1193: Exclude unique function based indexes from oracle Change-Id: I505c10e19e22cf35b54f709e22690b945fa47697 Signed-off-by: Koen Aers --- .../cfg/reveng/dialect/OracleMetaDataDialect.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/main/src/main/java/org/hibernate/cfg/reveng/dialect/OracleMetaDataDialect.java b/main/src/main/java/org/hibernate/cfg/reveng/dialect/OracleMetaDataDialect.java index 689ec1808a..8d3b7fd782 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/dialect/OracleMetaDataDialect.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/dialect/OracleMetaDataDialect.java @@ -67,7 +67,8 @@ public OracleMetaDataDialect() { + "from all_ind_columns a left join all_indexes b on " + "(a.table_name = b.table_name " + " AND a.table_owner = b.table_owner " - + " AND a.index_name = b.index_name) "; + + " AND a.index_name = b.index_name) " + + "where b.index_type not like 'FUNCTION-BASED%' "; private static final String SQL_INDEX_ORDER = " order by a.table_name, a.column_position"; @@ -75,13 +76,13 @@ public OracleMetaDataDialect() { + SQL_INDEX_ORDER; private static final String SQL_INDEX_SCHEMA = SQL_INDEX_BASE - + "where a.table_owner like ? " + SQL_INDEX_ORDER; + + "and a.table_owner like ? " + SQL_INDEX_ORDER; private static final String SQL_INDEX_TABLE = SQL_INDEX_BASE - + "where a.table_name like ? " + SQL_INDEX_ORDER; + + "and a.table_name like ? " + SQL_INDEX_ORDER; private static final String SQL_INDEX_SCHEMA_AND_TABLE = SQL_INDEX_BASE - + "where a.table_owner like ? and a.table_name like ? " + SQL_INDEX_ORDER; + + "and a.table_owner like ? and a.table_name like ? " + SQL_INDEX_ORDER; private PreparedStatement prepIndexNone; From 6a017de8d8516201f9d10255b44f96481ce09a1f Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 9 Nov 2018 13:17:22 +0100 Subject: [PATCH 052/560] HBX-1750: Remove unneeded '${project.version}' specification in hibernate-tools-orm dependency in maven/pom.xml Signed-off-by: Koen Aers --- maven-plugin/pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 6eba28e982..56e778d840 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -70,7 +70,6 @@ org.hibernate hibernate-tools - ${project.version} From c16678ec5b2741bec5b7c86da0d548bd1934541b Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sun, 11 Nov 2018 10:05:01 +0100 Subject: [PATCH 053/560] HBX-1751: Update ant dependency version to 1.10.5 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0aed946591..aabaaae76d 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ - 1.10.1 + 1.10.5 3.2.2 1.2 3.12.2 From 91a13fcd8730698df9898739f68624a61d1dbbc0 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 21 Nov 2018 10:34:20 +0100 Subject: [PATCH 054/560] HBX-1755: Update jboss-parent dependency to version 30 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index aabaaae76d..38db8a93df 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ org.jboss jboss-parent - 29 + 30 org.hibernate From b2466a25d9ea7ced4fe3c4c0c7dd6d5f107e7d63 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 26 Nov 2018 19:44:33 +0100 Subject: [PATCH 055/560] HBX-1756: Update Hibernate core dependency to 5.4.0.CR1 Signed-off-by: Koen Aers --- main/src/main/java/org/hibernate/cfg/reveng/JDBCReader.java | 3 +-- pom.xml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/main/src/main/java/org/hibernate/cfg/reveng/JDBCReader.java b/main/src/main/java/org/hibernate/cfg/reveng/JDBCReader.java index 7852523a43..817cd9ed09 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/JDBCReader.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/JDBCReader.java @@ -155,9 +155,8 @@ public Set readSequences(String sql) { try { statement = connection.createStatement(); rs = statement.executeQuery(sql); - while ( rs.next() ) { - sequences.add( rs.getString(1).toLowerCase().trim() ); + sequences.add( rs.getString("SEQUENCE_NAME").toLowerCase().trim() ); } } finally { diff --git a/pom.xml b/pom.xml index 38db8a93df..43ded1b7a4 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ 2.3.23 1.4.194 5.0.3.Final - 5.3.7.Final + 5.4.0.CR1 1.2.0 2.2 2.3.3 From b39ccc390940abd4d78ae70fb8b204f9b38b82f8 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 26 Nov 2018 20:39:36 +0100 Subject: [PATCH 056/560] HBX-1758: Update version identifier to 5.4.0.CR1 Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 4858f90eb0..551c6c0e1b 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.0-SNAPSHOT + 5.4.0.CR1 hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 82aa6949d3..113ced59ee 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.4.0-SNAPSHOT"; + public static final String VERSION = "5.4.0.CR1"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 56e778d840..06a74fad7b 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.0-SNAPSHOT + 5.4.0.CR1 hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 43ded1b7a4..6616bc62b4 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.0-SNAPSHOT + 5.4.0.CR1 pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 97b1dd746d..96c6523c80 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.CR1 hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index dab404399d..0153e5d22a 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.CR1 hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index d204ebf586..e744796e67 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.CR1 hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 620a151845..970fae0166 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.CR1 hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 9a86338d6c..a4a1181d9d 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.CR1 hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 7799f86ecc..8694ade044 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.CR1 hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 785ecce19e..3ed188548b 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.CR1 hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 65805a4910..9c2c8284bc 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.CR1 hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 314ef30d7d..2b76afab1d 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.0-SNAPSHOT + 5.4.0.CR1 hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index ac06e58455..62ddd2bf90 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.CR1 hibernate-tools-tests-utils From 72a0eb0a15501b01fbc66e1dc52f0e51c9c138de Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 26 Nov 2018 21:09:12 +0100 Subject: [PATCH 057/560] HBX-1759: Update version identifier to 5.4.0-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 551c6c0e1b..4858f90eb0 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.0.CR1 + 5.4.0-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 113ced59ee..82aa6949d3 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.4.0.CR1"; + public static final String VERSION = "5.4.0-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 06a74fad7b..56e778d840 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.0.CR1 + 5.4.0-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 6616bc62b4..43ded1b7a4 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.0.CR1 + 5.4.0-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 96c6523c80..97b1dd746d 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.CR1 + 5.4.0-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 0153e5d22a..dab404399d 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.CR1 + 5.4.0-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index e744796e67..d204ebf586 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.CR1 + 5.4.0-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 970fae0166..620a151845 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.CR1 + 5.4.0-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index a4a1181d9d..9a86338d6c 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.CR1 + 5.4.0-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 8694ade044..7799f86ecc 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.CR1 + 5.4.0-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 3ed188548b..785ecce19e 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.CR1 + 5.4.0-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 9c2c8284bc..65805a4910 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.CR1 + 5.4.0-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 2b76afab1d..314ef30d7d 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.0.CR1 + 5.4.0-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 62ddd2bf90..ac06e58455 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.CR1 + 5.4.0-SNAPSHOT hibernate-tools-tests-utils From 70c69c0e2b1994255c739f5076a0e03ed8b74391 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 4 Dec 2018 14:00:07 +0100 Subject: [PATCH 058/560] HBX-1768: Update eclipse-jdt-core dependency to version 3.15.0 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 43ded1b7a4..5669528d37 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ 1.10.5 3.2.2 1.2 - 3.12.2 + 3.15.0 2.3.23 1.4.194 5.0.3.Final From 1702808bc125922c8dcebd2186a1876ee13de947 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 5 Dec 2018 11:43:10 +0100 Subject: [PATCH 059/560] HBX-1769: Update Hibernate core dependency to 5.4.0.CR2 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5669528d37..fc313f649c 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ 2.3.23 1.4.194 5.0.3.Final - 5.4.0.CR1 + 5.4.0.CR2 1.2.0 2.2 2.3.3 From 836287a0ea89eb5a8c57697aaf3805fe24da1f4c Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 5 Dec 2018 13:18:33 +0100 Subject: [PATCH 060/560] HBX-1760: Update version identifier to 5.4.0.CR2 Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 4858f90eb0..be1af98966 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.0-SNAPSHOT + 5.4.0.CR2 hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 82aa6949d3..733c0122d8 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.4.0-SNAPSHOT"; + public static final String VERSION = "5.4.0.CR2"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 56e778d840..4461b90816 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.0-SNAPSHOT + 5.4.0.CR2 hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index fc313f649c..3692e3c02e 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.0-SNAPSHOT + 5.4.0.CR2 pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 97b1dd746d..97d6894fc8 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.CR2 hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index dab404399d..5411438857 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.CR2 hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index d204ebf586..2d8cde0b63 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.CR2 hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 620a151845..11b606b2a0 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.CR2 hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 9a86338d6c..185459926c 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.CR2 hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 7799f86ecc..9d3a9cb7a5 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.CR2 hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 785ecce19e..ae710d1feb 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.CR2 hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 65805a4910..d46b8584ab 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.CR2 hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 314ef30d7d..6f7292cc68 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.0-SNAPSHOT + 5.4.0.CR2 hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index ac06e58455..7a57504879 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.CR2 hibernate-tools-tests-utils From 63515c3f494fee892e7cca44f03571360b82239e Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 5 Dec 2018 13:51:50 +0100 Subject: [PATCH 061/560] HBX-1770: Update version identifier to 5.4.0-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index be1af98966..4858f90eb0 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.0.CR2 + 5.4.0-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 733c0122d8..82aa6949d3 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.4.0.CR2"; + public static final String VERSION = "5.4.0-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 4461b90816..56e778d840 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.0.CR2 + 5.4.0-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 3692e3c02e..fc313f649c 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.0.CR2 + 5.4.0-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 97d6894fc8..97b1dd746d 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.CR2 + 5.4.0-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 5411438857..dab404399d 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.CR2 + 5.4.0-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 2d8cde0b63..d204ebf586 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.CR2 + 5.4.0-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 11b606b2a0..620a151845 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.CR2 + 5.4.0-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 185459926c..9a86338d6c 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.CR2 + 5.4.0-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 9d3a9cb7a5..7799f86ecc 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.CR2 + 5.4.0-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index ae710d1feb..785ecce19e 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.CR2 + 5.4.0-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index d46b8584ab..65805a4910 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.CR2 + 5.4.0-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 6f7292cc68..314ef30d7d 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.0.CR2 + 5.4.0-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 7a57504879..ac06e58455 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.CR2 + 5.4.0-SNAPSHOT hibernate-tools-tests-utils From 9a4a502ffe3131041a887dce6f3ba72657044890 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 5 Dec 2018 14:09:11 +0100 Subject: [PATCH 062/560] HBX-1772: Update freemarker version to 2.3.28 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fc313f649c..d881fb439c 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ 3.2.2 1.2 3.15.0 - 2.3.23 + 2.3.28 1.4.194 5.0.3.Final 5.4.0.CR2 From 1388c902a5ecf2909f3cd59f9b3bc0e54de586a1 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sat, 8 Dec 2018 09:15:04 +0100 Subject: [PATCH 063/560] HBX-1773: Update hibernate commons annotations dependency to version 5.1.0.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d881fb439c..2ffd5261b4 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ 3.15.0 2.3.28 1.4.194 - 5.0.3.Final + 5.1.0.Final 5.4.0.CR2 1.2.0 2.2 From 827c04f10a918618c79a8dd06b3e5af930b5066a Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sun, 16 Dec 2018 18:51:01 +0100 Subject: [PATCH 064/560] HBX-1774: Update H2 version to 1.4.197 Signed-off-by: Koen Aers --- pom.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 2ffd5261b4..20fddc9b14 100644 --- a/pom.xml +++ b/pom.xml @@ -25,16 +25,16 @@ - 1.10.5 - 3.2.2 - 1.2 - 3.15.0 - 2.3.28 - 1.4.194 - 5.1.0.Final + 1.10.5 + 3.2.2 + 1.2 + 3.15.0 + 2.3.28 + 1.4.197 + 5.1.0.Final 5.4.0.CR2 - 1.2.0 - 2.2 + 1.2.0 + 2.2 2.3.3 7.0 2.3.0 From 461d8408838598f16c127e060fc06b0ee6481832 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 18 Dec 2018 14:40:22 +0100 Subject: [PATCH 065/560] HBX-1775: Update slf4j version to 1.7.25 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 20fddc9b14..62fa0290a3 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,7 @@ 4.12 6.0.6 12.2.0.1 - 1.7.23 + 1.7.25 6.1.7.jre8-preview From 73b317cac0750b57769c25d2fdb6dc38c1797483 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 20 Dec 2018 09:23:28 +0100 Subject: [PATCH 066/560] HBX-1780: Update Hibernate core dependency to 5.4.0.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 62fa0290a3..248ad9ab15 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ 2.3.28 1.4.197 5.1.0.Final - 5.4.0.CR2 + 5.4.0.Final 1.2.0 2.2 2.3.3 From 3647aa25f3c0e22f3dc9dae4d32afafaa50f0f34 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 20 Dec 2018 09:36:17 +0100 Subject: [PATCH 067/560] HBX-1771: Update version identifier to 5.4.0.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 4858f90eb0..72f309cc3d 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.0-SNAPSHOT + 5.4.0.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 82aa6949d3..999758c4f4 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.4.0-SNAPSHOT"; + public static final String VERSION = "5.4.0.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 56e778d840..c4a3dc25fe 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.0-SNAPSHOT + 5.4.0.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 248ad9ab15..86335c6b71 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.0-SNAPSHOT + 5.4.0.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 97b1dd746d..d67f515e1f 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index dab404399d..75365366c9 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index d204ebf586..df512f7fee 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 620a151845..95b4f902e1 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 9a86338d6c..0190df3e39 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 7799f86ecc..bac98fb8e8 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 785ecce19e..22abfd913a 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 65805a4910..15485fefab 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 314ef30d7d..058880cbd0 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.0-SNAPSHOT + 5.4.0.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index ac06e58455..ae0a9963b9 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0-SNAPSHOT + 5.4.0.Final hibernate-tools-tests-utils From 4f2d87c12f3e25130084d6fec3062207d6dc523e Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 20 Dec 2018 10:02:26 +0100 Subject: [PATCH 068/560] HBX-1777: Update version identifier to 5.4.1-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 72f309cc3d..0a28d06a3e 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.0.Final + 5.4.1-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 999758c4f4..c049bf3795 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.4.0.Final"; + public static final String VERSION = "5.4.1-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index c4a3dc25fe..15aedcf2cc 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.0.Final + 5.4.1-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 86335c6b71..03157df986 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.0.Final + 5.4.1-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index d67f515e1f..78aed8810b 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.Final + 5.4.1-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 75365366c9..a11422b3f8 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.Final + 5.4.1-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index df512f7fee..ccc6f36a03 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.Final + 5.4.1-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 95b4f902e1..84f3c5de02 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.Final + 5.4.1-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 0190df3e39..3a08a8339f 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.Final + 5.4.1-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index bac98fb8e8..fad3445e2a 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.Final + 5.4.1-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 22abfd913a..1b32a3d54e 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.Final + 5.4.1-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 15485fefab..9ac8313e08 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.Final + 5.4.1-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 058880cbd0..c874f9c982 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.0.Final + 5.4.1-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index ae0a9963b9..ca3e5d8a91 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.0.Final + 5.4.1-SNAPSHOT hibernate-tools-tests-utils From 3c797275c423551acdeb43ab4e4877d333056b16 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 9 Jan 2019 17:21:50 +0100 Subject: [PATCH 069/560] HBX-1781: Update jboss-parent dependency to version 31 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 03157df986..dec7ba718d 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ org.jboss jboss-parent - 30 + 31 org.hibernate From c815cf591b21e8cb1f84d1195f73a25288dffafa Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sat, 12 Jan 2019 07:29:48 +0100 Subject: [PATCH 070/560] HBX-1783: Remove unneeded dependency on jaxb Signed-off-by: Koen Aers --- pom.xml | 35 ++++++++--------------------------- test/utils/pom.xml | 12 ------------ 2 files changed, 8 insertions(+), 39 deletions(-) diff --git a/pom.xml b/pom.xml index dec7ba718d..e9e37f2157 100644 --- a/pom.xml +++ b/pom.xml @@ -25,19 +25,18 @@ - 1.10.5 - 3.2.2 - 1.2 - 3.15.0 - 2.3.28 + 1.10.5 + 3.2.2 + 1.2 + 3.15.0 + 2.3.28 1.4.197 - 5.1.0.Final + 5.1.0.Final 5.4.0.Final - 1.2.0 - 2.2 + 1.2.0 + 2.2 2.3.3 7.0 - 2.3.0 1.1.6 4.12 6.0.6 @@ -150,24 +149,6 @@ javax.persistence-api ${javax.persistence-api.version} - - javax.xml.bind - jaxb-api - ${jaxb.version} - runtime - - - com.sun.xml.bind - jaxb-impl - ${jaxb.version} - runtime - - - com.sun.xml.bind - jaxb-core - ${jaxb.version} - runtime - org.hsqldb hsqldb diff --git a/test/utils/pom.xml b/test/utils/pom.xml index ca3e5d8a91..ca4067bf64 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -33,18 +33,6 @@ org.hibernate hibernate-tools - - - javax.xml.bind - jaxb-api - - - com.sun.xml.bind - jaxb-impl - - - com.sun.xml.bind - jaxb-core javax.activation From 9690a43104a835f5ae7233c43c37ce57fbd80386 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sun, 13 Jan 2019 13:45:33 +0100 Subject: [PATCH 071/560] HBX-1784: Remove unneeded dependency on javax.activation Signed-off-by: Koen Aers --- pom.xml | 37 +++++++++++++++---------------------- test/utils/pom.xml | 4 ---- 2 files changed, 15 insertions(+), 26 deletions(-) diff --git a/pom.xml b/pom.xml index e9e37f2157..4d196d1de4 100644 --- a/pom.xml +++ b/pom.xml @@ -33,7 +33,6 @@ 1.4.197 5.1.0.Final 5.4.0.Final - 1.2.0 2.2 2.3.3 7.0 @@ -118,32 +117,26 @@ hibernate-core ${hibernate-core.version} - - org.hibernate - hibernate-tools - ${project.version} - - - org.hibernate - hibernate-tools-tests-common - ${project.version} - - - org.hibernate - hibernate-tools-tests-utils - ${project.version} - + + org.hibernate + hibernate-tools + ${project.version} + + + org.hibernate + hibernate-tools-tests-common + ${project.version} + + + org.hibernate + hibernate-tools-tests-utils + ${project.version} + org.hibernate.common hibernate-commons-annotations ${hibernate-commons-annotations.version} - - javax.activation - javax.activation-api - ${javax.activation-api.version} - runtime - javax.persistence javax.persistence-api diff --git a/test/utils/pom.xml b/test/utils/pom.xml index ca4067bf64..31b0fa7492 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -34,10 +34,6 @@ org.hibernate hibernate-tools - - javax.activation - javax.activation-api - From feb02d7b2f4a32c4c21a552626ca96270c0c8ee7 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sat, 19 Jan 2019 10:38:20 +0100 Subject: [PATCH 072/560] HBX-1793: Update org.eclipse.jdt.core dependency version to 3.16.0 Signed-off-by: Koen Aers --- pom.xml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/pom.xml b/pom.xml index 4d196d1de4..8f74a92910 100644 --- a/pom.xml +++ b/pom.xml @@ -28,14 +28,14 @@ 1.10.5 3.2.2 1.2 - 3.15.0 + 3.16.0 2.3.28 1.4.197 5.1.0.Final 5.4.0.Final - 2.2 2.3.3 7.0 + 2.2 1.1.6 4.12 6.0.6 @@ -53,16 +53,16 @@ test - com.microsoft.sqlserver - mssql-jdbc - ${sqlserver.version} - test + com.microsoft.sqlserver + mssql-jdbc + ${sqlserver.version} + test - com.oracle.jdbc - ojdbc8 - ${oracle.version} - test + com.oracle.jdbc + ojdbc8 + ${oracle.version} + test commons-collections @@ -80,6 +80,11 @@ ${javaee-api.version} test + + javax.persistence + javax.persistence-api + ${javax.persistence-api.version} + jaxen jaxen @@ -137,11 +142,6 @@ hibernate-commons-annotations ${hibernate-commons-annotations.version} - - javax.persistence - javax.persistence-api - ${javax.persistence-api.version} - org.hsqldb hsqldb From 3dd7ea15f88d0a086b277c512e5bd71afc17a4b4 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sat, 26 Jan 2019 10:29:33 +0100 Subject: [PATCH 073/560] HBX-1779: Update Hibernate core dependency to 5.4.1.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8f74a92910..8df3643ff3 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ 2.3.28 1.4.197 5.1.0.Final - 5.4.0.Final + 5.4.1.Final 2.3.3 7.0 2.2 From eda081fd76a679fee8c6dd967092cd0dd7bafba5 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sun, 27 Jan 2019 12:05:08 +0100 Subject: [PATCH 074/560] HBX-1778: Update version identifier to 5.4.1.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 0a28d06a3e..6d131d6182 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.1-SNAPSHOT + 5.4.1.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index c049bf3795..48f214cfb7 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.4.1-SNAPSHOT"; + public static final String VERSION = "5.4.1.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 15aedcf2cc..48783eef98 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.1-SNAPSHOT + 5.4.1.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 8df3643ff3..6762592074 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.1-SNAPSHOT + 5.4.1.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 78aed8810b..b0fba659fc 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.1-SNAPSHOT + 5.4.1.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index a11422b3f8..8adfd033f6 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.1-SNAPSHOT + 5.4.1.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index ccc6f36a03..7905a5d711 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.1-SNAPSHOT + 5.4.1.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 84f3c5de02..1b799c17d5 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.1-SNAPSHOT + 5.4.1.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 3a08a8339f..212199c208 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.1-SNAPSHOT + 5.4.1.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index fad3445e2a..5cfe2491d9 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.1-SNAPSHOT + 5.4.1.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 1b32a3d54e..a809f29cd8 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.1-SNAPSHOT + 5.4.1.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 9ac8313e08..5807119c85 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.1-SNAPSHOT + 5.4.1.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index c874f9c982..904997e298 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.1-SNAPSHOT + 5.4.1.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 31b0fa7492..de1ec04a29 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.1-SNAPSHOT + 5.4.1.Final hibernate-tools-tests-utils From 698bbd8e3018ea0fa7a0124afd8146dabf2e6dc6 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 28 Jan 2019 17:13:12 +0100 Subject: [PATCH 075/560] HBX-1794: Update version identifier to 5.4.2-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 6d131d6182..9035465116 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.1.Final + 5.4.2-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 48f214cfb7..71f8f47e60 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.4.1.Final"; + public static final String VERSION = "5.4.2-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 48783eef98..d36102c281 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.1.Final + 5.4.2-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 6762592074..69bfa61a48 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.1.Final + 5.4.2-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index b0fba659fc..5c8c1647ac 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.1.Final + 5.4.2-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 8adfd033f6..5e6304b409 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.1.Final + 5.4.2-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 7905a5d711..b764175aca 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.1.Final + 5.4.2-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 1b799c17d5..92d9e4868e 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.1.Final + 5.4.2-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 212199c208..d3f6189205 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.1.Final + 5.4.2-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 5cfe2491d9..bb3db57157 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.1.Final + 5.4.2-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index a809f29cd8..93b52c6aa1 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.1.Final + 5.4.2-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 5807119c85..4b7cf3f97a 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.1.Final + 5.4.2-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 904997e298..aed14aed7c 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.1.Final + 5.4.2-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index de1ec04a29..7ae0043913 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.1.Final + 5.4.2-SNAPSHOT hibernate-tools-tests-utils From 15e8e8b74c259b3c15a3525a4de9c3f0217a551e Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 31 Jan 2019 10:23:32 +0100 Subject: [PATCH 076/560] HBX-1795: Replace slf4j with jboss logging Signed-off-by: Koen Aers --- main/pom.xml | 16 ++++++---------- .../java/org/hibernate/cfg/JDBCBinder.java | 5 ++--- .../hibernate/cfg/binder/PropertyBinder.java | 5 ++--- .../cfg/reveng/BasicColumnProcessor.java | 5 ++--- .../DefaultReverseEngineeringStrategy.java | 5 ++--- .../cfg/reveng/ForeignKeyProcessor.java | 5 ++--- .../hibernate/cfg/reveng/IndexProcessor.java | 5 ++--- .../cfg/reveng/OverrideRepository.java | 5 ++--- .../cfg/reveng/PrimaryKeyProcessor.java | 5 ++--- .../hibernate/cfg/reveng/TableProcessor.java | 5 ++--- .../dialect/AbstractMetaDataDialect.java | 5 ++--- .../tool/hbm2x/AbstractExporter.java | 5 ++--- .../hibernate/tool/hbm2x/Cfg2JavaTool.java | 5 ++--- .../tool/hbm2x/ConfigurationNavigator.java | 5 ++--- .../hibernate/tool/hbm2x/TemplateHelper.java | 5 ++--- .../tool/hbm2x/TemplateProducer.java | 5 ++--- pom.xml | 19 +++++++------------ 17 files changed, 43 insertions(+), 67 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 9035465116..80ec99a184 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -64,6 +64,10 @@ commons-logging commons-logging + + javax.persistence + javax.persistence-api + jaxen jaxen @@ -89,17 +93,9 @@ hibernate-commons-annotations - javax.persistence - javax.persistence-api + org.jboss.logging + jboss-logging - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-log4j12 - diff --git a/main/src/main/java/org/hibernate/cfg/JDBCBinder.java b/main/src/main/java/org/hibernate/cfg/JDBCBinder.java index aadf797bd9..096c504ee7 100644 --- a/main/src/main/java/org/hibernate/cfg/JDBCBinder.java +++ b/main/src/main/java/org/hibernate/cfg/JDBCBinder.java @@ -58,8 +58,7 @@ import org.hibernate.tool.util.TableNameQualifier; import org.hibernate.type.ForeignKeyDirection; import org.hibernate.type.Type; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; /** @@ -69,7 +68,7 @@ public class JDBCBinder { private Properties properties; - private static final Logger log = LoggerFactory.getLogger(JDBCBinder.class); + private static final Logger log = Logger.getLogger(JDBCBinder.class); private final MetadataBuildingContext mdbc; diff --git a/main/src/main/java/org/hibernate/cfg/binder/PropertyBinder.java b/main/src/main/java/org/hibernate/cfg/binder/PropertyBinder.java index bfdd6cc767..053d7fc020 100644 --- a/main/src/main/java/org/hibernate/cfg/binder/PropertyBinder.java +++ b/main/src/main/java/org/hibernate/cfg/binder/PropertyBinder.java @@ -4,12 +4,11 @@ import org.hibernate.mapping.Property; import org.hibernate.mapping.Table; import org.hibernate.mapping.Value; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; public class PropertyBinder { - private static final Logger log = LoggerFactory.getLogger(PropertyBinder.class); + private static final Logger log = Logger.getLogger(PropertyBinder.class); public static Property makeProperty( Table table, diff --git a/main/src/main/java/org/hibernate/cfg/reveng/BasicColumnProcessor.java b/main/src/main/java/org/hibernate/cfg/reveng/BasicColumnProcessor.java index 407f96dab8..e3a87fd0cd 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/BasicColumnProcessor.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/BasicColumnProcessor.java @@ -10,12 +10,11 @@ import org.hibernate.mapping.Column; import org.hibernate.mapping.Table; import org.hibernate.tool.util.TableNameQualifier; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; public class BasicColumnProcessor { - private static final Logger log = LoggerFactory.getLogger(BasicColumnProcessor.class); + private static final Logger log = Logger.getLogger(BasicColumnProcessor.class); public static void processBasicColumns( MetaDataDialect metaDataDialect, diff --git a/main/src/main/java/org/hibernate/cfg/reveng/DefaultReverseEngineeringStrategy.java b/main/src/main/java/org/hibernate/cfg/reveng/DefaultReverseEngineeringStrategy.java index 06dcb43f00..8805261f3e 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/DefaultReverseEngineeringStrategy.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/DefaultReverseEngineeringStrategy.java @@ -17,12 +17,11 @@ import org.hibernate.mapping.PrimaryKey; import org.hibernate.mapping.Table; import org.hibernate.tool.util.TableNameQualifier; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; public class DefaultReverseEngineeringStrategy implements ReverseEngineeringStrategy { - static final private Logger log = LoggerFactory.getLogger(DefaultReverseEngineeringStrategy.class); + static final private Logger log = Logger.getLogger(DefaultReverseEngineeringStrategy.class); private static Set AUTO_OPTIMISTICLOCK_COLUMNS; diff --git a/main/src/main/java/org/hibernate/cfg/reveng/ForeignKeyProcessor.java b/main/src/main/java/org/hibernate/cfg/reveng/ForeignKeyProcessor.java index 081051e3f7..897daec7fa 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/ForeignKeyProcessor.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/ForeignKeyProcessor.java @@ -14,12 +14,11 @@ import org.hibernate.mapping.ForeignKey; import org.hibernate.mapping.Table; import org.hibernate.tool.util.TableNameQualifier; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; public class ForeignKeyProcessor { - private static final Logger log = LoggerFactory.getLogger(ForeignKeyProcessor.class); + private static final Logger log = Logger.getLogger(ForeignKeyProcessor.class); public static ForeignKeysInfo processForeignKeys( MetaDataDialect metaDataDialect, diff --git a/main/src/main/java/org/hibernate/cfg/reveng/IndexProcessor.java b/main/src/main/java/org/hibernate/cfg/reveng/IndexProcessor.java index 44eb94b6e3..4c3ff2bb30 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/IndexProcessor.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/IndexProcessor.java @@ -16,12 +16,11 @@ import org.hibernate.mapping.Table; import org.hibernate.mapping.UniqueKey; import org.hibernate.tool.util.TableNameQualifier; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; public class IndexProcessor { - private static final Logger log = LoggerFactory.getLogger(IndexProcessor.class); + private static final Logger log = Logger.getLogger(IndexProcessor.class); public static void processIndices( MetaDataDialect metaDataDialect, diff --git a/main/src/main/java/org/hibernate/cfg/reveng/OverrideRepository.java b/main/src/main/java/org/hibernate/cfg/reveng/OverrideRepository.java index 7f6194e9c4..4b50f88f80 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/OverrideRepository.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/OverrideRepository.java @@ -25,13 +25,12 @@ import org.hibernate.mapping.Table; import org.hibernate.tool.util.TableNameQualifier; import org.hibernate.tool.xml.XMLHelper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; import org.xml.sax.InputSource; public class OverrideRepository { - final private static Logger log = LoggerFactory.getLogger( OverrideRepository.class ); + final private static Logger log = Logger.getLogger( OverrideRepository.class ); final private Map> typeMappings; // from sqltypes to list of SQLTypeMapping diff --git a/main/src/main/java/org/hibernate/cfg/reveng/PrimaryKeyProcessor.java b/main/src/main/java/org/hibernate/cfg/reveng/PrimaryKeyProcessor.java index 2139b3fb1b..f48cd66fe1 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/PrimaryKeyProcessor.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/PrimaryKeyProcessor.java @@ -14,12 +14,11 @@ import org.hibernate.mapping.PrimaryKey; import org.hibernate.mapping.Table; import org.hibernate.sql.Alias; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; public class PrimaryKeyProcessor { - private static final Logger log = LoggerFactory.getLogger(PrimaryKeyProcessor.class); + private static final Logger log = Logger.getLogger(PrimaryKeyProcessor.class); public static void processPrimaryKey( MetaDataDialect metaDataDialect, diff --git a/main/src/main/java/org/hibernate/cfg/reveng/TableProcessor.java b/main/src/main/java/org/hibernate/cfg/reveng/TableProcessor.java index d8d5f5d6ba..d247fe3921 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/TableProcessor.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/TableProcessor.java @@ -11,12 +11,11 @@ import org.hibernate.cfg.reveng.dialect.MetaDataDialect; import org.hibernate.internal.util.StringHelper; import org.hibernate.mapping.Table; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; public class TableProcessor { - private static final Logger log = LoggerFactory.getLogger(TableProcessor.class); + private static final Logger log = Logger.getLogger(TableProcessor.class); public static Collection processTables( MetaDataDialect metaDataDialect, diff --git a/main/src/main/java/org/hibernate/cfg/reveng/dialect/AbstractMetaDataDialect.java b/main/src/main/java/org/hibernate/cfg/reveng/dialect/AbstractMetaDataDialect.java index 4bf846082b..d0af8d759a 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/dialect/AbstractMetaDataDialect.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/dialect/AbstractMetaDataDialect.java @@ -14,8 +14,7 @@ import org.hibernate.cfg.JDBCBinderException; import org.hibernate.cfg.reveng.ReverseEngineeringRuntimeInfo; import org.hibernate.exception.spi.SQLExceptionConverter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; /** * abstract base class for the metadatadialects to hold the @@ -26,7 +25,7 @@ */ public abstract class AbstractMetaDataDialect implements MetaDataDialect { - protected final Logger log = LoggerFactory.getLogger(this.getClass()); + protected final Logger log = Logger.getLogger(this.getClass()); private Connection connection; private DatabaseMetaData metaData; diff --git a/main/src/main/java/org/hibernate/tool/hbm2x/AbstractExporter.java b/main/src/main/java/org/hibernate/tool/hbm2x/AbstractExporter.java index b52b64616f..0a84f87d6e 100644 --- a/main/src/main/java/org/hibernate/tool/hbm2x/AbstractExporter.java +++ b/main/src/main/java/org/hibernate/tool/hbm2x/AbstractExporter.java @@ -12,8 +12,7 @@ import org.hibernate.internal.util.ReflectHelper; import org.hibernate.internal.util.StringHelper; import org.hibernate.tool.api.metadata.MetadataDescriptor; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; /** * Base exporter for the template and direct output generation. @@ -24,7 +23,7 @@ */ public abstract class AbstractExporter implements Exporter { - protected Logger log = LoggerFactory.getLogger(this.getClass()); + protected Logger log = Logger.getLogger(this.getClass()); private File outputdir; private String[] templatePaths = new String[0]; diff --git a/main/src/main/java/org/hibernate/tool/hbm2x/Cfg2JavaTool.java b/main/src/main/java/org/hibernate/tool/hbm2x/Cfg2JavaTool.java index b690db649a..0213073601 100644 --- a/main/src/main/java/org/hibernate/tool/hbm2x/Cfg2JavaTool.java +++ b/main/src/main/java/org/hibernate/tool/hbm2x/Cfg2JavaTool.java @@ -35,8 +35,7 @@ import org.hibernate.type.Type; import org.hibernate.type.TypeResolver; import org.hibernate.type.spi.TypeConfiguration; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; /** * Helper methods for javacode generation. @@ -47,7 +46,7 @@ */ public class Cfg2JavaTool { - private static final Logger log = LoggerFactory.getLogger( Cfg2JavaTool.class ); + private static final Logger log = Logger.getLogger( Cfg2JavaTool.class ); public Cfg2JavaTool() { diff --git a/main/src/main/java/org/hibernate/tool/hbm2x/ConfigurationNavigator.java b/main/src/main/java/org/hibernate/tool/hbm2x/ConfigurationNavigator.java index 5e6ab355c9..82c8f49777 100644 --- a/main/src/main/java/org/hibernate/tool/hbm2x/ConfigurationNavigator.java +++ b/main/src/main/java/org/hibernate/tool/hbm2x/ConfigurationNavigator.java @@ -12,15 +12,14 @@ import org.hibernate.mapping.Property; import org.hibernate.tool.hbm2x.pojo.ComponentPOJOClass; import org.hibernate.tool.hbm2x.pojo.POJOClass; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; /** * @author max and david */ public class ConfigurationNavigator { - private static final Logger log = LoggerFactory.getLogger(POJOExporter.class); + private static final Logger log = Logger.getLogger(POJOExporter.class); /** * @param clazz diff --git a/main/src/main/java/org/hibernate/tool/hbm2x/TemplateHelper.java b/main/src/main/java/org/hibernate/tool/hbm2x/TemplateHelper.java index b0d931eafd..ea45e6b728 100644 --- a/main/src/main/java/org/hibernate/tool/hbm2x/TemplateHelper.java +++ b/main/src/main/java/org/hibernate/tool/hbm2x/TemplateHelper.java @@ -17,8 +17,7 @@ import java.util.List; import org.hibernate.tool.Version; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; import freemarker.cache.ClassTemplateLoader; import freemarker.cache.FileTemplateLoader; @@ -45,7 +44,7 @@ */ public class TemplateHelper { - static final Logger log = LoggerFactory.getLogger(TemplateHelper.class); + static final Logger log = Logger.getLogger(TemplateHelper.class); private String templatePrefix; private File outputDirectory; diff --git a/main/src/main/java/org/hibernate/tool/hbm2x/TemplateProducer.java b/main/src/main/java/org/hibernate/tool/hbm2x/TemplateProducer.java index 50799eac08..5ef28015cb 100644 --- a/main/src/main/java/org/hibernate/tool/hbm2x/TemplateProducer.java +++ b/main/src/main/java/org/hibernate/tool/hbm2x/TemplateProducer.java @@ -9,13 +9,12 @@ import java.util.Map; import java.util.Map.Entry; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import org.jboss.logging.Logger; public class TemplateProducer { - private static final Logger log = LoggerFactory.getLogger(TemplateProducer.class); + private static final Logger log = Logger.getLogger(TemplateProducer.class); private final TemplateHelper th; private ArtifactCollector ac; diff --git a/pom.xml b/pom.xml index 69bfa61a48..e72bab4129 100644 --- a/pom.xml +++ b/pom.xml @@ -37,10 +37,11 @@ 7.02.21.1.6 + 3.3.2.Final4.126.0.612.2.0.1 - 1.7.25 +6.1.7.jre8-preview @@ -148,18 +149,12 @@ ${hsqldb.version}test - - org.slf4j - slf4j-api - ${slf4j.version} - - org.slf4j - slf4j-log4j12 - ${slf4j.version} - runtime - - + org.jboss.logging + jboss-logging + ${jboss-logging.version} + + From 44e5cb15a1d6a1ed7d559864bb84b0a7b878a4cf Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sun, 24 Feb 2019 12:13:36 +0100 Subject: [PATCH 077/560] HBX-1795: Replace slf4j with jboss logging - cleanup Signed-off-by: Koen Aers --- pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/pom.xml b/pom.xml index e72bab4129..13b214f756 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,6 @@ 4.12 6.0.6 12.2.0.1 - 6.1.7.jre8-preview From 3b671801842f31de8953fa87904ea37404932a35 Mon Sep 17 00:00:00 2001 From: Guillaume HUSTA Date: Thu, 13 Jul 2017 14:48:05 +0200 Subject: [PATCH 078/560] HBX-1408 - Bad default type mapping for SQL Type NUMERIC or DECIMAL with precision >= 19 and scale = 0 Signed-off-by: Koen Aers --- .../org/hibernate/cfg/reveng/JDBCToHibernateTypeHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/src/main/java/org/hibernate/cfg/reveng/JDBCToHibernateTypeHelper.java b/main/src/main/java/org/hibernate/cfg/reveng/JDBCToHibernateTypeHelper.java index b8c78aaf64..f921e1187f 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/JDBCToHibernateTypeHelper.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/JDBCToHibernateTypeHelper.java @@ -79,7 +79,7 @@ else if (precision < 19) { return returnNullable?Long.class.getName():"long"; } else { - return "big_decimal"; + return "big_integer"; } } From 5556e4e7f69742abff20212d0f312bb828afd7bf Mon Sep 17 00:00:00 2001 From: Alexander Bryantsev Date: Sat, 9 Feb 2019 15:32:03 +0300 Subject: [PATCH 079/560] HBX-1797: Oracle metadata of columns includes all forms of TIMESTAMP datatype now. Signed-off-by: Koen Aers --- .../cfg/reveng/dialect/OracleMetaDataDialect.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/main/src/main/java/org/hibernate/cfg/reveng/dialect/OracleMetaDataDialect.java b/main/src/main/java/org/hibernate/cfg/reveng/dialect/OracleMetaDataDialect.java index 8d3b7fd782..4ffcd541d3 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/dialect/OracleMetaDataDialect.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/dialect/OracleMetaDataDialect.java @@ -104,11 +104,14 @@ public OracleMetaDataDialect() { + "'CHAR', a.char_length, " + "'NCHAR', a.char_length, " + "a.data_length) as COLUMN_SIZE, " - + "decode(a.data_type,'CHAR',1, 'DATE',91, 'FLOAT',6, " - + "'LONG',-1, 'NUMBER',2, 'VARCHAR2',12, 'BFILE',-13, " - + "'BLOB',2004, 'CLOB',2005, 'MLSLABEL',1111, 'NCHAR',1, 'NCLOB',2005, 'NVARCHAR2',12, " - + "'RAW',-3, 'ROWID',1111, 'UROWID',1111, 'LONG RAW', -4, " - + "'TIMESTAMP', 93, 'TIMESTAMP(6)', 93, 'XMLTYPE',2005, 1111) as DATA_TYPE, " + + "CASE\n" + + " WHEN a.data_type LIKE 'TIMESTAMP%' THEN\n" + + " 93\n" + + " ELSE\n" + + " decode(a.data_type, 'CHAR', 1, 'DATE', 91, 'FLOAT', 6, 'LONG', -1, 'NUMBER', 2, 'VARCHAR2', 12, 'BFILE', -13,\n" + + " 'BLOB', 2004, 'CLOB', 2005, 'MLSLABEL', 1111, 'NCHAR', 1, 'NCLOB', 2005, 'NVARCHAR2', 12, 'RAW', -3,\n" + + " 'ROWID', 1111, 'UROWID', 1111, 'LONG RAW', -4, 'XMLTYPE', 2005, 1111)\n" + + "END AS data_type\n," + "a.table_name as TABLE_NAME, a.data_type as TYPE_NAME, " + "decode(a.data_scale, null, 0 ,a.data_scale) as DECIMAL_DIGITS, b.comments " + "from all_tab_columns a left join all_col_comments b on " From d064d312ddcced9363ece8986b56314f867ac0ef Mon Sep 17 00:00:00 2001 From: Alexander Bryantsev Date: Sat, 9 Feb 2019 16:08:02 +0300 Subject: [PATCH 080/560] HBX-1797: Oracle metadata queries were optimized (tested at Oracle 9.2) Signed-off-by: Koen Aers --- .../reveng/dialect/OracleMetaDataDialect.java | 145 +++++++++++------- 1 file changed, 88 insertions(+), 57 deletions(-) diff --git a/main/src/main/java/org/hibernate/cfg/reveng/dialect/OracleMetaDataDialect.java b/main/src/main/java/org/hibernate/cfg/reveng/dialect/OracleMetaDataDialect.java index 4ffcd541d3..33b8dd8a8a 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/dialect/OracleMetaDataDialect.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/dialect/OracleMetaDataDialect.java @@ -31,9 +31,13 @@ public OracleMetaDataDialect() { /* ******* TABLE QUERIES ******* */ private static final String SQL_TABLE_BASE = - "select a.table_name, a.owner, b.comments, 'TABLE' " - + "from all_tables a left join all_tab_comments b " - + "on (a.owner=b.owner and a.table_name=b.table_name) "; + "select a.table_name, a.owner, " + + "(SELECT b.comments\n" + + " FROM all_tab_comments b\n" + + " WHERE a.owner = b.owner\n" + + " AND a.table_name = b.table_name) AS comments, " + + "'TABLE' " + + "from all_tables a "; private static final String SQL_TABLE_VIEW = " union all select view_name, owner, NULL, 'VIEW' from all_views "; @@ -46,9 +50,11 @@ public OracleMetaDataDialect() { private static final String SQL_TABLE_TABLE = SQL_TABLE_BASE + "where a.table_name like ?" + SQL_TABLE_VIEW + "where view_name like ?"; - private static final String SQL_TABLE_SCHEMA_AND_TABLE = SQL_TABLE_BASE - + "where a.owner like ? and a.table_name like ?" + SQL_TABLE_VIEW - + "where owner like ? and view_name like ?"; + private static final String SQL_TABLE_SCHEMA_AND_TABLE = + SQL_TABLE_BASE + + "where a.owner like ? and a.table_name like ?" + + SQL_TABLE_VIEW + + "where owner like ? and view_name like ?"; private PreparedStatement prepTableNone; @@ -61,14 +67,19 @@ public OracleMetaDataDialect() { /* ***************************** */ /* ******* INDEX QUERIES ******* */ /* ***************************** */ - private static final String SQL_INDEX_BASE = "select a.column_name, " - + "decode(b.uniqueness,'UNIQUE','false','true'), " - + "a.index_owner, a.index_name, a.table_name " - + "from all_ind_columns a left join all_indexes b on " - + "(a.table_name = b.table_name " - + " AND a.table_owner = b.table_owner " - + " AND a.index_name = b.index_name) " - + "where b.index_type not like 'FUNCTION-BASED%' "; + private static final String SQL_INDEX_BASE = + "SELECT a.column_name\n" + + " ,decode((SELECT b.uniqueness\n" + + " FROM all_indexes b\n" + + " WHERE a.table_name = b.table_name\n" + + " AND a.table_owner = b.table_owner\n" + + " AND a.index_name = b.index_name\n" + + " AND b.index_type NOT LIKE 'FUNCTION-BASED%'), 'UNIQUE', 'false', 'true') AS uniqueness\n" + + " ,a.index_owner\n" + + " ,a.index_name\n" + + " ,a.table_name\n" + + " FROM all_ind_columns a\n " + + " WHERE 1 = 1\n "; private static final String SQL_INDEX_ORDER = " order by a.table_name, a.column_position"; @@ -93,29 +104,30 @@ public OracleMetaDataDialect() { private PreparedStatement prepIndexSchemaAndTable; /* ****** COLUMN QUERIES ******* */ - private static final String SQL_COLUMN_BASE = "select a.column_name as COLUMN_NAME, a.owner as TABLE_SCHEM, " - + "decode(a.nullable,'N',0,1) as NULLABLE, " - + "decode(a.data_type, " - + "'FLOAT', decode(a.data_precision, null, a.data_length, a.data_precision), " - + "'NUMBER', decode(a.data_precision, null, a.data_length, a.data_precision), " - + "'VARCHAR2', a.char_length, " - + "'VARCHAR', a.char_length, " - + "'NVARCHAR2', a.char_length, " - + "'CHAR', a.char_length, " - + "'NCHAR', a.char_length, " - + "a.data_length) as COLUMN_SIZE, " - + "CASE\n" - + " WHEN a.data_type LIKE 'TIMESTAMP%' THEN\n" - + " 93\n" - + " ELSE\n" - + " decode(a.data_type, 'CHAR', 1, 'DATE', 91, 'FLOAT', 6, 'LONG', -1, 'NUMBER', 2, 'VARCHAR2', 12, 'BFILE', -13,\n" - + " 'BLOB', 2004, 'CLOB', 2005, 'MLSLABEL', 1111, 'NCHAR', 1, 'NCLOB', 2005, 'NVARCHAR2', 12, 'RAW', -3,\n" - + " 'ROWID', 1111, 'UROWID', 1111, 'LONG RAW', -4, 'XMLTYPE', 2005, 1111)\n" - + "END AS data_type\n," - + "a.table_name as TABLE_NAME, a.data_type as TYPE_NAME, " - + "decode(a.data_scale, null, 0 ,a.data_scale) as DECIMAL_DIGITS, b.comments " - + "from all_tab_columns a left join all_col_comments b on " - + "(a.owner=b.owner and a.table_name=b.table_name and a.column_name=b.column_name) "; + private static final String SQL_COLUMN_BASE = + "SELECT a.column_name AS COLUMN_NAME\n" + + " ,a.owner AS TABLE_SCHEM\n" + + " ,decode(a.nullable, 'N', 0, 1) AS NULLABLE\n" + + " ,decode(a.data_type, 'FLOAT', decode(a.data_precision, NULL, a.data_length, a.data_precision), 'NUMBER',\n" + + " decode(a.data_precision, NULL, a.data_length, a.data_precision), 'VARCHAR2', a.char_length, 'VARCHAR',\n" + + " a.char_length, 'NVARCHAR2', a.char_length, 'CHAR', a.char_length, 'NCHAR', a.char_length, a.data_length) AS COLUMN_SIZE\n" + + " ,CASE\n" + + " WHEN a.data_type LIKE 'TIMESTAMP%' THEN\n" + + " 93\n" + + " ELSE\n" + + " decode(a.data_type, 'CHAR', 1, 'DATE', 91, 'FLOAT', 6, 'LONG', -1, 'NUMBER', 2, 'VARCHAR2', 12, 'BFILE', -13,\n" + + " 'BLOB', 2004, 'CLOB', 2005, 'MLSLABEL', 1111, 'NCHAR', 1, 'NCLOB', 2005, 'NVARCHAR2', 12, 'RAW', -3,\n" + + " 'ROWID', 1111, 'UROWID', 1111, 'LONG RAW', -4, 'XMLTYPE', 2005, 1111)\n" + + " END AS DATA_TYPE\n" + + " ,a.table_name AS TABLE_NAME\n" + + " ,a.data_type AS TYPE_NAME\n" + + " ,decode(a.data_scale, NULL, 0, a.data_scale) AS DECIMAL_DIGITS\n" + + " ,(SELECT b.comments\n" + + " FROM all_col_comments b\n" + + " WHERE a.owner = b.owner\n" + + " AND a.table_name = b.table_name\n" + + " AND a.column_name = b.column_name) AS COMMENTS\n" + + " FROM all_tab_columns a\n"; private static final String SQL_COLUMN_ORDER = " order by column_id "; @@ -164,8 +176,9 @@ public OracleMetaDataDialect() { /* ***************************** */ /* ******** PK QUERIES ********* */ /* ***************************** */ - private static final String SQL_PK_BASE = "select c.table_name, c.column_name, c.position, c.constraint_name, " - + "c.owner from all_cons_columns c left join all_constraints k on " + private static final String SQL_PK_BASE = + "select c.table_name, c.column_name, c.position, c.constraint_name, " + + "c.owner from all_cons_columns c join all_constraints k on " + "(k.owner = c.owner AND k.table_name = c.table_name AND k.constraint_name = c.constraint_name) " + "where k.constraint_type = 'P' "; @@ -193,16 +206,37 @@ public OracleMetaDataDialect() { /* ***************************** */ /* ******** FK QUERIES ********* */ /* ***************************** */ - private static final String SQL_FK_BASE = "select p.table_name, p.owner, f.owner, f.table_name, " - + "fc.column_name, pc.column_name, f.constraint_name, fc.position " - + "from all_constraints p left join all_cons_columns pc on " - + "(pc.owner = p.owner and pc.constraint_name = p.constraint_name and pc.table_name = p.table_name) " - + "left join all_constraints f on (p.owner = f.r_owner and p.constraint_name = f.r_constraint_name) " - + "left join all_cons_columns fc on " - + "(fc.owner = f.owner and fc.constraint_name = f.constraint_name and fc.table_name = f.table_name and" - + " fc.position = pc.position) where f.constraint_type = 'R' AND p.constraint_type = 'P' "; - - private static final String SQL_FK_ORDER = " order by f.table_name, f.constraint_name, fc.position "; + private static final String SQL_FK_BASE = + "SELECT p.table_name as p_table_name\n" + + " ,p.owner as p_owner\n" + + " ,f.owner as f_owner\n" + + " ,f.table_name as f_table_name\n" + + " ,(SELECT fc.column_name\n" + + " FROM all_cons_columns fc\n" + + " WHERE fc.owner = f.owner\n" + + " AND fc.constraint_name = f.constraint_name\n" + + " AND fc.table_name = f.table_name\n" + + " AND fc.position = pc.position) AS fc_column_name\n" + + " ,pc.column_name as pc_column_name\n" + + " ,f.constraint_name\n" + + " ,(SELECT fc.position\n" + + " FROM all_cons_columns fc\n" + + " WHERE fc.owner = f.owner\n" + + " AND fc.constraint_name = f.constraint_name\n" + + " AND fc.table_name = f.table_name\n" + + " AND fc.position = pc.position) AS fc_position\n" + + " FROM all_constraints p\n" + + " JOIN all_cons_columns pc\n" + + " ON pc.owner = p.owner\n" + + " AND pc.constraint_name = p.constraint_name\n" + + " AND pc.table_name = p.table_name\n" + + " JOIN all_constraints f\n" + + " ON p.owner = f.r_owner\n" + + " AND p.constraint_name = f.r_constraint_name\n" + + " WHERE f.constraint_type = 'R'\n" + + " AND p.constraint_type = 'P'\n"; + + private static final String SQL_FK_ORDER = " order by f.table_name, f.constraint_name, position "; private static final String SQL_FK_NONE = SQL_FK_BASE + SQL_FK_ORDER; @@ -228,8 +262,7 @@ public Iterator> getTables(final String catalog, final String try { log.debug("getTables(" + catalog + "." + schema + "." + table + ")"); - ResultSet tableRs; - tableRs = getTableResultSet( schema, table ); + ResultSet tableRs = getTableResultSet( schema, table ); return new ResultSetIterator(null, tableRs, getSQLExceptionConverter()) { @@ -244,7 +277,7 @@ protected Map convertRow(ResultSet tableResultSet) element.put("TABLE_SCHEM", tableResultSet.getString(2)); element.put("TABLE_CAT", null); element.put("TABLE_TYPE", tableResultSet.getString(4)); - element.put("REMARKS", tableResultSet.getString(3)); + element.put("REMARKS", tableResultSet.getString(3)); log.info( element.toString() ); return element; } @@ -312,7 +345,7 @@ protected Throwable handleSQLException(SQLException e) { throw getSQLExceptionConverter().convert( e, "Exception while getting index info for " - + TableNameQualifier.qualify(catalog, schema, table), null); + + TableNameQualifier.qualify(catalog, schema, table) + ": " + e.getMessage(), null); } } @@ -412,8 +445,7 @@ public Iterator> getExportedKeys(final String catalog, final log.debug("getExportedKeys(" + catalog + "." + schema + "." + table + ")"); - ResultSet pExportRs; - pExportRs = getExportedKeysResultSet( schema, table ); + ResultSet pExportRs = getExportedKeysResultSet( schema, table ); return new ResultSetIterator(null, pExportRs, getSQLExceptionConverter()) { @@ -576,8 +608,7 @@ private ResultSet getExportedKeysResultSet(final String schema, final String tab prepFkNone = con .prepareStatement(SQL_FK_NONE); prepFkSchema = con.prepareStatement(SQL_FK_SCHEMA); prepFkTable = con.prepareStatement(SQL_FK_TABLE); - prepFkSchemaAndTable = con - .prepareStatement(SQL_FK_SCHEMA_AND_TABLE); + prepFkSchemaAndTable = con.prepareStatement(SQL_FK_SCHEMA_AND_TABLE); log.debug(" foreign key queries prepared!"); } From c9db18a5aa6c4441cd9132c6d7a0d91be2f11d82 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 27 Mar 2019 09:40:21 +0100 Subject: [PATCH 081/560] HBX-1807: Update Hibernate core dependency to 5.4.2.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 13b214f756..ac1a6f4ea0 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ 2.3.28 1.4.197 5.1.0.Final - 5.4.1.Final + 5.4.2.Final 2.3.3 7.0 2.2 From 9fdbd0d53cdd5d9ca8518786c3ad6cb70b3ea4a2 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 27 Mar 2019 10:10:22 +0100 Subject: [PATCH 082/560] HBX-1808: Update version identifier to 5.4.2.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 80ec99a184..6af2ce6869 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.2-SNAPSHOT + 5.4.2.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 71f8f47e60..5bfd8a12f8 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.4.2-SNAPSHOT"; + public static final String VERSION = "5.4.2.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index d36102c281..6668acdab9 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.2-SNAPSHOT + 5.4.2.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index ac1a6f4ea0..74eb8b5674 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.2-SNAPSHOT + 5.4.2.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 5c8c1647ac..1d9a79289d 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.2-SNAPSHOT + 5.4.2.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 5e6304b409..7a8b39b74e 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.2-SNAPSHOT + 5.4.2.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index b764175aca..b7bad718af 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.2-SNAPSHOT + 5.4.2.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 92d9e4868e..3286a6a9e0 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.2-SNAPSHOT + 5.4.2.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index d3f6189205..80dda507ba 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.2-SNAPSHOT + 5.4.2.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index bb3db57157..d9a5f4cb86 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.2-SNAPSHOT + 5.4.2.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 93b52c6aa1..de6cda8468 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.2-SNAPSHOT + 5.4.2.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 4b7cf3f97a..4bb93f6a03 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.2-SNAPSHOT + 5.4.2.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index aed14aed7c..84d207def8 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.2-SNAPSHOT + 5.4.2.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 7ae0043913..45af98069f 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.2-SNAPSHOT + 5.4.2.Final hibernate-tools-tests-utils From 952fc75650d173f2f9b6e3ae8ee5506695bc4e2c Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 27 Mar 2019 10:42:18 +0100 Subject: [PATCH 083/560] HBX-1809: Update version identifier to 5.4.3-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 6af2ce6869..48858bafef 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.2.Final + 5.4.3-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 5bfd8a12f8..4baf68eccf 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.4.2.Final"; + public static final String VERSION = "5.4.3-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 6668acdab9..bfc87458b3 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.2.Final + 5.4.3-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 74eb8b5674..22932d02cb 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.2.Final + 5.4.3-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 1d9a79289d..65fe21288a 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.2.Final + 5.4.3-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 7a8b39b74e..3f43dd5e71 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.2.Final + 5.4.3-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index b7bad718af..866a67ee9f 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.2.Final + 5.4.3-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 3286a6a9e0..46712936c4 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.2.Final + 5.4.3-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 80dda507ba..cc9d9c46a6 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.2.Final + 5.4.3-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index d9a5f4cb86..7baf0bd9ed 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.2.Final + 5.4.3-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index de6cda8468..a47da85761 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.2.Final + 5.4.3-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 4bb93f6a03..8379fe3690 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.2.Final + 5.4.3-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 84d207def8..b58855a59c 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.2.Final + 5.4.3-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 45af98069f..7d7597266f 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.2.Final + 5.4.3-SNAPSHOT hibernate-tools-tests-utils From 25c54b83e39fe4e75bd4a8b6e9b89f9052d20c08 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 29 Mar 2019 12:56:31 +0100 Subject: [PATCH 084/560] HBX-1810: Update jboss-parent dependency to version 32 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 22932d02cb..7cced1baa8 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ org.jboss jboss-parent - 31 + 32 org.hibernate From 9ce6e808696fe23d7aa0968e99fbc858bc46a3d3 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 12 Apr 2019 19:40:15 +0200 Subject: [PATCH 085/560] HBX-1811: Update jboss-parent dependency to version 34 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7cced1baa8..8867b78c67 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ org.jboss jboss-parent - 32 + 34 org.hibernate From 07e2bf0c336e8a7ed61883270b72ba3c9dd73ca5 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 22 Apr 2019 13:33:00 +0200 Subject: [PATCH 086/560] HBX-1812: Update Eclipse-jdt-core dependency to version 3.17.0 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8867b78c67..8e23d069b2 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ 1.10.5 3.2.2 1.2 - 3.16.0 + 3.17.0 2.3.28 1.4.197 5.1.0.Final From b759249be0771bdaf11d24b09bdcb6450fe6ab0c Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 15 May 2019 22:01:07 +0200 Subject: [PATCH 087/560] HBX-1818: Update jboss-parent dependency to version 35 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8e23d069b2..d43337017e 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ org.jboss jboss-parent - 34 + 35 org.hibernate From 8a7d5c9e09c1b02657d709a977f3749358b4bf71 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 27 May 2019 14:19:24 +0200 Subject: [PATCH 088/560] HBX-1819: Update ant dependency version to 1.10.6 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d43337017e..ab8292ea91 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ - 1.10.5 + 1.10.6 3.2.2 1.2 3.17.0 From 4151977108e4c2cdaa4f31cbe6fde2cf043a2240 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sat, 1 Jun 2019 08:22:50 +0200 Subject: [PATCH 089/560] HBX-1821: Update H2 version to 1.4.199 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ab8292ea91..b376513caa 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ 1.2 3.17.0 2.3.28 - 1.4.197 + 1.4.199 5.1.0.Final 5.4.2.Final 2.3.3 From c000471fea343bca3c513016f28679eee930df3d Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 4 Jun 2019 11:19:28 +0200 Subject: [PATCH 090/560] HBX-1822: Update Hibernate core dependency to 5.4.3.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b376513caa..e220483a47 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ 2.3.28 1.4.199 5.1.0.Final - 5.4.2.Final + 5.4.3.Final 2.3.3 7.0 2.2 From 77526b7e75fc2ac0d259231de12ae4a43ad2a767 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 4 Jun 2019 11:59:50 +0200 Subject: [PATCH 091/560] HBX-1823: Update version identifier to 5.4.3.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 48858bafef..1192f4d105 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.3-SNAPSHOT + 5.4.3.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 4baf68eccf..6e0b0e4eb5 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.4.3-SNAPSHOT"; + public static final String VERSION = "5.4.3.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index bfc87458b3..e658989f19 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.3-SNAPSHOT + 5.4.3.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index e220483a47..1f172e01ca 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.3-SNAPSHOT + 5.4.3.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 65fe21288a..eea64062bf 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.3-SNAPSHOT + 5.4.3.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 3f43dd5e71..aa49e9503a 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.3-SNAPSHOT + 5.4.3.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 866a67ee9f..530c1d069f 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.3-SNAPSHOT + 5.4.3.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 46712936c4..db9f4c66bf 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.3-SNAPSHOT + 5.4.3.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index cc9d9c46a6..ee29c3a79e 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.3-SNAPSHOT + 5.4.3.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 7baf0bd9ed..306e532a88 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.3-SNAPSHOT + 5.4.3.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index a47da85761..221773dc33 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.3-SNAPSHOT + 5.4.3.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 8379fe3690..caae8e41bf 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.3-SNAPSHOT + 5.4.3.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index b58855a59c..7ae0ef4c9b 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.3-SNAPSHOT + 5.4.3.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 7d7597266f..ab06e0e4a9 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.3-SNAPSHOT + 5.4.3.Final hibernate-tools-tests-utils From fb5cb9bec67b1c797aff4683926049ecfb0070b1 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 4 Jun 2019 12:40:09 +0200 Subject: [PATCH 092/560] HBX-1824: Update version identifier to 5.4.4-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 1192f4d105..e196583a20 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.3.Final + 5.4.4-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 6e0b0e4eb5..45528a82fb 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.4.3.Final"; + public static final String VERSION = "5.4.4-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index e658989f19..37767dca74 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.3.Final + 5.4.4-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 1f172e01ca..45b53d1a5f 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.3.Final + 5.4.4-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index eea64062bf..fdaca87a63 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.3.Final + 5.4.4-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index aa49e9503a..2cf4dc1147 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.3.Final + 5.4.4-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 530c1d069f..605164a63e 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.3.Final + 5.4.4-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index db9f4c66bf..0407d56173 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.3.Final + 5.4.4-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index ee29c3a79e..919246885c 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.3.Final + 5.4.4-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 306e532a88..18186a139b 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.3.Final + 5.4.4-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 221773dc33..18df68c688 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.3.Final + 5.4.4-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index caae8e41bf..15063dff01 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.3.Final + 5.4.4-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 7ae0ef4c9b..22a5103c15 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.3.Final + 5.4.4-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index ab06e0e4a9..5764b2fb3d 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.3.Final + 5.4.4-SNAPSHOT hibernate-tools-tests-utils From 2809895f18472f4d931abc042107b68efaad06e2 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 10 Jun 2019 20:53:41 +0200 Subject: [PATCH 093/560] HBX-1827: Update jboss-logging dependency to version 3.4.0.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 45b53d1a5f..52e5c8beea 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,7 @@ 7.0 2.2 1.1.6 - 3.3.2.Final + 3.4.0.Final 4.12 6.0.6 12.2.0.1 From 6fc0fa9d3a7e1c7784d334325b13f4003daf53be Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 17 Jun 2019 15:52:24 +0200 Subject: [PATCH 094/560] HBX-1830: Update HSQLDB dependency to version 2.5.0 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 52e5c8beea..8e87870bc5 100644 --- a/pom.xml +++ b/pom.xml @@ -33,7 +33,7 @@ 1.4.199 5.1.0.Final 5.4.3.Final - 2.3.3 + 2.5.0 7.0 2.2 1.1.6 From fbb7301e4ddc1461443ada098bc16c86a83b33ce Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 9 Jul 2019 10:33:45 +0200 Subject: [PATCH 095/560] HBX-1831: Remove outdated 'readme.txt' - Delete 'main/readme.txt' Signed-off-by: Koen Aers --- main/readme.txt | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 main/readme.txt diff --git a/main/readme.txt b/main/readme.txt deleted file mode 100644 index 21538b1b69..0000000000 --- a/main/readme.txt +++ /dev/null @@ -1,35 +0,0 @@ -Hibernate Tools -=============== -Version: 4.0.0, February 2012 - -What is it ----------- - -The tools for Hibernate provides various tools to use with Hibernate. -The primary tools can be used for generating source artifacts such as -mapping files, java entities, DAO and other scaffolding code. The -source of this generation can be JDBC database, classes or even just -existing mappings. - -It uses Hibernate core metamodel to generate from and to the source -artifacts. Allowing it to support both top-down, bottom-up and -middle-out development. - -Hibernate Tools is used in JBoss Tools Hibernate plugins to provide -parts of the Eclipse plugins for Hibernate. - -Licensing ---------- - -This software is distributed under the terms of the FSF Lesser Gnu Public -License (see lgpl.txt). This product includes software developed by the Apache -Software Foundation (http://www.apache.org/). - -Hibernate Tools URLs --------------------- - -Home Page: http://tools.hibernate.org | http://jboss.org/tools -Downloads: http://jboss.org/tools/download -Mailing lists: http://www.hibernate.org/community/mailinglists.html -Source Code: https://github.com/hibernate/hibernate-tools/ -Issue Tracking: http://opensource.atlassian.com/projects/hibernate/browse/HBX From d6eca7749d0753875ad922287b8b668351064ce6 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 16 Jul 2019 16:58:22 +0200 Subject: [PATCH 096/560] HBX-1832: Update eclipse-jdt-core dependency to version 3.18.0 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8e87870bc5..1ea1931c0d 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ 1.10.6 3.2.2 1.2 - 3.17.0 + 3.18.0 2.3.28 1.4.199 5.1.0.Final From 1fdf7857f3d70cdffe57a96fbf24f5498c3be29e Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 17 Jul 2019 16:05:25 +0200 Subject: [PATCH 097/560] HBX-1833: Update Jaxen dependency to version 1.2.0 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1ea1931c0d..671eddee7f 100644 --- a/pom.xml +++ b/pom.xml @@ -36,7 +36,7 @@ 2.5.0 7.0 2.2 - 1.1.6 + 1.2.0 3.4.0.Final 4.12 6.0.6 From 58a173d5cf8df54f29e3bab9443755fc71c6e451 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 31 Jul 2019 16:40:58 +0300 Subject: [PATCH 098/560] HBX-1825: Update hibernate core dependency to 5.4.4.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 671eddee7f..3e57c2ff52 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ 2.3.28 1.4.199 5.1.0.Final - 5.4.3.Final + 5.4.4.Final 2.5.0 7.0 2.2 From 0d5dd7584e94ef2ae2acc97e5fc1edf4fd79867a Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 1 Aug 2019 10:37:29 +0300 Subject: [PATCH 099/560] HBX-1826: Update version identifier to 5.4.4.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index e196583a20..99a3e469f3 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.4-SNAPSHOT + 5.4.4.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 45528a82fb..fe66da3d4d 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.4.4-SNAPSHOT"; + public static final String VERSION = "5.4.4.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 37767dca74..1fe046005d 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.4-SNAPSHOT + 5.4.4.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 3e57c2ff52..6fc6056304 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.4-SNAPSHOT + 5.4.4.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index fdaca87a63..db087e2884 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.4-SNAPSHOT + 5.4.4.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 2cf4dc1147..62f524092b 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.4-SNAPSHOT + 5.4.4.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 605164a63e..c84600e7fa 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.4-SNAPSHOT + 5.4.4.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 0407d56173..4b655211e1 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.4-SNAPSHOT + 5.4.4.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 919246885c..1ad001216d 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.4-SNAPSHOT + 5.4.4.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 18186a139b..c68c316e66 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.4-SNAPSHOT + 5.4.4.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 18df68c688..2404f3b08a 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.4-SNAPSHOT + 5.4.4.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 15063dff01..949664e058 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.4-SNAPSHOT + 5.4.4.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 22a5103c15..908c5974be 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.4-SNAPSHOT + 5.4.4.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 5764b2fb3d..33d39de866 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.4-SNAPSHOT + 5.4.4.Final hibernate-tools-tests-utils From b9639305099536dada9e9c9bebf714df0d40b229 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 1 Aug 2019 11:44:21 +0300 Subject: [PATCH 100/560] HBX-1838: Update version identifier to 5.4.5-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 99a3e469f3..60c0f30443 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.4.Final + 5.4.5-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index fe66da3d4d..05fa5ff17e 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.4.4.Final"; + public static final String VERSION = "5.4.5-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 1fe046005d..9998da7498 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.4.Final + 5.4.5-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 6fc6056304..0ecd0c6b2e 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.4.Final + 5.4.5-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index db087e2884..7478e362aa 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.4.Final + 5.4.5-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 62f524092b..b93fecdeee 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.4.Final + 5.4.5-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index c84600e7fa..3d69a505ea 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.4.Final + 5.4.5-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 4b655211e1..e87fd6dce6 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.4.Final + 5.4.5-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 1ad001216d..765f735db6 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.4.Final + 5.4.5-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index c68c316e66..9936349121 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.4.Final + 5.4.5-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 2404f3b08a..5493d0546e 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.4.Final + 5.4.5-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 949664e058..3e1da14140 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.4.Final + 5.4.5-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 908c5974be..8b08b7c241 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.4.Final + 5.4.5-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 33d39de866..cd50468dff 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.4.Final + 5.4.5-SNAPSHOT hibernate-tools-tests-utils From 49a4fe3d984890e74ba5dc843720b211f486bab3 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sun, 15 Sep 2019 10:47:10 +0200 Subject: [PATCH 101/560] HBX-1846: Update freemarker version to 2.3.29 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0ecd0c6b2e..8263735c00 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ 3.2.2 1.2 3.18.0 - 2.3.28 + 2.3.29 1.4.199 5.1.0.Final 5.4.4.Final From 0c00e180e2f55c32dbb4dad76d4ce8407deca546 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 18 Sep 2019 10:46:02 +0200 Subject: [PATCH 102/560] HBX-1840: Update hibernate core dependency to 5.4.5.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8263735c00..c9acc19442 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ 2.3.29 1.4.199 5.1.0.Final - 5.4.4.Final + 5.4.5.Final 2.5.0 7.0 2.2 From 9cb75409aee7a0e5bb8eb832acdab380a04441a4 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 18 Sep 2019 12:08:11 +0200 Subject: [PATCH 103/560] HBX-1839: Update version identifier to 5.4.5.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 60c0f30443..cf7baf965b 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.5-SNAPSHOT + 5.4.5.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 05fa5ff17e..180e8eb25f 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.4.5-SNAPSHOT"; + public static final String VERSION = "5.4.5.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 9998da7498..7b446377d7 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.5-SNAPSHOT + 5.4.5.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index c9acc19442..ca58e78d77 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.5-SNAPSHOT + 5.4.5.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 7478e362aa..48edf516ca 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.5-SNAPSHOT + 5.4.5.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index b93fecdeee..ffd26aa9db 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.5-SNAPSHOT + 5.4.5.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 3d69a505ea..fad49bee67 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.5-SNAPSHOT + 5.4.5.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index e87fd6dce6..24e2a84fef 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.5-SNAPSHOT + 5.4.5.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 765f735db6..c446f1eacf 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.5-SNAPSHOT + 5.4.5.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 9936349121..6b50513147 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.5-SNAPSHOT + 5.4.5.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 5493d0546e..a145561c8f 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.5-SNAPSHOT + 5.4.5.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 3e1da14140..80b330b6e7 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.5-SNAPSHOT + 5.4.5.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 8b08b7c241..56f5ee3178 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.5-SNAPSHOT + 5.4.5.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index cd50468dff..380757222b 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.5-SNAPSHOT + 5.4.5.Final hibernate-tools-tests-utils From 296d4d1746f230f92c3406e86c8f171ae9fa0773 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 19 Sep 2019 11:13:02 +0200 Subject: [PATCH 104/560] HBX-1850: Update version identifier to 5.4.6-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index cf7baf965b..4d8ba902ef 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.5.Final + 5.4.6-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 180e8eb25f..acdeea4329 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.4.5.Final"; + public static final String VERSION = "5.4.6-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 7b446377d7..7ced18e665 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.5.Final + 5.4.6-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index ca58e78d77..b8d072985e 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.5.Final + 5.4.6-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 48edf516ca..4d79ef2727 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.5.Final + 5.4.6-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index ffd26aa9db..3d50b02466 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.5.Final + 5.4.6-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index fad49bee67..c65e11ac8b 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.5.Final + 5.4.6-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 24e2a84fef..abaf7e7fb8 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.5.Final + 5.4.6-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index c446f1eacf..5a87553d7d 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.5.Final + 5.4.6-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 6b50513147..caee7c637e 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.5.Final + 5.4.6-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index a145561c8f..3cf3d860c4 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.5.Final + 5.4.6-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 80b330b6e7..678c5f6abe 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.5.Final + 5.4.6-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 56f5ee3178..729537873f 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.5.Final + 5.4.6-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 380757222b..f42b24615a 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.5.Final + 5.4.6-SNAPSHOT hibernate-tools-tests-utils From 096ad00ee8a9a5e0d03e70d39308749a7f4fc4f7 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 20 Sep 2019 12:03:27 +0200 Subject: [PATCH 105/560] HBX-1851: Update jboss-parent dependency to version 36 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b8d072985e..e3ac25dac1 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ org.jboss jboss-parent - 35 + 36 org.hibernate From 0e0ada4088972f34e7c43cacb255d533070d5798 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 3 Oct 2019 12:30:09 +0200 Subject: [PATCH 106/560] HBX-1864: Update Hibernate core dependency to 5.4.6.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e3ac25dac1..89204390a5 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ 2.3.29 1.4.199 5.1.0.Final - 5.4.5.Final + 5.4.6.Final 2.5.0 7.0 2.2 From b6d2e482dfbbec6985cf51c1790187e3788537c2 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 3 Oct 2019 13:48:59 +0200 Subject: [PATCH 107/560] HBX-1865: Update version identifier to 5.4.6.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 4d8ba902ef..85076036cb 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.6-SNAPSHOT + 5.4.6.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index acdeea4329..f301483207 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.4.6-SNAPSHOT"; + public static final String VERSION = "5.4.6.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 7ced18e665..f6bdeac8f3 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.6-SNAPSHOT + 5.4.6.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 89204390a5..d698c94713 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.6-SNAPSHOT + 5.4.6.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 4d79ef2727..6c29398162 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.6-SNAPSHOT + 5.4.6.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 3d50b02466..6c911a9e90 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.6-SNAPSHOT + 5.4.6.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index c65e11ac8b..a1df8112e6 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.6-SNAPSHOT + 5.4.6.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index abaf7e7fb8..8d92340c0c 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.6-SNAPSHOT + 5.4.6.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 5a87553d7d..d21f911ec2 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.6-SNAPSHOT + 5.4.6.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index caee7c637e..0ba619505c 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.6-SNAPSHOT + 5.4.6.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 3cf3d860c4..7ceb8bcae5 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.6-SNAPSHOT + 5.4.6.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 678c5f6abe..387adc2edf 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.6-SNAPSHOT + 5.4.6.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 729537873f..7ec7e6ef76 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.6-SNAPSHOT + 5.4.6.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index f42b24615a..5105ce5dcc 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.6-SNAPSHOT + 5.4.6.Final hibernate-tools-tests-utils From 66817966a002ad19bbbc1b3c5aacb61e0065811f Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 11 Oct 2019 11:40:41 +0200 Subject: [PATCH 108/560] HBX-1866: Update version identifier to 5.4.7-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 85076036cb..901c845e87 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.6.Final + 5.4.7-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index f301483207..d6205cfa5c 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -5,7 +5,7 @@ final public class Version { - public static final String VERSION = "5.4.6.Final"; + public static final String VERSION = "5.4.7-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index f6bdeac8f3..399d452c4d 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.6.Final + 5.4.7-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index d698c94713..cb32e6b65e 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.6.Final + 5.4.7-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 6c29398162..91950bb946 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.6.Final + 5.4.7-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 6c911a9e90..45655e6252 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.6.Final + 5.4.7-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index a1df8112e6..72a6f6e3bd 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.6.Final + 5.4.7-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 8d92340c0c..8e2aac51e4 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.6.Final + 5.4.7-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index d21f911ec2..05ed9203fb 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.6.Final + 5.4.7-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 0ba619505c..3327e579cd 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.6.Final + 5.4.7-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 7ceb8bcae5..cef0d2e5da 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.6.Final + 5.4.7-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 387adc2edf..4d171e1c8f 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.6.Final + 5.4.7-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 7ec7e6ef76..fc3714b7f7 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.6.Final + 5.4.7-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 5105ce5dcc..16f659d453 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.6.Final + 5.4.7-SNAPSHOT hibernate-tools-tests-utils From 91570b8980ce8feccd3e4eb76d90094143165bd7 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 15 Oct 2019 15:07:29 +0200 Subject: [PATCH 109/560] HBX-1883: Update ant dependency version to 1.10.7 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cb32e6b65e..4b586b0078 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ - 1.10.6 + 1.10.7 3.2.2 1.2 3.18.0 From cdab5dc17fe33099fc19e98dba45f2d6c5f2a1e8 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 15 Oct 2019 17:03:39 +0200 Subject: [PATCH 110/560] HBX-1884: Update commons collections dependency to version 4.4 Signed-off-by: Koen Aers --- main/pom.xml | 4 ++-- .../java/org/hibernate/cfg/reveng/MetaAttributeBinder.java | 4 ++-- .../main/java/org/hibernate/cfg/reveng/OverrideBinder.java | 4 ++-- .../java/org/hibernate/cfg/reveng/OverrideRepository.java | 2 +- .../java/org/hibernate/tool/hbm2x/MetaAttributeHelper.java | 2 +- pom.xml | 6 +++--- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 901c845e87..29fb4231dd 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -57,8 +57,8 @@ - commons-collections - commons-collections + org.apache.commons + commons-collections4 commons-logging diff --git a/main/src/main/java/org/hibernate/cfg/reveng/MetaAttributeBinder.java b/main/src/main/java/org/hibernate/cfg/reveng/MetaAttributeBinder.java index 0f06f65b35..978b1321e1 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/MetaAttributeBinder.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/MetaAttributeBinder.java @@ -5,8 +5,8 @@ import java.util.Iterator; import java.util.List; -import org.apache.commons.collections.MultiMap; -import org.apache.commons.collections.map.MultiValueMap; +import org.apache.commons.collections4.MultiMap; +import org.apache.commons.collections4.map.MultiValueMap; import org.dom4j.Element; import org.hibernate.mapping.MetaAttribute; import org.hibernate.tool.hbm2x.MetaAttributeHelper; diff --git a/main/src/main/java/org/hibernate/cfg/reveng/OverrideBinder.java b/main/src/main/java/org/hibernate/cfg/reveng/OverrideBinder.java index 004e30197d..6aac3e90d4 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/OverrideBinder.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/OverrideBinder.java @@ -5,8 +5,8 @@ import java.util.List; import java.util.Properties; -import org.apache.commons.collections.MultiMap; -import org.apache.commons.collections.map.MultiValueMap; +import org.apache.commons.collections4.MultiMap; +import org.apache.commons.collections4.map.MultiValueMap; import org.dom4j.Document; import org.dom4j.Element; import org.hibernate.MappingException; diff --git a/main/src/main/java/org/hibernate/cfg/reveng/OverrideRepository.java b/main/src/main/java/org/hibernate/cfg/reveng/OverrideRepository.java index 4b50f88f80..b60099cc74 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/OverrideRepository.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/OverrideRepository.java @@ -14,7 +14,7 @@ import java.util.Properties; import java.util.Set; -import org.apache.commons.collections.MultiMap; +import org.apache.commons.collections4.MultiMap; import org.dom4j.Document; import org.hibernate.MappingException; import org.hibernate.internal.util.StringHelper; diff --git a/main/src/main/java/org/hibernate/tool/hbm2x/MetaAttributeHelper.java b/main/src/main/java/org/hibernate/tool/hbm2x/MetaAttributeHelper.java index 83c6c47252..359c4f57ee 100644 --- a/main/src/main/java/org/hibernate/tool/hbm2x/MetaAttributeHelper.java +++ b/main/src/main/java/org/hibernate/tool/hbm2x/MetaAttributeHelper.java @@ -3,7 +3,7 @@ import java.util.Collection; import java.util.Iterator; -import org.apache.commons.collections.MultiMap; +import org.apache.commons.collections4.MultiMap; import org.hibernate.mapping.MetaAttribute; /** diff --git a/pom.xml b/pom.xml index 4b586b0078..cc82458a19 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ 1.10.7 - 3.2.2 + 4.4 1.2 3.18.0 2.3.29 @@ -65,8 +65,8 @@ test - commons-collections - commons-collections + org.apache.commons + commons-collections4 ${commons-collections.version} From 226f1086147c43afa9f7e96921a8a4908b09c63e Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 16 Oct 2019 14:23:33 +0200 Subject: [PATCH 111/560] HBX-1885: Replace the use of the deprecated classes 'MultiMap' and 'MultiValueMap' by 'MultiValuedMap' and 'HashSetValuedHashMap' Signed-off-by: Koen Aers --- .../cfg/reveng/MetaAttributeBinder.java | 37 +++++++------- .../hibernate/cfg/reveng/OverrideBinder.java | 19 +++++-- .../cfg/reveng/OverrideRepository.java | 49 ++++++++++--------- .../org/hibernate/cfg/reveng/TableFilter.java | 8 +-- .../tool/hbm2x/MetaAttributeHelper.java | 30 +++++------- 5 files changed, 72 insertions(+), 71 deletions(-) diff --git a/main/src/main/java/org/hibernate/cfg/reveng/MetaAttributeBinder.java b/main/src/main/java/org/hibernate/cfg/reveng/MetaAttributeBinder.java index 978b1321e1..6c557afa90 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/MetaAttributeBinder.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/MetaAttributeBinder.java @@ -5,8 +5,8 @@ import java.util.Iterator; import java.util.List; -import org.apache.commons.collections4.MultiMap; -import org.apache.commons.collections4.map.MultiValueMap; +import org.apache.commons.collections4.MultiValuedMap; +import org.apache.commons.collections4.multimap.HashSetValuedHashMap; import org.dom4j.Element; import org.hibernate.mapping.MetaAttribute; import org.hibernate.tool.hbm2x.MetaAttributeHelper; @@ -22,19 +22,19 @@ public class MetaAttributeBinder { * @return a MultiMap with all values from local and extra values * from inherited */ - public static MultiMap mergeMetaMaps(MultiMap specific, MultiMap general) { - MultiValueMap result = new MultiValueMap(); + public static MultiValuedMap mergeMetaMaps( + MultiValuedMap specific, + MultiValuedMap general) { + MultiValuedMap result = new HashSetValuedHashMap(); MetaAttributeHelper.copyMultiMap(result, specific); - if (general != null) { - for (Iterator iter = general.keySet().iterator();iter.hasNext();) { - Object key = iter.next(); - + for (Iterator iter = general.keySet().iterator();iter.hasNext();) { + String key = iter.next(); if (!specific.containsKey(key) ) { // inheriting a meta attribute only if it is inheritable - Collection ml = (Collection)general.get(key); - for (Iterator iterator = ml.iterator(); iterator.hasNext();) { - SimpleMetaAttribute element = (SimpleMetaAttribute) iterator.next(); + Collection ml = general.get(key); + for (Iterator iterator = ml.iterator(); iterator.hasNext();) { + SimpleMetaAttribute element = iterator.next(); if (element.inheritable) { result.put(key, element); } @@ -47,26 +47,25 @@ public static MultiMap mergeMetaMaps(MultiMap specific, MultiMap general) { } - public static MetaAttribute toRealMetaAttribute(String name, List values) { + public static MetaAttribute toRealMetaAttribute(String name, Collection values) { MetaAttribute attribute = new MetaAttribute(name); - for (Iterator iter = values.iterator(); iter.hasNext();) { - SimpleMetaAttribute element = (SimpleMetaAttribute) iter.next(); + for (Iterator iter = values.iterator(); iter.hasNext();) { + SimpleMetaAttribute element = iter.next(); attribute.addValue(element.value); } return attribute; } - /** * Method loadAndMergeMetaMap. * @param classElement * @param inheritedMeta * @return MultiMap */ - public static MultiMap loadAndMergeMetaMap( + public static MultiValuedMap loadAndMergeMetaMap( Element classElement, - MultiMap inheritedMeta) { + MultiValuedMap inheritedMeta) { return MetaAttributeBinder.mergeMetaMaps(loadMetaMap(classElement), inheritedMeta); } @@ -77,8 +76,8 @@ public static MultiMap loadAndMergeMetaMap( * @param element * @return MultiMap */ - protected static MultiMap loadMetaMap(Element element) { - MultiMap result = new MultiValueMap(); + protected static MultiValuedMap loadMetaMap(Element element) { + MultiValuedMap result = new HashSetValuedHashMap(); List metaAttributeList = new ArrayList(); for (Object obj : element.elements("meta")) { metaAttributeList.add((Element)obj); diff --git a/main/src/main/java/org/hibernate/cfg/reveng/OverrideBinder.java b/main/src/main/java/org/hibernate/cfg/reveng/OverrideBinder.java index 6aac3e90d4..d9ce82a6ff 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/OverrideBinder.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/OverrideBinder.java @@ -5,8 +5,8 @@ import java.util.List; import java.util.Properties; -import org.apache.commons.collections4.MultiMap; -import org.apache.commons.collections4.map.MultiValueMap; +import org.apache.commons.collections4.MultiValuedMap; +import org.apache.commons.collections4.multimap.HashSetValuedHashMap; import org.dom4j.Document; import org.dom4j.Element; import org.hibernate.MappingException; @@ -123,7 +123,10 @@ private static void bindTables(List tables, OverrideRepository repository) { } private static void bindMetaAttributes(Element element, Table table, OverrideRepository repository) { - MultiMap map = MetaAttributeBinder.loadAndMergeMetaMap( element, new MultiValueMap()); + MultiValuedMap map = + MetaAttributeBinder.loadAndMergeMetaMap( + element, + new HashSetValuedHashMap()); if(map!=null && !map.isEmpty()) { repository.addMetaAttributeInfo( table, map); } @@ -320,7 +323,10 @@ private static List bindColumns(List columns, Table table, OverrideRe throw new MappingException("Column " + column.getName() + " already exists in table " + tableIdentifier ); } - MultiMap map = MetaAttributeBinder.loadAndMergeMetaMap( element, new MultiValueMap()); + MultiValuedMap map = + MetaAttributeBinder.loadAndMergeMetaMap( + element, + new HashSetValuedHashMap()); if(map!=null && !map.isEmpty()) { repository.addMetaAttributeInfo( tableIdentifier, column.getName(), map); } @@ -383,7 +389,10 @@ private static void bindTableFilters(List filters, OverrideRepository resposi filter.setExclude(Boolean.valueOf(element.attributeValue("exclude") ) ); filter.setPackage(element.attributeValue("package") ); - MultiMap map = MetaAttributeBinder.loadAndMergeMetaMap( element, new MultiValueMap()); + MultiValuedMap map = + MetaAttributeBinder.loadAndMergeMetaMap( + element, + new HashSetValuedHashMap()); if(map!=null && !map.isEmpty()) { filter.setMetaAttributes( map ); } else { diff --git a/main/src/main/java/org/hibernate/cfg/reveng/OverrideRepository.java b/main/src/main/java/org/hibernate/cfg/reveng/OverrideRepository.java index b60099cc74..f8ea2d538e 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/OverrideRepository.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/OverrideRepository.java @@ -5,16 +5,17 @@ import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; +import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.Map.Entry; import java.util.Properties; import java.util.Set; -import org.apache.commons.collections4.MultiMap; +import org.apache.commons.collections4.MapIterator; +import org.apache.commons.collections4.MultiValuedMap; import org.dom4j.Document; import org.hibernate.MappingException; import org.hibernate.internal.util.StringHelper; @@ -70,9 +71,9 @@ public class OverrideRepository { final private Map foreignKeyToEntityInfo; final private Map foreignKeyToInverseEntityInfo; - final private Map tableMetaAttributes; // TI -> MultiMap of SimpleMetaAttributes + final private Map> tableMetaAttributes; // TI -> MultiMap of SimpleMetaAttributes - final private Map columnMetaAttributes; + final private Map> columnMetaAttributes; //private String defaultCatalog; //private String defaultSchema; @@ -98,8 +99,8 @@ public OverrideRepository() { foreignKeyToInverseName = new HashMap(); foreignKeyInverseExclude = new HashMap(); foreignKeyToOneExclude = new HashMap(); - tableMetaAttributes = new HashMap(); - columnMetaAttributes = new HashMap(); + tableMetaAttributes = new HashMap>(); + columnMetaAttributes = new HashMap>(); foreignKeyToEntityInfo = new HashMap(); foreignKeyToInverseEntityInfo = new HashMap(); } @@ -501,7 +502,7 @@ public AssociationInfo foreignKeyToAssociationInfo(ForeignKey foreignKey) { } protected Map columnToMetaAttributes(TableIdentifier tableIdentifier, String column) { - MultiMap specific = columnMetaAttributes.get( new TableColumnKey(tableIdentifier, column) ); + MultiValuedMap specific = columnMetaAttributes.get( new TableColumnKey(tableIdentifier, column) ); if(specific!=null && !specific.isEmpty()) { return toMetaAttributes(specific); } @@ -511,11 +512,11 @@ protected Map columnToMetaAttributes(TableIdentifier tabl // TODO: optimize protected Map tableToMetaAttributes(TableIdentifier identifier) { - MultiMap specific = tableMetaAttributes.get( identifier ); + MultiValuedMap specific = tableMetaAttributes.get( identifier ); if(specific!=null && !specific.isEmpty()) { return toMetaAttributes(specific); } - Map general = findGeneralAttributes( identifier ); + MultiValuedMap general = findGeneralAttributes( identifier ); if(general!=null && !general.isEmpty()) { return toMetaAttributes(general); } @@ -537,11 +538,11 @@ protected Map tableToMetaAttributes(TableIdentifier identi */ } - private Map findGeneralAttributes(TableIdentifier identifier) { + private MultiValuedMap findGeneralAttributes(TableIdentifier identifier) { Iterator iterator = tableFilters.iterator(); while(iterator.hasNext() ) { TableFilter tf = iterator.next(); - Map value = tf.getMetaAttributes(identifier); + MultiValuedMap value = tf.getMetaAttributes(identifier); if(value!=null) { return value; } @@ -549,20 +550,15 @@ private Map findGeneralAttributes(TableIdentifier identifier) { return null; } - private Map toMetaAttributes(Map value) { + private Map toMetaAttributes(MultiValuedMap mvm) { Map result = new HashMap(); - - Set set = value.entrySet(); - for (Iterator iter = set.iterator(); iter.hasNext();) { - Entry entry = (Entry)iter.next(); - String name = (String) entry.getKey(); - List values = (List) entry.getValue(); - - result.put(name, MetaAttributeBinder.toRealMetaAttribute(name, values)); + for (MapIterator iter = mvm.mapIterator(); iter.hasNext();) { + String key = iter.next(); + Collection values = mvm.get(key); + result.put(key, MetaAttributeBinder.toRealMetaAttribute(key, values)); } - return result; - } + } public ReverseEngineeringStrategy getReverseEngineeringStrategy() { return getReverseEngineeringStrategy(null); @@ -703,14 +699,19 @@ public void addForeignKeyInfo(String constraintName, String toOneProperty, Boole } - public void addMetaAttributeInfo(Table table, MultiMap map) { + public void addMetaAttributeInfo( + Table table, + MultiValuedMap map) { if(map!=null && !map.isEmpty()) { tableMetaAttributes.put(TableIdentifier.create(table), map); } } - public void addMetaAttributeInfo(TableIdentifier tableIdentifier, String name, MultiMap map) { + public void addMetaAttributeInfo( + TableIdentifier tableIdentifier, + String name, + MultiValuedMap map) { if(map!=null && !map.isEmpty()) { columnMetaAttributes.put(new TableColumnKey( tableIdentifier, name ), map); } diff --git a/main/src/main/java/org/hibernate/cfg/reveng/TableFilter.java b/main/src/main/java/org/hibernate/cfg/reveng/TableFilter.java index d634cf1475..0d612253d3 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/TableFilter.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/TableFilter.java @@ -1,6 +1,6 @@ package org.hibernate.cfg.reveng; -import java.util.Map; +import org.apache.commons.collections4.MultiValuedMap; /** @@ -73,7 +73,7 @@ public String toString() { private Matcher catalogMatcher; private Matcher schemaMatcher; private Matcher nameMatcher; - private Map metaAttributes; + private MultiValuedMap metaAttributes; @@ -147,11 +147,11 @@ public Boolean getExclude() { return exclude; } - public Map getMetaAttributes(TableIdentifier identifier) { + public MultiValuedMap getMetaAttributes(TableIdentifier identifier) { return isRelevantFor(identifier) ? metaAttributes : null; } - public void setMetaAttributes(Map metaAttributes) { + public void setMetaAttributes(MultiValuedMap metaAttributes) { this.metaAttributes = metaAttributes; } } diff --git a/main/src/main/java/org/hibernate/tool/hbm2x/MetaAttributeHelper.java b/main/src/main/java/org/hibernate/tool/hbm2x/MetaAttributeHelper.java index 359c4f57ee..2622310ea7 100644 --- a/main/src/main/java/org/hibernate/tool/hbm2x/MetaAttributeHelper.java +++ b/main/src/main/java/org/hibernate/tool/hbm2x/MetaAttributeHelper.java @@ -3,7 +3,8 @@ import java.util.Collection; import java.util.Iterator; -import org.apache.commons.collections4.MultiMap; +import org.apache.commons.collections4.MultiValuedMap; +import org.hibernate.cfg.reveng.SimpleMetaAttribute; import org.hibernate.mapping.MetaAttribute; /** @@ -62,27 +63,18 @@ static String getMetaAsString(Collection c) { return getMetaAsString(c, ""); } - /** - * Copies all the values from one MultiMap to another. - * This method is needed because the (undocumented) behaviour of - * MultiHashMap.putAll in versions of Commons Collections prior to 3.0 - * was to replace the collection in the destination, whereas in 3.0 - * it adds the collection from the source as an _element_ of the collection - * in the destination. This method makes no assumptions about the implementation - * of the MultiMap, and should work with all versions. - * - * @param destination - * @param specific - */ - public static void copyMultiMap(MultiMap destination, MultiMap specific) { - for (Iterator keyIterator = specific.keySet().iterator(); keyIterator.hasNext(); ) { - Object key = keyIterator.next(); - Collection c = (Collection)specific.get(key); - for (Iterator valueIterator = c.iterator(); valueIterator.hasNext(); ) + public static void copyMultiMap( + MultiValuedMap destination, + MultiValuedMap specific) { + for (Iterator keyIterator = specific.keySet().iterator(); keyIterator.hasNext(); ) { + String key = keyIterator.next(); + Collection c = specific.get(key); + for (Iterator valueIterator = c.iterator(); valueIterator.hasNext();) { destination.put(key, valueIterator.next() ); + } } } - + public static boolean getMetaAsBool(org.hibernate.mapping.MetaAttribute metaAttribute, boolean defaultValue) { return getMetaAsBool(metaAttribute==null?null:metaAttribute.getValues(), defaultValue); } From 0d1fcbf994e4fcdecb27b16152ee8feb60a903d3 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 17 Oct 2019 09:22:01 +0200 Subject: [PATCH 112/560] HBX-1886: Replace commons-logging with java logging Signed-off-by: Koen Aers --- main/pom.xml | 4 - .../main/java/org/hibernate/tool/Version.java | 5 +- main/src/main/resources/dao/daohome.ftl | 80 +++++++++---------- pom.xml | 6 -- .../tool/hbm2x/Hbm2EJBDaoTest/TestCase.java | 2 - .../hbm2x/Hbm2HibernateDAOTest/TestCase.java | 2 - 6 files changed, 42 insertions(+), 57 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 29fb4231dd..6d50b2a55c 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -60,10 +60,6 @@ org.apache.commons commons-collections4 - - commons-logging - commons-logging - javax.persistence javax.persistence-api diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index d6205cfa5c..976a5a385b 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -1,7 +1,6 @@ package org.hibernate.tool; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import java.util.logging.Logger; final public class Version { @@ -9,7 +8,7 @@ final public class Version { private static final Version instance = new Version(); - private static Log log = LogFactory.getLog( Version.class ); + private static Logger log = Logger.getLogger( Version.class.getName() ); static { log.info( "Hibernate Tools " + VERSION ); diff --git a/main/src/main/resources/dao/daohome.ftl b/main/src/main/resources/dao/daohome.ftl index 37d0f55816..d8766bd719 100644 --- a/main/src/main/resources/dao/daohome.ftl +++ b/main/src/main/resources/dao/daohome.ftl @@ -12,58 +12,58 @@ ${pojo.getPackageDeclaration()} public class ${declarationName}Home { - private static final ${pojo.importType("org.apache.commons.logging.Log")} log = ${pojo.importType("org.apache.commons.logging.LogFactory")}.getLog(${pojo.getDeclarationName()}Home.class); + private static final ${pojo.importType("java.util.logging.Logger")} logger = ${pojo.importType("Logger")}.getLogger(${pojo.getDeclarationName()}Home.class.getName()); <#if ejb3> @${pojo.importType("javax.persistence.PersistenceContext")} private ${pojo.importType("javax.persistence.EntityManager")} entityManager; public void persist(${declarationName} transientInstance) { - log.debug("persisting ${declarationName} instance"); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "persisting ${declarationName} instance"); try { entityManager.persist(transientInstance); - log.debug("persist successful"); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "persist successful"); } catch (RuntimeException re) { - log.error("persist failed", re); + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "persist failed", re); throw re; } } public void remove(${declarationName} persistentInstance) { - log.debug("removing ${declarationName} instance"); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "removing ${declarationName} instance"); try { entityManager.remove(persistentInstance); - log.debug("remove successful"); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "remove successful"); } catch (RuntimeException re) { - log.error("remove failed", re); + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "remove failed", re); throw re; } } public ${declarationName} merge(${declarationName} detachedInstance) { - log.debug("merging ${declarationName} instance"); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "merging ${declarationName} instance"); try { ${declarationName} result = entityManager.merge(detachedInstance); - log.debug("merge successful"); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "merge successful"); return result; } catch (RuntimeException re) { - log.error("merge failed", re); + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "merge failed", re); throw re; } } <#if clazz.identifierProperty?has_content> public ${declarationName} findById( ${pojo.getJavaTypeName(clazz.identifierProperty, jdk5)} id) { - log.debug("getting ${declarationName} instance with id: " + id); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "getting ${declarationName} instance with id: " + id); try { ${declarationName} instance = entityManager.find(${pojo.getDeclarationName()}.class, id); - log.debug("get successful"); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "get successful"); return instance; } catch (RuntimeException re) { - log.error("get failed", re); + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "get failed", re); throw re; } } @@ -76,89 +76,89 @@ public class ${declarationName}Home { return (${pojo.importType("org.hibernate.SessionFactory")}) new ${pojo.importType("javax.naming.InitialContext")}().lookup("${sessionFactoryName}"); } catch (Exception e) { - log.error("Could not locate SessionFactory in JNDI", e); + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "Could not locate SessionFactory in JNDI", e); throw new IllegalStateException("Could not locate SessionFactory in JNDI"); } } public void persist(${declarationName} transientInstance) { - log.debug("persisting ${declarationName} instance"); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "persisting ${declarationName} instance"); try { sessionFactory.getCurrentSession().persist(transientInstance); - log.debug("persist successful"); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "persist successful"); } catch (RuntimeException re) { - log.error("persist failed", re); + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "persist failed", re); throw re; } } public void attachDirty(${declarationName} instance) { - log.debug("attaching dirty ${declarationName} instance"); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "attaching dirty ${declarationName} instance"); try { sessionFactory.getCurrentSession().saveOrUpdate(instance); - log.debug("attach successful"); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "attach successful"); } catch (RuntimeException re) { - log.error("attach failed", re); + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "attach failed", re); throw re; } } public void attachClean(${declarationName} instance) { - log.debug("attaching clean ${declarationName} instance"); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "attaching clean ${declarationName} instance"); try { sessionFactory.getCurrentSession().lock(instance, ${pojo.importType("org.hibernate.LockMode")}.NONE); - log.debug("attach successful"); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "attach successful"); } catch (RuntimeException re) { - log.error("attach failed", re); + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "attach failed", re); throw re; } } public void delete(${declarationName} persistentInstance) { - log.debug("deleting ${declarationName} instance"); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "deleting ${declarationName} instance"); try { sessionFactory.getCurrentSession().delete(persistentInstance); - log.debug("delete successful"); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "delete successful"); } catch (RuntimeException re) { - log.error("delete failed", re); + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "delete failed", re); throw re; } } public ${declarationName} merge(${declarationName} detachedInstance) { - log.debug("merging ${declarationName} instance"); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "merging ${declarationName} instance"); try { ${declarationName} result = (${declarationName}) sessionFactory.getCurrentSession() .merge(detachedInstance); - log.debug("merge successful"); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "merge successful"); return result; } catch (RuntimeException re) { - log.error("merge failed", re); + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "merge failed", re); throw re; } } <#if clazz.identifierProperty?has_content> public ${declarationName} findById( ${c2j.getJavaTypeName(clazz.identifierProperty, jdk5)} id) { - log.debug("getting ${declarationName} instance with id: " + id); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "getting ${declarationName} instance with id: " + id); try { ${declarationName} instance = (${declarationName}) sessionFactory.getCurrentSession() .get("${clazz.entityName}", id); if (instance==null) { - log.debug("get successful, no instance found"); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "get successful, no instance found"); } else { - log.debug("get successful, instance found"); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "get successful, instance found"); } return instance; } catch (RuntimeException re) { - log.error("get failed", re); + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "get failed", re); throw re; } } @@ -166,7 +166,7 @@ public class ${declarationName}Home { <#if clazz.hasNaturalId()> public ${declarationName} findByNaturalId(${c2j.asNaturalIdParameterList(clazz)}) { - log.debug("getting ${declarationName} instance by natural id"); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "getting ${declarationName} instance by natural id"); try { ${declarationName} instance = (${declarationName}) sessionFactory.getCurrentSession() .createCriteria("${clazz.entityName}") @@ -183,15 +183,15 @@ public class ${declarationName}Home { ) .uniqueResult(); if (instance==null) { - log.debug("get successful, no instance found"); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "get successful, no instance found"); } else { - log.debug("get successful, instance found"); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "get successful, instance found"); } return instance; } catch (RuntimeException re) { - log.error("query failed", re); + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "query failed", re); throw re; } } @@ -201,7 +201,7 @@ public class ${declarationName}Home { <#else> public ${pojo.importType("java.util.List")} findByExample(${declarationName} instance) { - log.debug("finding ${declarationName} instance by example"); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "finding ${declarationName} instance by example"); try { <#if jdk5> ${pojo.importType("java.util.List")}<${declarationName}> results = (List<${declarationName}>) sessionFactory.getCurrentSession() @@ -215,11 +215,11 @@ public class ${declarationName}Home { .add(${pojo.importType("org.hibernate.criterion.Example")}.create(instance)) .list(); - log.debug("find by example successful, result size: " + results.size()); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "find by example successful, result size: " + results.size()); return results; } catch (RuntimeException re) { - log.error("find by example failed", re); + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "find by example failed", re); throw re; } } diff --git a/pom.xml b/pom.xml index cc82458a19..0b1f991b1f 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,6 @@ 1.10.7 4.4 - 1.2 3.18.0 2.3.29 1.4.199 @@ -69,11 +68,6 @@ commons-collections4 ${commons-collections.version} - - commons-logging - commons-logging - ${commons-logging.version} - javax javaee-api diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2EJBDaoTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2EJBDaoTest/TestCase.java index 5c95704957..4df7caabdf 100755 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2EJBDaoTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2EJBDaoTest/TestCase.java @@ -12,7 +12,6 @@ import javax.ejb.EJB; import javax.persistence.Persistence; -import org.apache.commons.logging.Log; import org.hibernate.tool.api.metadata.MetadataDescriptor; import org.hibernate.tool.hbm2x.DAOExporter; import org.hibernate.tool.hbm2x.POJOExporter; @@ -77,7 +76,6 @@ public void testCompilable() throws IOException { compiled.mkdir(); FileUtil.generateNoopComparator(outputDir); List jars = new ArrayList(); - jars.add(JavaUtil.resolvePathToJarFileFor(Log.class)); // for commons logging jars.add(JavaUtil.resolvePathToJarFileFor(Persistence.class)); // for jpa api jars.add(JavaUtil.resolvePathToJarFileFor(EJB.class)); // for javaee api JavaUtil.compile(outputDir, compiled); diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2HibernateDAOTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2HibernateDAOTest/TestCase.java index fb5870fb27..40c382c8a2 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2HibernateDAOTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2HibernateDAOTest/TestCase.java @@ -11,7 +11,6 @@ import javax.persistence.Persistence; -import org.apache.commons.logging.Log; import org.hibernate.Version; import org.hibernate.tool.api.metadata.MetadataDescriptor; import org.hibernate.tool.hbm2x.DAOExporter; @@ -79,7 +78,6 @@ public void testCompilable() throws IOException { compiled.mkdir(); FileUtil.generateNoopComparator(outputDir); List jars = new ArrayList(); - jars.add(JavaUtil.resolvePathToJarFileFor(Log.class)); // for commons logging jars.add(JavaUtil.resolvePathToJarFileFor(Persistence.class)); // for jpa api jars.add(JavaUtil.resolvePathToJarFileFor(Version.class)); // for hibernate core JavaUtil.compile(outputDir, compiled, jars); From 88b5fef27862c72eee36f2530fbd9573f0b74967 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 18 Oct 2019 13:40:36 +0200 Subject: [PATCH 113/560] HBX-1887: Update eclipse-jdt-core dependency to version 3.19.0 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0b1f991b1f..48357ea288 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ 1.10.7 4.4 - 3.18.0 + 3.19.0 2.3.29 1.4.199 5.1.0.Final From 53610ebcb40ea0e34308f7593e342775dc5d6771 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 22 Oct 2019 08:08:40 +0200 Subject: [PATCH 114/560] HBX-1867: Update Hibernate core dependency to 5.4.7.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 48357ea288..421b419f5c 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ 2.3.29 1.4.199 5.1.0.Final - 5.4.6.Final + 5.4.7.Final 2.5.0 7.0 2.2 From 62a7a15d45f57748b451578bdc5e2acb2b40366c Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 22 Oct 2019 08:31:29 +0200 Subject: [PATCH 115/560] HBX-1881: Update version identifier to 5.4.7.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 6d50b2a55c..9c97fb42c9 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.7-SNAPSHOT + 5.4.7.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 976a5a385b..0d697b4dbd 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.4.7-SNAPSHOT"; + public static final String VERSION = "5.4.7.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 399d452c4d..7d289f4842 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.7-SNAPSHOT + 5.4.7.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 421b419f5c..2c20ca4d69 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.7-SNAPSHOT + 5.4.7.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 91950bb946..ba3718f044 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.7-SNAPSHOT + 5.4.7.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 45655e6252..bf91c3ff76 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.7-SNAPSHOT + 5.4.7.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 72a6f6e3bd..48b96f3d7f 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.7-SNAPSHOT + 5.4.7.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 8e2aac51e4..00b3fd58fc 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.7-SNAPSHOT + 5.4.7.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 05ed9203fb..cee5e96cf8 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.7-SNAPSHOT + 5.4.7.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 3327e579cd..9db497b8b6 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.7-SNAPSHOT + 5.4.7.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index cef0d2e5da..01ba1ac7a1 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.7-SNAPSHOT + 5.4.7.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 4d171e1c8f..27e5a61dfc 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.7-SNAPSHOT + 5.4.7.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index fc3714b7f7..6e44a248d1 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.7-SNAPSHOT + 5.4.7.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 16f659d453..e79cba209f 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.7-SNAPSHOT + 5.4.7.Final hibernate-tools-tests-utils From 9b55f6eaff73bb6d5e16e620383884dbbfd5fe20 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 23 Oct 2019 16:23:16 +0200 Subject: [PATCH 116/560] HBX-1892: Update version identifier to 5.4.8-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 9c97fb42c9..9c93a05da1 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.7.Final + 5.4.8-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 0d697b4dbd..d9eab198f1 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.4.7.Final"; + public static final String VERSION = "5.4.8-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 7d289f4842..4dc720b933 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.7.Final + 5.4.8-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 2c20ca4d69..23d54cb8c6 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.7.Final + 5.4.8-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index ba3718f044..2068a2dec3 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.7.Final + 5.4.8-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index bf91c3ff76..672c2827a6 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.7.Final + 5.4.8-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 48b96f3d7f..1548e88b98 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.7.Final + 5.4.8-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 00b3fd58fc..5dab00293d 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.7.Final + 5.4.8-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index cee5e96cf8..16de7ee31d 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.7.Final + 5.4.8-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 9db497b8b6..88180d3f04 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.7.Final + 5.4.8-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 01ba1ac7a1..77ec535660 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.7.Final + 5.4.8-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 27e5a61dfc..c31648fe66 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.7.Final + 5.4.8-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 6e44a248d1..60b778edb8 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.7.Final + 5.4.8-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index e79cba209f..002ce48aff 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.7.Final + 5.4.8-SNAPSHOT hibernate-tools-tests-utils From e1e4f4d1f0cd98b1b1b71042ad6ee35bb7ba8b2e Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 23 Oct 2019 16:32:47 +0200 Subject: [PATCH 117/560] HBX-1889: Remove unused dependency on jboss-logging Signed-off-by: Koen Aers --- main/pom.xml | 4 ---- pom.xml | 5 ----- 2 files changed, 9 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 9c93a05da1..0402c8ba4a 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -88,10 +88,6 @@ org.hibernate.common hibernate-commons-annotations - - org.jboss.logging - jboss-logging - diff --git a/pom.xml b/pom.xml index 23d54cb8c6..1cb8ab72ef 100644 --- a/pom.xml +++ b/pom.xml @@ -142,11 +142,6 @@ ${hsqldb.version} test - - org.jboss.logging - jboss-logging - ${jboss-logging.version} - From ee47ae3edf91819f13a59448490be748dec8de55 Mon Sep 17 00:00:00 2001 From: Jacques Stadler Date: Tue, 27 Mar 2018 22:08:39 +0200 Subject: [PATCH 118/560] HBX-1537 Add description for the individual properties of the mojo Signed-off-by: Koen Aers --- .../org/hibernate/mvn/AbstractHbm2xMojo.java | 24 ++++++++++++++--- .../java/org/hibernate/mvn/Hbm2DdlMojo.java | 26 +++++++++++++++++++ .../java/org/hibernate/mvn/Hbm2JavaMojo.java | 8 ++++++ 3 files changed, 54 insertions(+), 4 deletions(-) diff --git a/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java b/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java index 1d7578110c..1d2d129320 100644 --- a/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java +++ b/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java @@ -1,8 +1,6 @@ package org.hibernate.mvn; import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugins.annotations.Parameter; import org.apache.tools.ant.BuildException; import org.hibernate.cfg.reveng.OverrideRepository; @@ -20,34 +18,52 @@ public abstract class AbstractHbm2xMojo extends AbstractMojo { // For reveng strategy + /** The default package name to use when mappings for classes are created. */ @Parameter private String packageName; + + /** The name of a property file, e.g. hibernate.properties. */ @Parameter private File revengFile; + /** The class name of the reverse engineering strategy to use. * Extend the DefaultReverseEngineeringStrategy and override the corresponding methods, e.g. * to adapt the generate class names or to provide custom type mappings. */ @Parameter(defaultValue = "org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy") private String revengStrategy; + + /** If true, tables which are pure many-to-many link tables will be mapped as such. + * A pure many-to-many table is one which primary-key contains exactly two foreign-keys pointing + * to other entity tables and has no other columns. */ @Parameter(defaultValue = "true") private boolean detectManyToMany; + + /** If true, a one-to-one association will be created for each foreignkey found. */ @Parameter(defaultValue = "true") private boolean detectOneToOne; + + /** If true, columns named VERSION or TIMESTAMP with appropriate types will be mapped with the appropriate + * optimistic locking corresponding to <version> or <timestamp>. */ @Parameter(defaultValue = "true") private boolean detectOptimisticLock; + + /** If true, a collection will be mapped for each foreignkey. */ @Parameter(defaultValue = "true") private boolean createCollectionForForeignKey; + + /** If true, a many-to-one association will be created for each foreignkey found. */ @Parameter(defaultValue = "true") private boolean createManyToOneForForeignKey; // For configuration + /** The name of a property file, e.g. hibernate.properties. */ @Parameter(defaultValue = "${project.basedir}/src/main/hibernate/hibernate.properties") private File propertyFile; // Not exposed for now private boolean preferBasicCompositeIds = true; - public void execute() throws MojoExecutionException, MojoFailureException { + public void execute() { getLog().info("Starting " + this.getClass().getSimpleName() + "..."); ReverseEngineeringStrategy strategy = setupReverseEngineeringStrategy(); Properties properties = loadPropertiesFile(); @@ -89,7 +105,7 @@ private Properties loadPropertiesFile() { } Properties properties = new Properties(); - try (FileInputStream is = new FileInputStream(propertyFile);) { + try (FileInputStream is = new FileInputStream(propertyFile)) { properties.load(is); return properties; } catch (FileNotFoundException e) { diff --git a/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2DdlMojo.java b/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2DdlMojo.java index b2b4fc2886..0e2a973b95 100644 --- a/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2DdlMojo.java +++ b/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2DdlMojo.java @@ -21,18 +21,44 @@ @Mojo(name = "hbm2ddl", defaultPhase = GENERATE_RESOURCES) public class Hbm2DdlMojo extends AbstractHbm2xMojo { + /** The directory into which the DDLs will be generated. */ @Parameter(defaultValue = "${project.build.directory}/generated-resources/") private File outputDirectory; + + /** The default filename of the generated DDL script. */ @Parameter(defaultValue = "schema.ddl") private String outputFileName; + + /** The type of output to produce. + *
    + *
  • DATABASE: Export to the database.
  • + *
  • SCRIPT (default): Write to a script file.
  • + *
  • STDOUT: Write to {@link System#out}.
  • + *
*/ @Parameter(defaultValue = "SCRIPT") private Set targetTypes; + + /** + * The DDLs statements to create. + *
    + *
  • NONE: None - duh :P.
  • + *
  • CREATE (default): Create only.
  • + *
  • DROP: Drop only.
  • + *
  • BOTH: Drop and then create.
  • + *
+ */ @Parameter(defaultValue = "CREATE") private SchemaExport.Action schemaExportAction; + + /** Set the end of statement delimiter. */ @Parameter(defaultValue = ";") private String delimiter; + + /** Should we format the sql strings? */ @Parameter(defaultValue = "true") private boolean format; + + /** Should we stop once an error occurs? */ @Parameter(defaultValue = "true") private boolean haltOnError; diff --git a/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2JavaMojo.java b/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2JavaMojo.java index d600eee8e7..893ab33917 100644 --- a/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2JavaMojo.java +++ b/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2JavaMojo.java @@ -17,12 +17,20 @@ @Mojo(name = "hbm2java", defaultPhase = GENERATE_SOURCES) public class Hbm2JavaMojo extends AbstractHbm2xMojo { + /** The directory into which the JPA entities will be generated. */ @Parameter(defaultValue = "${project.build.directory}/generated-sources/") private File outputDirectory; + + /** Code will contain EJB 3 features, e.g. using annotations from javax.persistence + * and org.hibernate.annotations. */ @Parameter(defaultValue = "false") private boolean ejb3; + + /** Code will contain JDK 5 constructs such as generics and static imports. */ @Parameter(defaultValue = "false") private boolean jdk5; + + /** A path used for looking up user-edited templates. */ @Parameter private String templatePath; From ca3ba7ce1d07d1ef9205949e0d848a6ea2f2dd64 Mon Sep 17 00:00:00 2001 From: Jacques Stadler Date: Tue, 27 Mar 2018 22:09:34 +0200 Subject: [PATCH 119/560] HBX-1537 Configure the github site-maven-plugin plugin Signed-off-by: Koen Aers --- maven-plugin/pom.xml | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 4dc720b933..7e4af9711b 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -14,8 +14,7 @@ Hibernate Tools Maven Plugin Maven plugin to provide hibernate-tools reverse engineering and code/schema generation abilities. - - https://stadler.github.io/hibernate-tools-maven-plugin/ + https://hibernate.github.io/hibernate-tools/ JIRA @@ -118,24 +117,23 @@ - - - - - - - - - - - - - - - - - - + + com.github.github + site-maven-plugin + ${site-maven-plugin.version} + + + + site + + site-deploy + + github + Creating site for ${project.version} + + + + From 7bcdbd9ced2d5ee86e14ea5e4fba16a1ca65000e Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 4 Nov 2019 12:25:10 +0100 Subject: [PATCH 120/560] HBX-1890: Update Hibernate core dependency to 5.4.8.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1cb8ab72ef..88498c67b5 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ 2.3.29 1.4.199 5.1.0.Final - 5.4.7.Final + 5.4.8.Final 2.5.0 7.0 2.2 From 8c55b83a56e48a1a1a262eb03034bb8fa0ac92af Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 4 Nov 2019 12:55:29 +0100 Subject: [PATCH 121/560] HBX-1891: Update version identifier to 5.4.8.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 0402c8ba4a..1b280181a0 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.8-SNAPSHOT + 5.4.8.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index d9eab198f1..048800a32e 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.4.8-SNAPSHOT"; + public static final String VERSION = "5.4.8.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 7e4af9711b..1c059e24c7 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.8-SNAPSHOT + 5.4.8.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 88498c67b5..8603e4b8c6 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.8-SNAPSHOT + 5.4.8.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 2068a2dec3..cb00500ff9 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.8-SNAPSHOT + 5.4.8.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 672c2827a6..a67c326266 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.8-SNAPSHOT + 5.4.8.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 1548e88b98..a6025282d0 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.8-SNAPSHOT + 5.4.8.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 5dab00293d..9a083f55b9 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.8-SNAPSHOT + 5.4.8.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 16de7ee31d..b8196fd081 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.8-SNAPSHOT + 5.4.8.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 88180d3f04..28cb597bcf 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.8-SNAPSHOT + 5.4.8.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 77ec535660..9aa131f724 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.8-SNAPSHOT + 5.4.8.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index c31648fe66..f1199bde2b 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.8-SNAPSHOT + 5.4.8.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 60b778edb8..f80f24966c 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.8-SNAPSHOT + 5.4.8.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 002ce48aff..a42ef471c4 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.8-SNAPSHOT + 5.4.8.Final hibernate-tools-tests-utils From 0eef0200aea3d2142779326121d56c716f41ef9e Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 6 Nov 2019 08:19:14 +0100 Subject: [PATCH 122/560] HBX-1905: Update version identifier to 5.4.9-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 1b280181a0..f175c17c1a 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.8.Final + 5.4.9-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 048800a32e..9e869168f2 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.4.8.Final"; + public static final String VERSION = "5.4.9-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 1c059e24c7..289fd36f9c 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.8.Final + 5.4.9-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 8603e4b8c6..73ef73d876 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.8.Final + 5.4.9-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index cb00500ff9..6a399317a9 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.8.Final + 5.4.9-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index a67c326266..04647caa8d 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.8.Final + 5.4.9-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index a6025282d0..759bfca0b5 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.8.Final + 5.4.9-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 9a083f55b9..5aa7c7ac24 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.8.Final + 5.4.9-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index b8196fd081..7cc1fbd73e 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.8.Final + 5.4.9-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 28cb597bcf..a6cf5da6be 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.8.Final + 5.4.9-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 9aa131f724..a6bcf3b1fd 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.8.Final + 5.4.9-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index f1199bde2b..581bb182e6 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.8.Final + 5.4.9-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index f80f24966c..36841d93c7 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.8.Final + 5.4.9-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index a42ef471c4..d46fb03af7 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.8.Final + 5.4.9-SNAPSHOT hibernate-tools-tests-utils From 5b92c4d461ee6ced2f087bcb88626b5d3aaf88e3 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 15 Nov 2019 16:12:54 +0100 Subject: [PATCH 123/560] HBX-1911: Update Hibernate core dependency to 5.4.9.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 73ef73d876..f4955b6442 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ 2.3.29 1.4.199 5.1.0.Final - 5.4.8.Final + 5.4.9.Final 2.5.0 7.0 2.2 From d60bf8c7512a418ea834351b7ebd9c589b272d74 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 15 Nov 2019 16:35:16 +0100 Subject: [PATCH 124/560] HBX-1912: Update version identifier to 5.4.9.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index f175c17c1a..23919fce98 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.9-SNAPSHOT + 5.4.9.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 9e869168f2..7c59d1accd 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.4.9-SNAPSHOT"; + public static final String VERSION = "5.4.9.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 289fd36f9c..348e95fa07 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.9-SNAPSHOT + 5.4.9.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index f4955b6442..ebc6b87eff 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.9-SNAPSHOT + 5.4.9.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 6a399317a9..5e54e008d5 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.9-SNAPSHOT + 5.4.9.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 04647caa8d..a42105ba4d 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.9-SNAPSHOT + 5.4.9.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 759bfca0b5..c7d99fcfe6 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.9-SNAPSHOT + 5.4.9.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 5aa7c7ac24..ac74b37832 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.9-SNAPSHOT + 5.4.9.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 7cc1fbd73e..60b1dd6158 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.9-SNAPSHOT + 5.4.9.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index a6cf5da6be..8471ed5551 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.9-SNAPSHOT + 5.4.9.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index a6bcf3b1fd..0db046d8fb 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.9-SNAPSHOT + 5.4.9.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 581bb182e6..2210b5a1b5 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.9-SNAPSHOT + 5.4.9.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 36841d93c7..63f1276610 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.9-SNAPSHOT + 5.4.9.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index d46fb03af7..5373beefe6 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.9-SNAPSHOT + 5.4.9.Final hibernate-tools-tests-utils From b9a8af2bebf412f5904e4e9d6dbca669f2dcdac1 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sun, 17 Nov 2019 14:37:09 +0100 Subject: [PATCH 125/560] HBX-1914: Update version identifier to 5.4.10-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 23919fce98..24a6d486a6 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.9.Final + 5.4.10-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 7c59d1accd..fa5b9098e5 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.4.9.Final"; + public static final String VERSION = "5.4.10-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 348e95fa07..be76482603 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.9.Final + 5.4.10-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index ebc6b87eff..485944e79e 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.9.Final + 5.4.10-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 5e54e008d5..f49368b658 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.9.Final + 5.4.10-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index a42105ba4d..9e92b78732 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.9.Final + 5.4.10-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index c7d99fcfe6..32278f6c2a 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.9.Final + 5.4.10-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index ac74b37832..c108726fdb 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.9.Final + 5.4.10-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 60b1dd6158..5a48fb2b9c 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.9.Final + 5.4.10-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 8471ed5551..9ea9c2e31e 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.9.Final + 5.4.10-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 0db046d8fb..6f781b4c79 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.9.Final + 5.4.10-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 2210b5a1b5..edf029d33f 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.9.Final + 5.4.10-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 63f1276610..21bd1b3ba3 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.9.Final + 5.4.10-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 5373beefe6..92d4638e63 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.9.Final + 5.4.10-SNAPSHOT hibernate-tools-tests-utils From 4d99b00c6e28ca09f3fac32afcc3fc6cb978c700 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 11 Dec 2019 10:14:55 +0100 Subject: [PATCH 126/560] HBX-1939: Update hibernate core dependency to 5.4.10.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 485944e79e..c6c9987bfe 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ 2.3.29 1.4.199 5.1.0.Final - 5.4.9.Final + 5.4.10.Final 2.5.0 7.0 2.2 From 24793f399207f5fdfdd725c151a546870d83335f Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 11 Dec 2019 10:40:06 +0100 Subject: [PATCH 127/560] HBX-1942: Update version identifier to 5.4.10.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 24a6d486a6..5a6ccbfa0e 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.10-SNAPSHOT + 5.4.10.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index fa5b9098e5..3be679923a 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.4.10-SNAPSHOT"; + public static final String VERSION = "5.4.10.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index be76482603..f333b48be5 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.10-SNAPSHOT + 5.4.10.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index c6c9987bfe..4a4f600f9b 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.10-SNAPSHOT + 5.4.10.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index f49368b658..f66b927fee 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.10-SNAPSHOT + 5.4.10.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 9e92b78732..bd3940021a 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.10-SNAPSHOT + 5.4.10.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 32278f6c2a..3f8b1d058e 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.10-SNAPSHOT + 5.4.10.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index c108726fdb..ca683996a3 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.10-SNAPSHOT + 5.4.10.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 5a48fb2b9c..45e03e726a 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.10-SNAPSHOT + 5.4.10.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 9ea9c2e31e..f294b3f743 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.10-SNAPSHOT + 5.4.10.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 6f781b4c79..514aabfdce 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.10-SNAPSHOT + 5.4.10.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index edf029d33f..e13f8a09bc 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.10-SNAPSHOT + 5.4.10.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 21bd1b3ba3..f0f52d9a63 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.10-SNAPSHOT + 5.4.10.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 92d4638e63..b6a48da8a3 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.10-SNAPSHOT + 5.4.10.Final hibernate-tools-tests-utils From 584ef73ecf32d2f76a3e2d997a91f1209c568388 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 11 Dec 2019 12:11:12 +0100 Subject: [PATCH 128/560] HBX-1941: Update version identifier to 5.4.11-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 5a6ccbfa0e..648d10d8c8 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.10.Final + 5.4.11-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 3be679923a..421946af36 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.4.10.Final"; + public static final String VERSION = "5.4.11-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index f333b48be5..6fc6a0ab51 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.10.Final + 5.4.11-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 4a4f600f9b..0688e56d40 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.10.Final + 5.4.11-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index f66b927fee..9341e7b74f 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.10.Final + 5.4.11-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index bd3940021a..134e7f0b9a 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.10.Final + 5.4.11-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 3f8b1d058e..3119344deb 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.10.Final + 5.4.11-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index ca683996a3..08c7e118db 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.10.Final + 5.4.11-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 45e03e726a..5967621973 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.10.Final + 5.4.11-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index f294b3f743..dc4f7c9285 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.10.Final + 5.4.11-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 514aabfdce..46d8470c23 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.10.Final + 5.4.11-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index e13f8a09bc..ce3667e697 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.10.Final + 5.4.11-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index f0f52d9a63..7f86a3d406 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.10.Final + 5.4.11-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index b6a48da8a3..6816ad5087 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.10.Final + 5.4.11-SNAPSHOT hibernate-tools-tests-utils From 00afea0e11572ad7087686116e1e3eebff4b71eb Mon Sep 17 00:00:00 2001 From: Sanne Grinovero Date: Tue, 11 Feb 2020 11:59:45 +0000 Subject: [PATCH 129/560] HBX-1980: The Oracle JDBC driver is now available in Maven central Signed-off-by: Koen Aers --- pom.xml | 2 +- readme.txt | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index 0688e56d40..d33d5b4536 100644 --- a/pom.xml +++ b/pom.xml @@ -39,7 +39,7 @@ 3.4.0.Final 4.12 6.0.6 - 12.2.0.1 + 19.3.0.0 6.1.7.jre8-preview
diff --git a/readme.txt b/readme.txt index 48068ef272..8865422fcf 100644 --- a/readme.txt +++ b/readme.txt @@ -3,14 +3,3 @@ Development The project is developed under the form of a hierarchical multimodule Maven project. After cloning the git repository to your local machine you can import it as such into your favorite IDE. -However in order to compile and run the tests one additional step is required: you need -to download the Oracle JDBC driver (currently we are using ojdbc8.jar) and use the Maven -command to install it into your local repository: - - mvn install:install-file - -Dfile=/path/to/local/ojdbc8.jar - -DgroupId=com.oracle.jdbc - -DartifactId=ojdbc8 - -Dversion=12.2.0.1 - -Dpackaging=jar - \ No newline at end of file From 5a754a768fe9507d8c0ebeee3ca3381e4f8282e5 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 11 Feb 2020 18:06:11 +0100 Subject: [PATCH 130/560] HBX-1980: Use 'com.oracle.ojdbc' groupid Signed-off-by: Koen Aers --- pom.xml | 2 +- test/oracle/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index d33d5b4536..f107f7643c 100644 --- a/pom.xml +++ b/pom.xml @@ -58,7 +58,7 @@ test - com.oracle.jdbc + com.oracle.ojdbc ojdbc8 ${oracle.version} test diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index ce3667e697..73f0f4805f 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -21,7 +21,7 @@ junit - com.oracle.jdbc + com.oracle.ojdbc ojdbc8 From 56b94c37528ff90d70b83f9375547cd19ed922cb Mon Sep 17 00:00:00 2001 From: Sanne Grinovero Date: Tue, 11 Feb 2020 14:16:16 +0000 Subject: [PATCH 131/560] HBX-1983: Be more defensive on setting Environment.Variable properties Signed-off-by: Koen Aers --- .../org/hibernate/tool/ant/HibernateToolTask.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/main/src/main/java/org/hibernate/tool/ant/HibernateToolTask.java b/main/src/main/java/org/hibernate/tool/ant/HibernateToolTask.java index 3b722c587b..d0251f6c95 100644 --- a/main/src/main/java/org/hibernate/tool/ant/HibernateToolTask.java +++ b/main/src/main/java/org/hibernate/tool/ant/HibernateToolTask.java @@ -305,7 +305,18 @@ public void addConfiguredPropertySet(PropertySet ps) { } public void addConfiguredProperty(Environment.Variable property) { - properties.put(property.getKey(), property.getValue()); + String key = property.getKey(); + String value = property.getValue(); + if (key==null) { + log( "Ignoring unnamed task property", Project.MSG_WARN ); + return; + } + if (value==null){ + //This is legal in ANT, make sure we warn properly: + log( "Ignoring task property '" +key+"' as no value was specified", Project.MSG_WARN ); + return; + } + properties.put( key, value ); } From 4a2d0004c3fc1cc342a482b0c3db4c7e644904db Mon Sep 17 00:00:00 2001 From: Sanne Grinovero Date: Tue, 11 Feb 2020 12:02:48 +0000 Subject: [PATCH 132/560] HBX-1984: Update to Hibernate ORM 5.4.11.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f107f7643c..71ce0a34e2 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ 2.3.29 1.4.199 5.1.0.Final - 5.4.10.Final + 5.4.11.Final 2.5.0 7.0 2.2 From d1dff5beb4106c66fb295a2ac1738b48d5580794 Mon Sep 17 00:00:00 2001 From: Sanne Grinovero Date: Tue, 11 Feb 2020 12:03:07 +0000 Subject: [PATCH 133/560] Update to JBoss Logging 3.4.1.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 71ce0a34e2..7e5f3ab818 100644 --- a/pom.xml +++ b/pom.xml @@ -36,7 +36,7 @@ 7.0 2.2 1.2.0 - 3.4.0.Final + 3.4.1.Final 4.12 6.0.6 19.3.0.0 From b3c5c2d3717d6732fbeb5c1b8e7f383e6c692331 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 12 Feb 2020 09:42:43 +0100 Subject: [PATCH 134/560] HBX-1982: Update version identifier to 5.4.11.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 648d10d8c8..70481763e6 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.11-SNAPSHOT + 5.4.11.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 421946af36..e0f0bd1a8e 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.4.11-SNAPSHOT"; + public static final String VERSION = "5.4.11.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 6fc6a0ab51..e555edb963 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.11-SNAPSHOT + 5.4.11.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 7e5f3ab818..cdee31d938 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.11-SNAPSHOT + 5.4.11.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 9341e7b74f..04743243ba 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.11-SNAPSHOT + 5.4.11.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 134e7f0b9a..11584980ba 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.11-SNAPSHOT + 5.4.11.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 3119344deb..7de0006f01 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.11-SNAPSHOT + 5.4.11.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 08c7e118db..a728fe7b47 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.11-SNAPSHOT + 5.4.11.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 5967621973..1a62e6f3c1 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.11-SNAPSHOT + 5.4.11.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index dc4f7c9285..f81033f559 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.11-SNAPSHOT + 5.4.11.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 46d8470c23..a236c6b72a 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.11-SNAPSHOT + 5.4.11.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 73f0f4805f..127d063cd0 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.11-SNAPSHOT + 5.4.11.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 7f86a3d406..87b57a2f23 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.11-SNAPSHOT + 5.4.11.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 6816ad5087..a533b16225 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.11-SNAPSHOT + 5.4.11.Final hibernate-tools-tests-utils From 29ca69def104f5ba77bb9d7743cf8cbd813437db Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 12 Feb 2020 10:34:08 +0100 Subject: [PATCH 135/560] HBX-1985: Update version identifier to 5.4.12-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 70481763e6..7aa033d697 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.11.Final + 5.4.12-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index e0f0bd1a8e..1f5a79f2fd 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.4.11.Final"; + public static final String VERSION = "5.4.12-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index e555edb963..4a5632a606 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.11.Final + 5.4.12-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index cdee31d938..c029514953 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.11.Final + 5.4.12-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 04743243ba..43ec23ac0a 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.11.Final + 5.4.12-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 11584980ba..e6810dcca3 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.11.Final + 5.4.12-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 7de0006f01..c9b60a311b 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.11.Final + 5.4.12-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index a728fe7b47..dcb752f7ed 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.11.Final + 5.4.12-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 1a62e6f3c1..1e63c6f0b6 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.11.Final + 5.4.12-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index f81033f559..293d36ddc8 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.11.Final + 5.4.12-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index a236c6b72a..66161c080e 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.11.Final + 5.4.12-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 127d063cd0..dfef1e4af9 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.11.Final + 5.4.12-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 87b57a2f23..8dc0e01c69 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.11.Final + 5.4.12-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index a533b16225..7d4b30c5d6 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.11.Final + 5.4.12-SNAPSHOT hibernate-tools-tests-utils From 6c90813c6c37f3b237a281a70f9e89e8e9f2c1dc Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 13 Feb 2020 10:32:08 +0100 Subject: [PATCH 136/560] HBX-1981: Remove from pom.xml as JBoss Logging is not used anymore Signed-off-by: Koen Aers --- pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/pom.xml b/pom.xml index c029514953..aeda1b4fa3 100644 --- a/pom.xml +++ b/pom.xml @@ -36,7 +36,6 @@ 7.0 2.2 1.2.0 - 3.4.1.Final 4.12 6.0.6 19.3.0.0 From 7fc08d10f0465419247969d4320650d75b04c55c Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 19 Feb 2020 12:35:20 +0100 Subject: [PATCH 137/560] HBX-1986: Update hibernate core dependency to 5.4.12.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index aeda1b4fa3..2c36b6dc45 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ 2.3.29 1.4.199 5.1.0.Final - 5.4.11.Final + 5.4.12.Final 2.5.0 7.0 2.2 From 4efe418bfbadb1b20dfad5e232d34887eb7f7819 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 19 Feb 2020 16:41:20 +0100 Subject: [PATCH 138/560] HBX-1987: Update version identifier to 5.4.12.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 7aa033d697..7d0224b211 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.12-SNAPSHOT + 5.4.12.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 1f5a79f2fd..1f71374459 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.4.12-SNAPSHOT"; + public static final String VERSION = "5.4.12.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 4a5632a606..e49a2db36e 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.12-SNAPSHOT + 5.4.12.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 2c36b6dc45..64b552a8a6 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.12-SNAPSHOT + 5.4.12.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 43ec23ac0a..48e2785f93 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.12-SNAPSHOT + 5.4.12.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index e6810dcca3..3344508fec 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.12-SNAPSHOT + 5.4.12.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index c9b60a311b..22a92b4db6 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.12-SNAPSHOT + 5.4.12.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index dcb752f7ed..150a6636d5 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.12-SNAPSHOT + 5.4.12.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 1e63c6f0b6..5dc391185b 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.12-SNAPSHOT + 5.4.12.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 293d36ddc8..f2ef2180c6 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.12-SNAPSHOT + 5.4.12.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 66161c080e..91cfb04604 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.12-SNAPSHOT + 5.4.12.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index dfef1e4af9..298a218bfb 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.12-SNAPSHOT + 5.4.12.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 8dc0e01c69..5d97870d8b 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.12-SNAPSHOT + 5.4.12.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 7d4b30c5d6..e41ee9e2db 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.12-SNAPSHOT + 5.4.12.Final hibernate-tools-tests-utils From 812f73c4155898a1cfea5fbb8f08cccd770c5f68 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 20 Feb 2020 15:16:40 +0100 Subject: [PATCH 139/560] HBX-1988: Update version identifier to 5.4.13-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 7d0224b211..3661fc584e 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.12.Final + 5.4.13-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 1f71374459..d6d2b5ebac 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.4.12.Final"; + public static final String VERSION = "5.4.13-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index e49a2db36e..21b146b7ba 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.12.Final + 5.4.13-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 64b552a8a6..f898dc8aa4 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.hibernate hibernate-tools-parent - 5.4.12.Final + 5.4.13-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 48e2785f93..84ea0e3400 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.12.Final + 5.4.13-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 3344508fec..6e299a93b2 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.12.Final + 5.4.13-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 22a92b4db6..29d1b19d51 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.12.Final + 5.4.13-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 150a6636d5..332224c495 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.12.Final + 5.4.13-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 5dc391185b..5526588514 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.12.Final + 5.4.13-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index f2ef2180c6..d0d45e75c5 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.12.Final + 5.4.13-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 91cfb04604..f7a2245260 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.12.Final + 5.4.13-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 298a218bfb..d2064e480d 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.12.Final + 5.4.13-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 5d97870d8b..80b61fbbb6 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.12.Final + 5.4.13-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index e41ee9e2db..1948d4641d 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.12.Final + 5.4.13-SNAPSHOT hibernate-tools-tests-utils From bf395117b8a656ad6b49ba5155244967596041a4 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 28 Feb 2020 13:28:05 +0100 Subject: [PATCH 140/560] HBX-2001: Add copyright and license header where appropriate - Fix pom.xml Signed-off-by: Koen Aers --- pom.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pom.xml b/pom.xml index f898dc8aa4..57f8cd0283 100644 --- a/pom.xml +++ b/pom.xml @@ -1,3 +1,19 @@ + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! From 7e801b081755948c2697900891bb995a3b6be708 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 28 Feb 2020 13:32:37 +0100 Subject: [PATCH 142/560] HBX-2000: Create README.md files for the parent and child modules of the project - Add a 'dco.txt' file Signed-off-by: Koen Aers --- dco.txt | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 dco.txt diff --git a/dco.txt b/dco.txt new file mode 100644 index 0000000000..0cdce0c397 --- /dev/null +++ b/dco.txt @@ -0,0 +1,37 @@ +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. +1 Letterman Drive +Suite D4700 +San Francisco, CA, 94129 + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + + +Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. \ No newline at end of file From f262a353c89c3a97e1ce31cf6130602ef94526bf Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 28 Feb 2020 13:33:24 +0100 Subject: [PATCH 143/560] HBX-2000: Create README.md files for the parent and child modules of the project - Add a 'contribute.md' file Signed-off-by: Koen Aers --- contribute.md | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 contribute.md diff --git a/contribute.md b/contribute.md new file mode 100644 index 0000000000..3802c1ee94 --- /dev/null +++ b/contribute.md @@ -0,0 +1,65 @@ + + +# Contribution guide + +**Want to contribute? Great!** +We try to make it easy, and all contributions, even the smaller ones, are more than welcome. +This includes bug reports, fixes, documentation, examples... +But first, read this page (including the small print at the end). + +## Legal + +All original contributions to Hibernate Tools are licensed under the +[GNU Lesser General Public License (LGPL)](http://www.gnu.org/licenses/lgpl-2.1.html), +version 2.1 or later, or, if another license is specified as governing the file or directory being +modified, such other license. + +All contributions are subject to the [Developer Certificate of Origin (DCO)](https://developercertificate.org/). +The DCO text is also included verbatim in the [dco.txt](./dco.txt) file in the root directory of the repository. + +## Reporting an issue + +This project uses the [Hibernate Tools JIRA](https://hibernate.atlassian.net/projects/HBX/summary) to manage bugs and feature requests. Open an issue directly in JIRA. + +If you believe you found a bug, and it's likely possible, please indicate a way to reproduce it, what you are seeing and what you would expect to see. +Don't forget to indicate your Java and Hibernate versions. + +## Before you contribute + +To contribute, use GitHub Pull Requests, from your **own** fork. + +## Import the Projects + +The project is developed under the form of a hierarchical multimodule Maven project. +After cloning the git repository to your local machine you can import it as such into +your favorite IDE. + +## Work on a Topic Branch + +When you want to contribute code or documentation you first need to create a topic branch. It is common practice to give your branch a name that refers to the issue you are solving. E.g. if you want to fix the JIRA issue HBX-2000, name your topic branch 'HBX-2000' (`git checkout -b HBX-2000`). + +When the work is done or the issue is (partly) fixed, squash the commits into one. It is good practice to refer to the solved issue in the commit message. E.g. `git commit -m "HBX-2000: Create README.md files for the parent and child modules of the project - Add a 'contribute.md' file"`. + +Rebase your topic branch against the current master branch if necessary (`git rebase master`), push the branch to your own fork on GitHub (`git push HBX-2000`) and open a pull request (`https://github.com//quarkus-eclipse/pull/new/HBX-2000`). + +## The small print + +This project is an open source project, please act responsibly, be nice, polite and enjoy! \ No newline at end of file From 6a9cbc2254d221cd0cc459a4f69177f363b79e32 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 28 Feb 2020 13:58:41 +0100 Subject: [PATCH 144/560] HBX-2000: Create README.md files for the parent and child modules of the project - Initial README.md for the parent Signed-off-by: Koen Aers --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000000..786d9e90b5 --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ + + +[![Hibernate](https://static.jboss.org/hibernate/images/hibernate_200x150.png)](https://tools.hibernate.org) + +# Hibernate Tools - Tooling for your Hibernate Projects + +Working with Hibernate is very easy and developers enjoy using the APIs and the query language. Even creating mapping metadata is not an overly complex task once you've mastered the basics. Hibernate Tools makes working with Hibernate or JPA even more pleasant. + +## Project Contents + +Hibernate Tools is developed under the form of a hierarchical multi module Maven project. This parent module contains the following child modules: + +* **main**: +This module contains the base tools to reverse engineer Hibernate artifacts from an existing database as well as a number of Ant tasks that use these tools and can be used in Ant build script to generate Hibernate and JPA artifacts. +* **maven-plugin**: +This module uses the tools defined in the main module to create some Maven mojos that bring the reverse engineering power to your Maven build. +* **test**: +The test module is a multi module in itself that contains tests targeting different databases as well as no database tests. + +## Contributing + +If you run into errors, have ideas on how to improve the project or if you just want to collaborate, checkout the [contribution guide](./contribute.md). \ No newline at end of file From cad98974d596445086092c2cfe39ec87246a99b8 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 28 Feb 2020 14:05:22 +0100 Subject: [PATCH 145/560] HBX-2000: Create README.md files for the parent and child modules of the project - Remove obsolete readme.txt file Signed-off-by: Koen Aers --- readme.txt | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 readme.txt diff --git a/readme.txt b/readme.txt deleted file mode 100644 index 8865422fcf..0000000000 --- a/readme.txt +++ /dev/null @@ -1,5 +0,0 @@ -Development ------------ -The project is developed under the form of a hierarchical multimodule Maven project. -After cloning the git repository to your local machine you can import it as such into -your favorite IDE. From b2c849643ef0003064c876f28c0b25fa2d910155 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 2 Mar 2020 14:18:02 +0100 Subject: [PATCH 146/560] HBX-2000: Create README.md files for the parent and child modules of the project - Create hyperlinks in parent README file Signed-off-by: Koen Aers --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 786d9e90b5..2682aaf9ce 100644 --- a/README.md +++ b/README.md @@ -28,11 +28,11 @@ Working with Hibernate is very easy and developers enjoy using the APIs and the Hibernate Tools is developed under the form of a hierarchical multi module Maven project. This parent module contains the following child modules: -* **main**: +* [**main:**](./main) This module contains the base tools to reverse engineer Hibernate artifacts from an existing database as well as a number of Ant tasks that use these tools and can be used in Ant build script to generate Hibernate and JPA artifacts. -* **maven-plugin**: +* [**hibernate-tools-maven**:](./maven-plugin) This module uses the tools defined in the main module to create some Maven mojos that bring the reverse engineering power to your Maven build. -* **test**: +* [**hibernate-tools-test**:](./test) The test module is a multi module in itself that contains tests targeting different databases as well as no database tests. ## Contributing From 678fb3ca2cff7ee2c32d3d37e210cd24c80d4ebc Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 2 Mar 2020 14:22:16 +0100 Subject: [PATCH 147/560] HBX-2000: Create README.md files for the parent and child modules of the project - Add a 5 minute tutorial for the Maven plugin Signed-off-by: Koen Aers --- maven-plugin/README.md | 187 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 187 insertions(+) create mode 100644 maven-plugin/README.md diff --git a/maven-plugin/README.md b/maven-plugin/README.md new file mode 100644 index 0000000000..25e497488d --- /dev/null +++ b/maven-plugin/README.md @@ -0,0 +1,187 @@ + + +[![Hibernate](https://static.jboss.org/hibernate/images/hibernate_200x150.png)](https://tools.hibernate.org) + +# Hibernate Tools Maven Plugin + +This [Maven](http://maven.apache.org/) plugin brings the power of the [Hibernate Tools API](../orm) to your Maven build. + +## 5 Minute Tutorial + +The best way to get to know the Hibernate Tools Maven plugin is to start to use it. Hence we will provide a quick tutorial that gives you the first taste of it. In this example we will create a simple database containing one table and use the plugin to reverse engineer a JPA entity from it. + +### Create a Maven Project + +Use a command line tool or your preferred IDE to create a basic Maven project. + +``` + + + 4.0.0 + + org.acme + bar + 0.0.1-SNAPSHOT + + ... + + +``` + +### Create a Simple Database + +We will use the [H2 database engine](https://www.h2database.com/html/main.html) and the [SQL Maven plugin](https://www.mojohaus.org/sql-maven-plugin/) to create a simple database. +Modify your pom file to contain a build section as shown below. + +``` + + + ... + + + 1.4.200 + 1.5 + ... + + + + + + org.codehaus.mojo + sql-maven-plugin + ${sql.version} + + + com.h2database + h2 + ${h2.version} + + + + + create-database + initialize + + execute + + + org.h2.Driver + jdbc:h2:${project.build.directory}/database/bardb + sa + + true + create table foo (id int not null primary key, baz varchar(256)) + + + + + + ... + + + + + +``` + +Issuing `mvn clean initialize` on the command line in the root of your project will now create the 'bardb' database in the folder 'target/database'. We are now ready to reverse engineer the database table to an entity class. + +### Generate entities + +To properly generate our entity, we need to do two more things. The first is of course add a new plugin section to the pom file that configures the use of the Hibernate Tools Maven plugin. + +``` + + + ... + + + ... + 5.4.13-SNAPSHOT + + + + + + ... + + + org.hibernate + hibernate-tools-maven-plugin + ${hibernate.version} + + + org.hibernate + hibernate-tools + ${hibernate.version} + + + com.h2database + h2 + ${h2.version} + + + + + entity-generation + generate-sources + + hbm2java + + + true + + + + + + + + +``` + +In principle, we are now ready to generate the entity, but issuing `mvn clean generate-sources` will result in an error, complaining about the fact that a 'hiberate.properties' file could not be found. +By default the plugin looks in the folder 'src/main/hibernate' for this file. So it is for now sufficient to add a 'hibernate.properties' file in that location with the contents specified below. + +``` +hibernate.dialect=H2 +hibernate.connection.driver_class=org.h2.Driver +hibernate.connection.url=jdbc:h2:./target/database/bardb +hibernate.connection.username=sa +hibernate.connection.password= +``` + +Now we are ready. Executing `mvn clean generate-sources` will create a 'Foo.java' entity in the default location, which is 'target/generated-sources'. + + + + + + From 615004e26848db2267fc3459767cfc10dc3e432e Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 3 Mar 2020 10:58:17 +0100 Subject: [PATCH 148/560] HBX-2000: Create README.md files for the parent and child modules of the project - Delete unneeded file 'maven-plugin/lgpl.txt' Signed-off-by: Koen Aers --- maven-plugin/lgpl.txt | 504 ------------------------------------------ 1 file changed, 504 deletions(-) delete mode 100644 maven-plugin/lgpl.txt diff --git a/maven-plugin/lgpl.txt b/maven-plugin/lgpl.txt deleted file mode 100644 index 1c03f74b99..0000000000 --- a/maven-plugin/lgpl.txt +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - From c57451fac5d77d3d810dcfe1815e50fc83e430d3 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 12 Mar 2020 11:16:04 +0100 Subject: [PATCH 149/560] HBX-2003: Update eclipse-jdt-core dependency to version 3.20.0 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 57f8cd0283..076ef866c4 100644 --- a/pom.xml +++ b/pom.xml @@ -43,7 +43,7 @@ 1.10.7 4.4 - 3.19.0 + 3.20.0 2.3.29 1.4.199 5.1.0.Final From 97c36851ba66f9172133ca237e9fd4c3bcc7c932 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 18 Mar 2020 20:39:06 +0100 Subject: [PATCH 150/560] HBX-2004: Update freemarker version to 2.3.30 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 076ef866c4..26b7abdbd7 100644 --- a/pom.xml +++ b/pom.xml @@ -44,7 +44,7 @@ 1.10.7 4.4 3.20.0 - 2.3.29 + 2.3.30 1.4.199 5.1.0.Final 5.4.12.Final From db803595a13200b8b9b0b6bfdcafb3c90546fc8c Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sun, 29 Mar 2020 15:06:48 +0200 Subject: [PATCH 151/560] HBX-2005: Update Hibernate core dependency to 5.3.13.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 26b7abdbd7..69fce96664 100644 --- a/pom.xml +++ b/pom.xml @@ -47,7 +47,7 @@ 2.3.30 1.4.199 5.1.0.Final - 5.4.12.Final + 5.4.13.Final 2.5.0 7.0 2.2 From 9bf25686d546e5086d90e3c15c34af49c42efc86 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 30 Mar 2020 17:27:31 +0200 Subject: [PATCH 152/560] HBX-2006: Update version identifier to 5.4.13.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 3661fc584e..38345c1380 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.13-SNAPSHOT + 5.4.13.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index d6d2b5ebac..64119da17e 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.4.13-SNAPSHOT"; + public static final String VERSION = "5.4.13.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 21b146b7ba..7bf69addfb 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.13-SNAPSHOT + 5.4.13.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 69fce96664..dad9c13930 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.4.13-SNAPSHOT + 5.4.13.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 84ea0e3400..3c9ea2e330 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.13-SNAPSHOT + 5.4.13.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 6e299a93b2..edceb3e809 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.13-SNAPSHOT + 5.4.13.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 29d1b19d51..c6587026df 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.13-SNAPSHOT + 5.4.13.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 332224c495..d0c62ba434 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.13-SNAPSHOT + 5.4.13.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 5526588514..954f77dc52 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.13-SNAPSHOT + 5.4.13.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index d0d45e75c5..f0b184d895 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.13-SNAPSHOT + 5.4.13.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index f7a2245260..76ba472f9a 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.13-SNAPSHOT + 5.4.13.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index d2064e480d..c9992d4889 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.13-SNAPSHOT + 5.4.13.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 80b61fbbb6..44936bca22 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.13-SNAPSHOT + 5.4.13.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 1948d4641d..4872dfad24 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.13-SNAPSHOT + 5.4.13.Final hibernate-tools-tests-utils From da1b7c43b572e086382d8c90efc941955461cd1f Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sat, 4 Apr 2020 17:58:39 +0200 Subject: [PATCH 153/560] HBX-2011: Update version identifier to 5.4.14-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 38345c1380..6a856ce8b3 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.13.Final + 5.4.14-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 64119da17e..0db8abde49 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.4.13.Final"; + public static final String VERSION = "5.4.14-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 7bf69addfb..1ae458421b 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.13.Final + 5.4.14-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index dad9c13930..4c2d67b193 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.4.13.Final + 5.4.14-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 3c9ea2e330..c86b13a8ca 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.13.Final + 5.4.14-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index edceb3e809..733e054a57 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.13.Final + 5.4.14-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index c6587026df..654bd4e22d 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.13.Final + 5.4.14-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index d0c62ba434..4bfab8bdbe 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.13.Final + 5.4.14-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 954f77dc52..c2e3fab293 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.13.Final + 5.4.14-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index f0b184d895..f0fb9647a4 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.13.Final + 5.4.14-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 76ba472f9a..47bdf638f1 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.13.Final + 5.4.14-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index c9992d4889..5987ed90d7 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.13.Final + 5.4.14-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 44936bca22..9b60ef6f31 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.13.Final + 5.4.14-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 4872dfad24..6f418e398e 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.13.Final + 5.4.14-SNAPSHOT hibernate-tools-tests-utils From 239ede9d596006ea31b5e700072e3b259c6f8ade Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 10 Apr 2020 14:42:31 +0200 Subject: [PATCH 154/560] HBX-2012: Update eclipse-jdt-core dependency to version 3.21.0 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4c2d67b193..104cfdf413 100644 --- a/pom.xml +++ b/pom.xml @@ -43,7 +43,7 @@ 1.10.7 4.4 - 3.20.0 + 3.21.0 2.3.30 1.4.199 5.1.0.Final From 5a4c2e425b2985e60f3eec07236c380b0bdeaea0 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 13 Apr 2020 11:41:20 +0200 Subject: [PATCH 155/560] HBX-2013: Update Hibernate core dependency to 5.4.14.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 104cfdf413..298afb3dbf 100644 --- a/pom.xml +++ b/pom.xml @@ -47,7 +47,7 @@ 2.3.30 1.4.199 5.1.0.Final - 5.4.13.Final + 5.4.14.Final 2.5.0 7.0 2.2 From b27fd104ee2b9da58aea74665628b47861c9ea5b Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 14 Apr 2020 12:25:50 +0200 Subject: [PATCH 156/560] HBX-2016: Update version identifier to 5.4.14.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 6a856ce8b3..fb2929ba13 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.14-SNAPSHOT + 5.4.14.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 0db8abde49..493cb8e0c3 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.4.14-SNAPSHOT"; + public static final String VERSION = "5.4.14.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 1ae458421b..47cde8f28a 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.14-SNAPSHOT + 5.4.14.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 298afb3dbf..e018e7ae86 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.4.14-SNAPSHOT + 5.4.14.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index c86b13a8ca..c7f3c83c4f 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.14-SNAPSHOT + 5.4.14.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 733e054a57..870c03ffab 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.14-SNAPSHOT + 5.4.14.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 654bd4e22d..cf875532a2 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.14-SNAPSHOT + 5.4.14.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 4bfab8bdbe..a5037b2772 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.14-SNAPSHOT + 5.4.14.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index c2e3fab293..2d1db53698 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.14-SNAPSHOT + 5.4.14.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index f0fb9647a4..6712e9cf0c 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.14-SNAPSHOT + 5.4.14.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 47bdf638f1..b49c7a3fd1 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.14-SNAPSHOT + 5.4.14.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 5987ed90d7..e20cdfe0ac 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.14-SNAPSHOT + 5.4.14.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 9b60ef6f31..b75ed0ef3d 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.14-SNAPSHOT + 5.4.14.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 6f418e398e..b10f63198d 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.14-SNAPSHOT + 5.4.14.Final hibernate-tools-tests-utils From 48ee924fae1c589c510b49362cb607ef2eeba198 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 15 Apr 2020 15:26:14 +0200 Subject: [PATCH 157/560] HBX-2017: Update version identifier to 5.4.15-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index fb2929ba13..1d2eef6c48 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.14.Final + 5.4.15-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 493cb8e0c3..8172d75d92 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.4.14.Final"; + public static final String VERSION = "5.4.15-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 47cde8f28a..dfb76e3967 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.14.Final + 5.4.15-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index e018e7ae86..28743e19e7 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.4.14.Final + 5.4.15-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index c7f3c83c4f..07c674d1a1 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.14.Final + 5.4.15-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 870c03ffab..3fd5149e17 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.14.Final + 5.4.15-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index cf875532a2..50eb90284f 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.14.Final + 5.4.15-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index a5037b2772..a97696522b 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.14.Final + 5.4.15-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 2d1db53698..83bbfd9893 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.14.Final + 5.4.15-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 6712e9cf0c..a2771fbc2d 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.14.Final + 5.4.15-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index b49c7a3fd1..671fd7f905 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.14.Final + 5.4.15-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index e20cdfe0ac..ec69d91731 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.14.Final + 5.4.15-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index b75ed0ef3d..11e06d12e6 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.14.Final + 5.4.15-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index b10f63198d..0bb21ab4d3 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.14.Final + 5.4.15-SNAPSHOT hibernate-tools-tests-utils From 52eceafdfa56852201b306a7f0c6c72e1d5de0c5 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 17 Apr 2020 18:46:32 +0200 Subject: [PATCH 158/560] HBX-1888: Update H2 version to 1.4.200 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 28743e19e7..07868e2e45 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 4.4 3.21.0 2.3.30 - 1.4.199 + 1.4.200 5.1.0.Final 5.4.14.Final 2.5.0 From e15ab76b3e24616474e6ea615639c9b892f03f10 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 4 May 2020 17:44:30 +0200 Subject: [PATCH 159/560] HBX-2019: Update Hibernate core dependency to 5.4.15.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 07868e2e45..39949a3fd1 100644 --- a/pom.xml +++ b/pom.xml @@ -47,7 +47,7 @@ 2.3.30 1.4.200 5.1.0.Final - 5.4.14.Final + 5.4.15.Final 2.5.0 7.0 2.2 From b77d68ababa68b463285c7e66606dd1bfa811c89 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 4 May 2020 18:00:03 +0200 Subject: [PATCH 160/560] HBX-2020: Update version identifier to 5.4.15.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 1d2eef6c48..ad65095541 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.15-SNAPSHOT + 5.4.15.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 8172d75d92..21e5a658e8 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.4.15-SNAPSHOT"; + public static final String VERSION = "5.4.15.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index dfb76e3967..ea2b76a2ea 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.15-SNAPSHOT + 5.4.15.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 39949a3fd1..1797d2e329 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.4.15-SNAPSHOT + 5.4.15.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 07c674d1a1..ee61ff4b79 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.15-SNAPSHOT + 5.4.15.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 3fd5149e17..cf266ccd85 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.15-SNAPSHOT + 5.4.15.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 50eb90284f..d0e7f0244e 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.15-SNAPSHOT + 5.4.15.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index a97696522b..288bef8ae4 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.15-SNAPSHOT + 5.4.15.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 83bbfd9893..68cfe2ab99 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.15-SNAPSHOT + 5.4.15.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index a2771fbc2d..a280268dd0 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.15-SNAPSHOT + 5.4.15.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 671fd7f905..6fdfb6c6cf 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.15-SNAPSHOT + 5.4.15.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index ec69d91731..68d81ef7b4 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.15-SNAPSHOT + 5.4.15.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 11e06d12e6..ed5af98b09 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.15-SNAPSHOT + 5.4.15.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 0bb21ab4d3..bff7bb6b07 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.15-SNAPSHOT + 5.4.15.Final hibernate-tools-tests-utils From 2cbb9987673cd702750ab3e46dfd3d7a18c1b962 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 4 May 2020 18:27:46 +0200 Subject: [PATCH 161/560] HBX-2021: Update version identifier to 5.4.16-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index ad65095541..5629c14471 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.15.Final + 5.4.16-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 21e5a658e8..1c0a00c54b 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.4.15.Final"; + public static final String VERSION = "5.4.16-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index ea2b76a2ea..149e5467bc 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.15.Final + 5.4.16-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 1797d2e329..c30e468fe0 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.4.15.Final + 5.4.16-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index ee61ff4b79..fcdfffab22 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.15.Final + 5.4.16-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index cf266ccd85..88c7c6141c 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.15.Final + 5.4.16-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index d0e7f0244e..07e3273a7c 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.15.Final + 5.4.16-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 288bef8ae4..c4dd518a31 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.15.Final + 5.4.16-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 68cfe2ab99..a880979e72 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.15.Final + 5.4.16-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index a280268dd0..abd45b6551 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.15.Final + 5.4.16-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 6fdfb6c6cf..a9f5f5c686 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.15.Final + 5.4.16-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 68d81ef7b4..769f9eaaab 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.15.Final + 5.4.16-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index ed5af98b09..3d15ab995e 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.15.Final + 5.4.16-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index bff7bb6b07..e7af0db430 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.15.Final + 5.4.16-SNAPSHOT hibernate-tools-tests-utils From 5227485e27c0bdeeb6f52fd3fc60fcd21f6f8a91 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 18 May 2020 09:58:38 +0200 Subject: [PATCH 162/560] HBX-2027: Update Ant version to 1.10.8 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c30e468fe0..269f83d637 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,7 @@ - 1.10.7 + 1.10.8 4.4 3.21.0 2.3.30 From 31d85d28c0f5f8f7cf0634456a2c3139aea221d3 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 20 May 2020 14:56:30 +0200 Subject: [PATCH 163/560] HBX-2028: Update Hibernate Core dependency to version 5.4.16.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 269f83d637..7304bb4c14 100644 --- a/pom.xml +++ b/pom.xml @@ -47,7 +47,7 @@ 2.3.30 1.4.200 5.1.0.Final - 5.4.15.Final + 5.4.16.Final 2.5.0 7.0 2.2 From cf45c4098dbba3acc2c678d683c54c6d6501cf02 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 20 May 2020 15:15:45 +0200 Subject: [PATCH 164/560] HBX-2029: Update version identifier to 5.4.16.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 5629c14471..b47813f72a 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.16-SNAPSHOT + 5.4.16.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 1c0a00c54b..96822e71ab 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.4.16-SNAPSHOT"; + public static final String VERSION = "5.4.16.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 149e5467bc..daa0525e49 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.16-SNAPSHOT + 5.4.16.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 7304bb4c14..8f331adff8 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.4.16-SNAPSHOT + 5.4.16.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index fcdfffab22..ad8b22076c 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.16-SNAPSHOT + 5.4.16.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 88c7c6141c..df73b2a971 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.16-SNAPSHOT + 5.4.16.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 07e3273a7c..1914f13586 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.16-SNAPSHOT + 5.4.16.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index c4dd518a31..364373238e 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.16-SNAPSHOT + 5.4.16.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index a880979e72..39672b3b3a 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.16-SNAPSHOT + 5.4.16.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index abd45b6551..7b47dafcdf 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.16-SNAPSHOT + 5.4.16.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index a9f5f5c686..a26972f878 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.16-SNAPSHOT + 5.4.16.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 769f9eaaab..4c9627869e 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.16-SNAPSHOT + 5.4.16.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 3d15ab995e..009cb2c88f 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.16-SNAPSHOT + 5.4.16.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index e7af0db430..225e91cbb9 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.16-SNAPSHOT + 5.4.16.Final hibernate-tools-tests-utils From f3d19ade16c4b3b852683a9fdce2c31885ffb2f7 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 20 May 2020 15:48:03 +0200 Subject: [PATCH 165/560] HBX-2030: Update version identifier to 5.4.17-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index b47813f72a..97d31a2320 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.16.Final + 5.4.17-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 96822e71ab..2e519b6018 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.4.16.Final"; + public static final String VERSION = "5.4.17-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index daa0525e49..df40fa22e4 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.16.Final + 5.4.17-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 8f331adff8..1b47b7cd31 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.4.16.Final + 5.4.17-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index ad8b22076c..04121ceea6 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.16.Final + 5.4.17-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index df73b2a971..ef134ac570 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.16.Final + 5.4.17-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 1914f13586..485da6fed1 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.16.Final + 5.4.17-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 364373238e..9de6a4cf69 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.16.Final + 5.4.17-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 39672b3b3a..7c5aca7cd4 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.16.Final + 5.4.17-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 7b47dafcdf..b0a1457ca9 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.16.Final + 5.4.17-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index a26972f878..2afbcae22b 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.16.Final + 5.4.17-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 4c9627869e..acc864bb5e 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.16.Final + 5.4.17-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 009cb2c88f..80ae82c136 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.16.Final + 5.4.17-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 225e91cbb9..d011d4809d 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.16.Final + 5.4.17-SNAPSHOT hibernate-tools-tests-utils From abd1b64fa011ad5b6dd6561836379e37e3c08100 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 21 May 2020 10:12:09 +0200 Subject: [PATCH 166/560] HBX-2031: Update dependency on javaee-api to version 8.0.1 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1b47b7cd31..e0c48f2475 100644 --- a/pom.xml +++ b/pom.xml @@ -49,7 +49,7 @@ 5.1.0.Final 5.4.16.Final 2.5.0 - 7.0 + 8.0.1 2.2 1.2.0 4.12 From 9c07caf62d1ef0e5c939c8179c406cc0a9c7caa7 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 25 May 2020 16:29:52 +0200 Subject: [PATCH 167/560] HBX-2032: Update JUnit version to 4.13 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e0c48f2475..10d87ccb2c 100644 --- a/pom.xml +++ b/pom.xml @@ -52,7 +52,7 @@ 8.0.1 2.2 1.2.0 - 4.12 + 4.13 6.0.6 19.3.0.0 6.1.7.jre8-preview From 1a2b8163e8946c6cb9925c14425eda8a48122ecd Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 4 Jun 2020 09:08:49 +0200 Subject: [PATCH 168/560] HBX-2038: Update Hibernate Core dependency to version 5.4.17.Final Signed-off-by: Koen Aers --- pom.xml | 148 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/pom.xml b/pom.xml index 10d87ccb2c..50bee60353 100644 --- a/pom.xml +++ b/pom.xml @@ -41,16 +41,16 @@ - 1.10.8 - 4.4 - 3.21.0 - 2.3.30 + 1.10.8 + 4.4 + 3.21.0 + 2.3.30 1.4.200 - 5.1.0.Final - 5.4.16.Final + 5.1.0.Final + 5.4.17.Final 2.5.0 8.0.1 - 2.2 + 2.2 1.2.0 4.13 6.0.6 @@ -66,98 +66,98 @@ ${h2.version} test - - com.microsoft.sqlserver - mssql-jdbc - ${sqlserver.version} - test - - - com.oracle.ojdbc - ojdbc8 - ${oracle.version} - test - - - org.apache.commons - commons-collections4 - ${commons-collections.version} - - - javax - javaee-api - ${javaee-api.version} - test - - - javax.persistence - javax.persistence-api - ${javax.persistence-api.version} - - + + com.microsoft.sqlserver + mssql-jdbc + ${sqlserver.version} + test + + + com.oracle.ojdbc + ojdbc8 + ${oracle.version} + test + + + org.apache.commons + commons-collections4 + ${commons-collections.version} + + + javax + javaee-api + ${javaee-api.version} + test + + + javax.persistence + javax.persistence-api + ${javax.persistence-api.version} + + jaxen jaxen ${jaxen.version} runtime - - + + junit junit ${junit.version} - - mysql - mysql-connector-java - ${mysql.version} - test - - - org.apache.ant - ant - ${ant.version} - + + mysql + mysql-connector-java + ${mysql.version} + test + + + org.apache.ant + ant + ${ant.version} + org.eclipse.jdt org.eclipse.jdt.core ${eclipse-jdt-core.version} - - org.freemarker - freemarker - ${freemarker.version} - + + org.freemarker + freemarker + ${freemarker.version} + org.hibernate hibernate-core ${hibernate-core.version} - - org.hibernate - hibernate-tools - ${project.version} - - - org.hibernate - hibernate-tools-tests-common - ${project.version} - - + + org.hibernate + hibernate-tools + ${project.version} + + + org.hibernate + hibernate-tools-tests-common + ${project.version} + + org.hibernate - hibernate-tools-tests-utils - ${project.version} - - - org.hibernate.common - hibernate-commons-annotations - ${hibernate-commons-annotations.version} - + hibernate-tools-tests-utils + ${project.version} + + + org.hibernate.common + hibernate-commons-annotations + ${hibernate-commons-annotations.version} + org.hsqldb hsqldb ${hsqldb.version} test - + From d78e28647a09f16127e667c0996bed356f2e0ff8 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 4 Jun 2020 09:28:23 +0200 Subject: [PATCH 169/560] HBX-2039: Update version identifier to 5.4.17.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 97d31a2320..8f7a557957 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.17-SNAPSHOT + 5.4.17.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 2e519b6018..1c7df81a73 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.4.17-SNAPSHOT"; + public static final String VERSION = "5.4.17.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index df40fa22e4..3d087c98f4 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.17-SNAPSHOT + 5.4.17.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 50bee60353..6b182a92f9 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.4.17-SNAPSHOT + 5.4.17.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 04121ceea6..840b5769f9 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.17-SNAPSHOT + 5.4.17.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index ef134ac570..a6fec8ca1e 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.17-SNAPSHOT + 5.4.17.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 485da6fed1..19cc5ef228 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.17-SNAPSHOT + 5.4.17.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 9de6a4cf69..e4096b8090 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.17-SNAPSHOT + 5.4.17.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 7c5aca7cd4..f770efca0b 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.17-SNAPSHOT + 5.4.17.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index b0a1457ca9..3c3d4e9640 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.17-SNAPSHOT + 5.4.17.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 2afbcae22b..3e1af2a7af 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.17-SNAPSHOT + 5.4.17.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index acc864bb5e..4a8148f285 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.17-SNAPSHOT + 5.4.17.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 80ae82c136..1470333ab1 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.17-SNAPSHOT + 5.4.17.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index d011d4809d..ac854ad690 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.17-SNAPSHOT + 5.4.17.Final hibernate-tools-tests-utils From b9b7060d34a6dd15876b7cde00f82de2c265b836 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 4 Jun 2020 09:50:00 +0200 Subject: [PATCH 170/560] HBX-2040: Update version identifier to 5.4.18-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 8f7a557957..dabbd5ae7d 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.17.Final + 5.4.18-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 1c7df81a73..67d85d747a 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.4.17.Final"; + public static final String VERSION = "5.4.18-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 3d087c98f4..cd1bee4088 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.17.Final + 5.4.18-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 6b182a92f9..74734a17a3 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.4.17.Final + 5.4.18-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 840b5769f9..ef110bc16e 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.17.Final + 5.4.18-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index a6fec8ca1e..91de704ff8 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.17.Final + 5.4.18-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 19cc5ef228..5ed117dbf5 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.17.Final + 5.4.18-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index e4096b8090..2f151792b5 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.17.Final + 5.4.18-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index f770efca0b..ab454bc150 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.17.Final + 5.4.18-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 3c3d4e9640..ed6bcefa33 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.17.Final + 5.4.18-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 3e1af2a7af..6dcc5736d1 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.17.Final + 5.4.18-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 4a8148f285..ce8c043ba1 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.17.Final + 5.4.18-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 1470333ab1..0dcb06e74b 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.17.Final + 5.4.18-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index ac854ad690..117efadfe5 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.17.Final + 5.4.18-SNAPSHOT hibernate-tools-tests-utils From 0b20c990092f1d10980b51a7dbaf704b73c4b935 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 10 Jun 2020 11:27:42 +0200 Subject: [PATCH 171/560] HBX-2043: Set up 5.5 branch Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index dabbd5ae7d..6250500bb8 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.4.18-SNAPSHOT + 5.5.0-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 67d85d747a..81b9e0a511 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.4.18-SNAPSHOT"; + public static final String VERSION = "5.5.0-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index cd1bee4088..0e5d9c3940 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.4.18-SNAPSHOT + 5.5.0-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 74734a17a3..901d09d106 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.4.18-SNAPSHOT + 5.5.0-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index ef110bc16e..417436d8e0 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.18-SNAPSHOT + 5.5.0-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 91de704ff8..7621dad435 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.18-SNAPSHOT + 5.5.0-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 5ed117dbf5..4c6198f962 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.18-SNAPSHOT + 5.5.0-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 2f151792b5..6c8a34d4fd 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.18-SNAPSHOT + 5.5.0-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index ab454bc150..c55244c4dc 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.18-SNAPSHOT + 5.5.0-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index ed6bcefa33..08586e1047 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.18-SNAPSHOT + 5.5.0-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 6dcc5736d1..464e81b483 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.18-SNAPSHOT + 5.5.0-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index ce8c043ba1..26a312312b 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.18-SNAPSHOT + 5.5.0-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 0dcb06e74b..2b34b6c534 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.4.18-SNAPSHOT + 5.5.0-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 117efadfe5..e52c156f69 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.4.18-SNAPSHOT + 5.5.0-SNAPSHOT hibernate-tools-tests-utils From e05849b2083f9ac1a9fc5432a29670f346356f4e Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 10 Jun 2020 11:46:46 +0200 Subject: [PATCH 172/560] HBX-2044: Update Hibernate ORM dependency to 5.5.0-SNAPSHOT Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 901d09d106..15ff40e846 100644 --- a/pom.xml +++ b/pom.xml @@ -47,7 +47,7 @@ 2.3.30 1.4.200 5.1.0.Final - 5.4.17.Final + 5.5.0-SNAPSHOT 2.5.0 8.0.1 2.2 From 81f9a2e4acadaed76b2f97e7d8c15d207008dac1 Mon Sep 17 00:00:00 2001 From: Emanuel Ciuca Date: Thu, 4 Jun 2020 22:10:53 +0300 Subject: [PATCH 173/560] HBX-1646: Fix sql statement case sensitive collation Signed-off-by: Koen Aers --- .../hibernate/cfg/reveng/dialect/SQLServerMetaDataDialect.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/src/main/java/org/hibernate/cfg/reveng/dialect/SQLServerMetaDataDialect.java b/main/src/main/java/org/hibernate/cfg/reveng/dialect/SQLServerMetaDataDialect.java index 0740b24c32..46ee0f08df 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/dialect/SQLServerMetaDataDialect.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/dialect/SQLServerMetaDataDialect.java @@ -26,7 +26,7 @@ public Iterator> getSuggestedPrimaryKeyStrategyName(String c sql = "SELECT a.TABLE_CATALOG, a.TABLE_SCHEMA, a.TABLE_NAME as table_name, c.DATA_TYPE as data_type, b.CONSTRAINT_TYPE, OBJECTPROPERTY(OBJECT_ID(a.TABLE_NAME),'TableHasIdentity') as hasIdentity " + "FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE a " + "INNER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS b on a.CONSTRAINT_NAME = b.CONSTRAINT_NAME " + - "INNER JOIN INFORMATION_SCHEMA.Columns c on a.TABLE_CATALOG = c.TABLE_CATALOG AND a.TABLE_SCHEMA = c.TABLE_SCHEMA AND a.TABLE_NAME = c.TABLE_NAME AND a.COLUMN_NAME = c.COLUMN_NAME " + + "INNER JOIN INFORMATION_SCHEMA.COLUMNS c on a.TABLE_CATALOG = c.TABLE_CATALOG AND a.TABLE_SCHEMA = c.TABLE_SCHEMA AND a.TABLE_NAME = c.TABLE_NAME AND a.COLUMN_NAME = c.COLUMN_NAME " + "WHERE a.TABLE_NAME='"+table+"' AND a.TABLE_SCHEMA='"+schema+"' AND a.TABLE_CATALOG='"+catalog+"' AND b.CONSTRAINT_TYPE = 'Primary key'"; PreparedStatement statement = getConnection().prepareStatement( sql ); From 7948d45594b13b2f87e0ccaa34d435e58c48cc21 Mon Sep 17 00:00:00 2001 From: Emanuel Ciuca Date: Fri, 5 Jun 2020 12:28:12 +0300 Subject: [PATCH 174/560] HBX-2041: Add GenerateDaoMojo (hbm2dao) to generate DAOs with the maven plugin Signed-off-by: Koen Aers --- .../org/hibernate/mvn/GenerateDaoMojo.java | 74 +++++ .../src/it/hbm2dao/invoker.properties | 2 + test/maven-plugin/src/it/hbm2dao/pom.xml | 52 ++++ .../src/main/hibernate/hibernate.properties | 7 + .../src/main/hibernate/hibernate.reveng.xml | 11 + .../main/resources/templates/dao/daohome.ftl | 253 ++++++++++++++++++ test/maven-plugin/src/it/hbm2dao/test.mv.db | Bin 0 -> 24576 bytes .../maven-plugin/src/it/hbm2dao/verify.groovy | 6 + 8 files changed, 405 insertions(+) create mode 100644 maven-plugin/src/main/java/org/hibernate/mvn/GenerateDaoMojo.java create mode 100644 test/maven-plugin/src/it/hbm2dao/invoker.properties create mode 100644 test/maven-plugin/src/it/hbm2dao/pom.xml create mode 100644 test/maven-plugin/src/it/hbm2dao/src/main/hibernate/hibernate.properties create mode 100644 test/maven-plugin/src/it/hbm2dao/src/main/hibernate/hibernate.reveng.xml create mode 100644 test/maven-plugin/src/it/hbm2dao/src/main/resources/templates/dao/daohome.ftl create mode 100644 test/maven-plugin/src/it/hbm2dao/test.mv.db create mode 100644 test/maven-plugin/src/it/hbm2dao/verify.groovy diff --git a/maven-plugin/src/main/java/org/hibernate/mvn/GenerateDaoMojo.java b/maven-plugin/src/main/java/org/hibernate/mvn/GenerateDaoMojo.java new file mode 100644 index 0000000000..3ac4f02f11 --- /dev/null +++ b/maven-plugin/src/main/java/org/hibernate/mvn/GenerateDaoMojo.java @@ -0,0 +1,74 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2016-2020 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.hibernate.tool.maven; + +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.hibernate.tool.api.export.Exporter; +import org.hibernate.tool.api.export.ExporterConstants; +import org.hibernate.tool.api.export.ExporterFactory; +import org.hibernate.tool.api.export.ExporterType; +import org.hibernate.tool.api.metadata.MetadataDescriptor; + +import java.io.File; + +import static org.apache.maven.plugins.annotations.LifecyclePhase.GENERATE_SOURCES; + +/** + * Mojo to generate Data Access Objects (DAOs) from an existing database. + *

+ * See: https://docs.jboss.org/tools/latest/en/hibernatetools/html_single/#d0e4821 + */ +@Mojo(name = "hbm2dao", defaultPhase = GENERATE_SOURCES) +public class GenerateDaoMojo extends AbstractGenerationMojo { + + /** The directory into which the DAOs will be generated. */ + @Parameter(defaultValue = "${project.build.directory}/generated-sources/") + private File outputDirectory; + + /** Code will contain EJB 3 features, e.g. using annotations from javax.persistence + * and org.hibernate.annotations. */ + @Parameter(defaultValue = "false") + private boolean ejb3; + + /** Code will contain JDK 5 constructs such as generics and static imports. */ + @Parameter(defaultValue = "false") + private boolean jdk5; + + /** A path used for looking up user-edited templates. */ + @Parameter + private String templatePath; + + protected void executeExporter(MetadataDescriptor metadataDescriptor) { + Exporter pojoExporter = ExporterFactory.createExporter(ExporterType.DAO); + pojoExporter.getProperties().put(ExporterConstants.METADATA_DESCRIPTOR, metadataDescriptor); + pojoExporter.getProperties().put(ExporterConstants.DESTINATION_FOLDER, outputDirectory); + if (templatePath != null) { + getLog().info("Setting template path to: " + templatePath); + pojoExporter.getProperties().put(ExporterConstants.TEMPLATE_PATH, new String[] {templatePath}); + } + pojoExporter.getProperties().setProperty("ejb3", String.valueOf(ejb3)); + pojoExporter.getProperties().setProperty("jdk5", String.valueOf(jdk5)); + getLog().info("Starting DAO export to directory: " + outputDirectory + "..."); + pojoExporter.start(); + } + + +} diff --git a/test/maven-plugin/src/it/hbm2dao/invoker.properties b/test/maven-plugin/src/it/hbm2dao/invoker.properties new file mode 100644 index 0000000000..4537ab14c4 --- /dev/null +++ b/test/maven-plugin/src/it/hbm2dao/invoker.properties @@ -0,0 +1,2 @@ +invoker.java.version = 1.8+ +invoker.goals = generate-sources \ No newline at end of file diff --git a/test/maven-plugin/src/it/hbm2dao/pom.xml b/test/maven-plugin/src/it/hbm2dao/pom.xml new file mode 100644 index 0000000000..ca72011970 --- /dev/null +++ b/test/maven-plugin/src/it/hbm2dao/pom.xml @@ -0,0 +1,52 @@ + + + 4.0.0 + + org.hibernate.tool.test + hbm2dao + 0.0.1-SNAPSHOT + + + UTF-8 + UTF-8 + + 1.8 + 1.4.195 + + + + + + org.hibernate.tool + hibernate-tools-maven + @project.version@ + + + DAO generation + generate-sources + + hbm2dao + + + ${project.basedir}/src/main/resources/templates/ + + + + + ${project.basedir}/src/main/hibernate/hibernate.reveng.xml + + + + + com.h2database + h2 + ${h2.version} + + + + + + + diff --git a/test/maven-plugin/src/it/hbm2dao/src/main/hibernate/hibernate.properties b/test/maven-plugin/src/it/hbm2dao/src/main/hibernate/hibernate.properties new file mode 100644 index 0000000000..71496b3adc --- /dev/null +++ b/test/maven-plugin/src/it/hbm2dao/src/main/hibernate/hibernate.properties @@ -0,0 +1,7 @@ +hibernate.dialect=org.hibernate.dialect.H2Dialect +hibernate.connection.driver_class=org.h2.Driver +hibernate.connection.url=jdbc:h2:./test;DB_CLOSE_ON_EXIT=FALSE +hibernate.connection.username=sa +hibernate.connection.password= +hibernate.connection.pool_size=1 +hibernate.show_sql=true \ No newline at end of file diff --git a/test/maven-plugin/src/it/hbm2dao/src/main/hibernate/hibernate.reveng.xml b/test/maven-plugin/src/it/hbm2dao/src/main/hibernate/hibernate.reveng.xml new file mode 100644 index 0000000000..7ac52fd2cf --- /dev/null +++ b/test/maven-plugin/src/it/hbm2dao/src/main/hibernate/hibernate.reveng.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/test/maven-plugin/src/it/hbm2dao/src/main/resources/templates/dao/daohome.ftl b/test/maven-plugin/src/it/hbm2dao/src/main/resources/templates/dao/daohome.ftl new file mode 100644 index 0000000000..7232452587 --- /dev/null +++ b/test/maven-plugin/src/it/hbm2dao/src/main/resources/templates/dao/daohome.ftl @@ -0,0 +1,253 @@ +${pojo.getPackageDeclaration()} +// Generated ${date} by Hibernate Tools ${version} + +<#assign classbody> +<#assign declarationName = pojo.importType(pojo.getDeclarationName())>/** + * Home object for domain model class ${declarationName}. + * @see ${pojo.getQualifiedDeclarationName()} + * @author Hibernate Tools + */ +<#if ejb3> +@${pojo.importType("javax.ejb.Stateless")} + +public class ${declarationName}Home { + + private static final ${pojo.importType("java.util.logging.Logger")} logger = ${pojo.importType("Logger")}.getLogger(${pojo.getDeclarationName()}Home.class.getName()); + +<#if ejb3> + @${pojo.importType("javax.persistence.PersistenceContext")} private ${pojo.importType("javax.persistence.EntityManager")} entityManager; + + public void persist(${declarationName} transientInstance) { + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "persisting ${declarationName} instance"); + try { + entityManager.persist(transientInstance); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "persist successful"); + } + catch (RuntimeException re) { + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "persist failed", re); + throw re; + } + } + + public void remove(${declarationName} persistentInstance) { + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "removing ${declarationName} instance"); + try { + entityManager.remove(persistentInstance); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "remove successful"); + } + catch (RuntimeException re) { + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "remove failed", re); + throw re; + } + } + + public ${declarationName} merge(${declarationName} detachedInstance) { + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "merging ${declarationName} instance"); + try { + ${declarationName} result = entityManager.merge(detachedInstance); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "merge successful"); + return result; + } + catch (RuntimeException re) { + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "merge failed", re); + throw re; + } + } + +<#if clazz.identifierProperty?has_content> + public ${declarationName} findById( ${pojo.getJavaTypeName(clazz.identifierProperty, jdk5)} id) { + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "getting ${declarationName} instance with id: " + id); + try { + ${declarationName} instance = entityManager.find(${pojo.getDeclarationName()}.class, id); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "get successful"); + return instance; + } + catch (RuntimeException re) { + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "get failed", re); + throw re; + } + } + +<#else> + private final ${pojo.importType("org.hibernate.SessionFactory")} sessionFactory = getSessionFactory(); + + protected ${pojo.importType("org.hibernate.SessionFactory")} getSessionFactory() { + try { + return (${pojo.importType("org.hibernate.SessionFactory")}) new ${pojo.importType("javax.naming.InitialContext")}().lookup("${sessionFactoryName}"); + } + catch (Exception e) { + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "Could not locate SessionFactory in JNDI", e); + throw new IllegalStateException("Could not locate SessionFactory in JNDI"); + } + } + + public void persist(${declarationName} transientInstance) { + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "persisting ${declarationName} instance"); + try { + sessionFactory.getCurrentSession().persist(transientInstance); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "persist successful"); + } + catch (RuntimeException re) { + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "persist failed", re); + throw re; + } + } + + public void attachDirty(${declarationName} instance) { + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "attaching dirty ${declarationName} instance"); + try { + sessionFactory.getCurrentSession().saveOrUpdate(instance); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "attach successful"); + } + catch (RuntimeException re) { + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "attach failed", re); + throw re; + } + } + + public void attachClean(${declarationName} instance) { + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "attaching clean ${declarationName} instance"); + try { + sessionFactory.getCurrentSession().lock(instance, ${pojo.importType("org.hibernate.LockMode")}.NONE); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "attach successful"); + } + catch (RuntimeException re) { + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "attach failed", re); + throw re; + } + } + + public void delete(${declarationName} persistentInstance) { + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "deleting ${declarationName} instance"); + try { + sessionFactory.getCurrentSession().delete(persistentInstance); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "delete successful"); + } + catch (RuntimeException re) { + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "delete failed", re); + throw re; + } + } + + public ${declarationName} merge(${declarationName} detachedInstance) { + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "merging ${declarationName} instance"); + try { + ${declarationName} result = (${declarationName}) sessionFactory.getCurrentSession() + .merge(detachedInstance); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "merge successful"); + return result; + } + catch (RuntimeException re) { + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "merge failed", re); + throw re; + } + } + +<#if clazz.identifierProperty?has_content> + public ${declarationName} findById( ${c2j.getJavaTypeName(clazz.identifierProperty, jdk5)} id) { + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "getting ${declarationName} instance with id: " + id); + try { + ${declarationName} instance = (${declarationName}) sessionFactory.getCurrentSession() + .get("${clazz.entityName}", id); + if (instance==null) { + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "get successful, no instance found"); + } + else { + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "get successful, instance found"); + } + return instance; + } + catch (RuntimeException re) { + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "get failed", re); + throw re; + } + } + + +<#if clazz.hasNaturalId()> + public ${declarationName} findByNaturalId(${c2j.asNaturalIdParameterList(clazz)}) { + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "getting ${declarationName} instance by natural id"); + try { + ${declarationName} instance = (${declarationName}) sessionFactory.getCurrentSession() + .createCriteria("${clazz.entityName}") +<#if jdk5> + .add( ${pojo.staticImport("org.hibernate.criterion.Restrictions", "naturalId")}() +<#else> + .add( ${pojo.importType("org.hibernate.criterion.Restrictions")}.naturalId() + +<#foreach property in pojo.getAllPropertiesIterator()> +<#if property.isNaturalIdentifier()> + .set("${property.name}", ${property.name}) + + + ) + .uniqueResult(); + if (instance==null) { + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "get successful, no instance found"); + } + else { + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "get successful, instance found"); + } + return instance; + } + catch (RuntimeException re) { + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "query failed", re); + throw re; + } + } + +<#if jdk5> + public ${pojo.importType("java.util.List")}<${declarationName}> findByExample(${declarationName} instance) { +<#else> + public ${pojo.importType("java.util.List")} findByExample(${declarationName} instance) { + + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "finding ${declarationName} instance by example"); + try { +<#if jdk5> + ${pojo.importType("java.util.List")}<${declarationName}> results = (List<${declarationName}>) sessionFactory.getCurrentSession() +<#else> + ${pojo.importType("java.util.List")} results = sessionFactory.getCurrentSession() + + .createCriteria("${clazz.entityName}") +<#if jdk5> + .add( ${pojo.staticImport("org.hibernate.criterion.Example", "create")}(instance) ) +<#else> + .add(${pojo.importType("org.hibernate.criterion.Example")}.create(instance)) + + .list(); + logger.log(${pojo.importType("java.util.logging.Level")}.INFO, "find by example successful, result size: " + results.size()); + return results; + } + catch (RuntimeException re) { + logger.log(${pojo.importType("java.util.logging.Level")}.SEVERE, "find by example failed", re); + throw re; + } + } +<#foreach query in md.namedQueryDefinitions> +<#assign queryName = query.name> +<#if queryName.startsWith(clazz.entityName + ".")> +<#assign methname = c2j.unqualify(queryName)> +<#if jdk5 && methname.startsWith("find")> + public ${pojo.importType("java.util.List")}<${declarationName}> ${methname}(${argList}) { +<#elseif methname.startsWith("count")> + public int ${methname}(${argList}) { +<#else> + public ${pojo.importType("java.util.List")} ${methname}(${argList}) { + + ${pojo.importType("org.hibernate.Query")} query = sessionFactory.getCurrentSession() + .getNamedQuery("${queryName}"); +<#if jdk5 && methname.startsWith("find")> + return (List<${declarationName}>) query.list(); +<#elseif methname.startsWith("count")> + return ( (Integer) query.uniqueResult() ).intValue(); +<#else> + return query.list(); + + } + + +} + + +${pojo.generateImports()} +${classbody} diff --git a/test/maven-plugin/src/it/hbm2dao/test.mv.db b/test/maven-plugin/src/it/hbm2dao/test.mv.db new file mode 100644 index 0000000000000000000000000000000000000000..aba76d3403bc1e1b54e2526be9b9bc7c2f09288c GIT binary patch literal 24576 zcmeI4TW=dh6vua+m^5xvWK{?rK$^57DUxMocD)x{MZ&SSvW4wLwo|oF(d?~_n%Gg| zL=jIFLOjAZ;7jnr3y4pEc;c<%fk(twK+Mk0thc_Dw2n%o9xK|}oxPkhKkwN2pL5oY zidJwBhTc=z_V&LFDgoj!@QwpI3j7K&F%HURnP^5K93CIiQH2!Fg5#6@ z;UGFLJP1bKli;{QZI6f00e*l5C8%|00>+zfh5Tu=N`84AZ9MEbeN^i@)xNX0wcBjf5h)w_<=g1?+E;4ak9K=b7d7vr&UPO;51YMy z5A~|-uhmDJB-BhD2W}7q)U`soi5k^j18v$iF?@_|;=5tlBiQh0Kv-AFEg7uj!K9%^ ztxzL`65H0Xsk?TmY`L}@>b`H;?k1|%+s#gXc>|%f@1!TSYOUeaQNOy?a?sB1R;yVn z?l|4vcIR#`qSLISW~a{`?d-N%1>V`IwjK1K+O0LJ-MD9~+3h##Y{)2D#C@%5ufJE@ zzJK3wP`}xBdi`p9C*D!bjFPuk-Q*qZG z>)Nx?b|>kNoo&|HB{tE=YmXU326x7Q*!b(Hw%zIVyVYn+VzlEPcHNZWyX=x|>~-g% zJW}k8U10b5M&|iSR>^19Nj`I1%V+LnbNS3hb~T^bWH*C+t!JJos;Vd-e6A=zc6h7a z`gY}JmfgfflifszOMfdX$~Atg7mZM?n3x|x_)_Cboi9s#X|Ph3sQ$$WMSYB3h^NNE z{#npw69X5bwH-buaC*W7V#1UrCXD4xOc)Xp&C<(mGGUDHOw30tjFu*h5<6`+Jx@!n zFl!03x}2xnD%LDHPq|scDlRgMBM|Pr0dZgeG5Fd`bEF#r=UFoELGt!OpMK5#<*srY;t( zvx{-3iZh)m3P0lO#2aS3A>4f@`j9GWaihnL#gC{6vmf#?2!}+C(*se=L_Xp>#f2w! zYQAczrdm=Bm8iN(RZYb=#&;kJ<00e*l5C8%|00;m9Mqo;R&#I^Q zENql9wHHy-v(L@V5jiRSzlfZfZS;b@vHt%I^nb+bE!F>jUP%A{%=Q2KzcBs3qbRIZ z^_$nm`v0$`UFBM$|2-K9@a0Ot73zNm0z9F~jR{SjR^&4S0p?^NAXen#$Qe`Q#L#Iu zQRIdv0s)3EjG7ZhUn3A;#R0n)0s+J@Tx)FBmqCv}nAIlC&KoO{(Fa|ORTI$%%jSc9 z(WvKosh~%2snLgLZ)NmB#FpadgV=!R1N?^p1b_e#00KY&2mpaANMK5TOa0ICj>+@% zp>7bbFjpDE*tx!y4W<(u+4D`{w%LCp6xG z4xH;nAT{v347{eN<*0U9Irz(zqnW!PM^kc?6&Xaa4$%MflB*9u|6jrHc5n#@00AHX z1b_e#00OfJi2VOpe@p$(BzdC$Jrmn@NXye2dC?xJ|K*PW%G~A*{V%haNnP<|W{=nZ z+pd|U6HRR)_hSA3N38#!3H{I7A5yv9%)6Q2Qn}r6ZMQ7)j Date: Fri, 26 Jun 2020 20:47:30 +0200 Subject: [PATCH 175/560] HBX-2041: Add GenerateDaoMojo (hbm2dao) to generate DAOs with the maven plugin - Backport commit 7948d4 for branch 5.x Signed-off-by: Koen Aers --- .../org/hibernate/mvn/GenerateDaoMojo.java | 31 +++++++++---------- test/maven-plugin/src/it/hbm2dao/pom.xml | 4 +-- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/maven-plugin/src/main/java/org/hibernate/mvn/GenerateDaoMojo.java b/maven-plugin/src/main/java/org/hibernate/mvn/GenerateDaoMojo.java index 3ac4f02f11..f4235153a5 100644 --- a/maven-plugin/src/main/java/org/hibernate/mvn/GenerateDaoMojo.java +++ b/maven-plugin/src/main/java/org/hibernate/mvn/GenerateDaoMojo.java @@ -17,19 +17,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.hibernate.tool.maven; +package org.hibernate.mvn; -import org.apache.maven.plugins.annotations.Mojo; -import org.apache.maven.plugins.annotations.Parameter; -import org.hibernate.tool.api.export.Exporter; -import org.hibernate.tool.api.export.ExporterConstants; -import org.hibernate.tool.api.export.ExporterFactory; -import org.hibernate.tool.api.export.ExporterType; -import org.hibernate.tool.api.metadata.MetadataDescriptor; +import static org.apache.maven.plugins.annotations.LifecyclePhase.GENERATE_SOURCES; import java.io.File; -import static org.apache.maven.plugins.annotations.LifecyclePhase.GENERATE_SOURCES; +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.hibernate.tool.api.metadata.MetadataDescriptor; +import org.hibernate.tool.hbm2x.DAOExporter; /** * Mojo to generate Data Access Objects (DAOs) from an existing database. @@ -37,7 +34,7 @@ * See: https://docs.jboss.org/tools/latest/en/hibernatetools/html_single/#d0e4821 */ @Mojo(name = "hbm2dao", defaultPhase = GENERATE_SOURCES) -public class GenerateDaoMojo extends AbstractGenerationMojo { +public class GenerateDaoMojo extends AbstractHbm2xMojo { /** The directory into which the DAOs will be generated. */ @Parameter(defaultValue = "${project.build.directory}/generated-sources/") @@ -57,17 +54,17 @@ public class GenerateDaoMojo extends AbstractGenerationMojo { private String templatePath; protected void executeExporter(MetadataDescriptor metadataDescriptor) { - Exporter pojoExporter = ExporterFactory.createExporter(ExporterType.DAO); - pojoExporter.getProperties().put(ExporterConstants.METADATA_DESCRIPTOR, metadataDescriptor); - pojoExporter.getProperties().put(ExporterConstants.DESTINATION_FOLDER, outputDirectory); + DAOExporter daoExporter = new DAOExporter(); + daoExporter.setMetadataDescriptor(metadataDescriptor); + daoExporter.setOutputDirectory(outputDirectory); if (templatePath != null) { getLog().info("Setting template path to: " + templatePath); - pojoExporter.getProperties().put(ExporterConstants.TEMPLATE_PATH, new String[] {templatePath}); + daoExporter.setTemplatePath(new String[]{templatePath}); } - pojoExporter.getProperties().setProperty("ejb3", String.valueOf(ejb3)); - pojoExporter.getProperties().setProperty("jdk5", String.valueOf(jdk5)); + daoExporter.getProperties().setProperty("ejb3", String.valueOf(ejb3)); + daoExporter.getProperties().setProperty("jdk5", String.valueOf(jdk5)); getLog().info("Starting DAO export to directory: " + outputDirectory + "..."); - pojoExporter.start(); + daoExporter.start(); } diff --git a/test/maven-plugin/src/it/hbm2dao/pom.xml b/test/maven-plugin/src/it/hbm2dao/pom.xml index ca72011970..ebdf28aaaf 100644 --- a/test/maven-plugin/src/it/hbm2dao/pom.xml +++ b/test/maven-plugin/src/it/hbm2dao/pom.xml @@ -19,8 +19,8 @@ - org.hibernate.tool - hibernate-tools-maven + org.hibernate + hibernate-tools-maven-plugin @project.version@ From 6bd8a7d90c10511b7a873d94ed766e32c4e32472 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 8 Jul 2020 18:47:07 +0200 Subject: [PATCH 176/560] HBX-2051: Update eclipse-jdt dependency to version 3.22.0 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 15ff40e846..8149b285d5 100644 --- a/pom.xml +++ b/pom.xml @@ -43,7 +43,7 @@ 1.10.8 4.4 - 3.21.0 + 3.22.0 2.3.30 1.4.200 5.1.0.Final From db1aa94cbe8a5ccfb3a1ef27dc37435db2886cc7 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sat, 25 Jul 2020 20:26:38 +0200 Subject: [PATCH 177/560] HBX-2055: Update dependency on HSQLDB to version 2.5.1 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8149b285d5..8a92d41ba5 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ 1.4.200 5.1.0.Final 5.5.0-SNAPSHOT - 2.5.0 + 2.5.1 8.0.1 2.2 1.2.0 From a97096c4c87b270ab188d6d89da76d595f34632f Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 27 Jul 2020 13:38:24 +0200 Subject: [PATCH 178/560] HBX-2056: Update jboss-parent dependency to version 37 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8a92d41ba5..48a1170fb4 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.jboss jboss-parent - 36 + 37 org.hibernate From 2224bcc0045eae67428fd7361c4ce60728fadb46 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 15 Sep 2020 15:03:48 +0200 Subject: [PATCH 179/560] =?UTF-8?q?HBX-2080:=20Maven=20should=20pickup=20?= =?UTF-8?q?=E2=80=98hibernate.properties=E2=80=99=20file=20from=20folder?= =?UTF-8?q?=20=E2=80=98src/main/resources=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Koen Aers --- .../src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java | 2 +- test/maven-plugin/src/it/hbm2dao/pom.xml | 2 +- .../src/main/{hibernate => resources}/hibernate.properties | 0 .../src/main/{hibernate => resources}/hibernate.reveng.xml | 0 test/maven-plugin/src/it/hbm2ddl/pom.xml | 2 +- .../src/main/{hibernate => resources}/hibernate.properties | 0 .../src/main/{hibernate => resources}/hibernate.reveng.xml | 0 test/maven-plugin/src/it/hbm2java/pom.xml | 2 +- .../src/main/{hibernate => resources}/hibernate.properties | 0 .../src/main/{hibernate => resources}/hibernate.reveng.xml | 0 10 files changed, 4 insertions(+), 4 deletions(-) rename test/maven-plugin/src/it/hbm2dao/src/main/{hibernate => resources}/hibernate.properties (100%) rename test/maven-plugin/src/it/hbm2dao/src/main/{hibernate => resources}/hibernate.reveng.xml (100%) rename test/maven-plugin/src/it/hbm2ddl/src/main/{hibernate => resources}/hibernate.properties (100%) rename test/maven-plugin/src/it/hbm2ddl/src/main/{hibernate => resources}/hibernate.reveng.xml (100%) rename test/maven-plugin/src/it/hbm2java/src/main/{hibernate => resources}/hibernate.properties (100%) rename test/maven-plugin/src/it/hbm2java/src/main/{hibernate => resources}/hibernate.reveng.xml (100%) diff --git a/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java b/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java index 1d2d129320..4f629467d5 100644 --- a/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java +++ b/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java @@ -57,7 +57,7 @@ public abstract class AbstractHbm2xMojo extends AbstractMojo { // For configuration /** The name of a property file, e.g. hibernate.properties. */ - @Parameter(defaultValue = "${project.basedir}/src/main/hibernate/hibernate.properties") + @Parameter(defaultValue = "${project.basedir}/src/main/resources/hibernate.properties") private File propertyFile; // Not exposed for now diff --git a/test/maven-plugin/src/it/hbm2dao/pom.xml b/test/maven-plugin/src/it/hbm2dao/pom.xml index ebdf28aaaf..66e7b39e9f 100644 --- a/test/maven-plugin/src/it/hbm2dao/pom.xml +++ b/test/maven-plugin/src/it/hbm2dao/pom.xml @@ -35,7 +35,7 @@ - ${project.basedir}/src/main/hibernate/hibernate.reveng.xml + ${project.basedir}/src/main/resources/hibernate.reveng.xml diff --git a/test/maven-plugin/src/it/hbm2dao/src/main/hibernate/hibernate.properties b/test/maven-plugin/src/it/hbm2dao/src/main/resources/hibernate.properties similarity index 100% rename from test/maven-plugin/src/it/hbm2dao/src/main/hibernate/hibernate.properties rename to test/maven-plugin/src/it/hbm2dao/src/main/resources/hibernate.properties diff --git a/test/maven-plugin/src/it/hbm2dao/src/main/hibernate/hibernate.reveng.xml b/test/maven-plugin/src/it/hbm2dao/src/main/resources/hibernate.reveng.xml similarity index 100% rename from test/maven-plugin/src/it/hbm2dao/src/main/hibernate/hibernate.reveng.xml rename to test/maven-plugin/src/it/hbm2dao/src/main/resources/hibernate.reveng.xml diff --git a/test/maven-plugin/src/it/hbm2ddl/pom.xml b/test/maven-plugin/src/it/hbm2ddl/pom.xml index 1bb46c5661..00a4847b00 100644 --- a/test/maven-plugin/src/it/hbm2ddl/pom.xml +++ b/test/maven-plugin/src/it/hbm2ddl/pom.xml @@ -35,7 +35,7 @@ - ${project.basedir}/src/main/hibernate/hibernate.reveng.xml + ${project.basedir}/src/main/resources/hibernate.reveng.xml diff --git a/test/maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.properties b/test/maven-plugin/src/it/hbm2ddl/src/main/resources/hibernate.properties similarity index 100% rename from test/maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.properties rename to test/maven-plugin/src/it/hbm2ddl/src/main/resources/hibernate.properties diff --git a/test/maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.reveng.xml b/test/maven-plugin/src/it/hbm2ddl/src/main/resources/hibernate.reveng.xml similarity index 100% rename from test/maven-plugin/src/it/hbm2ddl/src/main/hibernate/hibernate.reveng.xml rename to test/maven-plugin/src/it/hbm2ddl/src/main/resources/hibernate.reveng.xml diff --git a/test/maven-plugin/src/it/hbm2java/pom.xml b/test/maven-plugin/src/it/hbm2java/pom.xml index 35fd6256d2..90666ccc09 100644 --- a/test/maven-plugin/src/it/hbm2java/pom.xml +++ b/test/maven-plugin/src/it/hbm2java/pom.xml @@ -35,7 +35,7 @@ - ${project.basedir}/src/main/hibernate/hibernate.reveng.xml + ${project.basedir}/src/main/resources/hibernate.reveng.xml diff --git a/test/maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.properties b/test/maven-plugin/src/it/hbm2java/src/main/resources/hibernate.properties similarity index 100% rename from test/maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.properties rename to test/maven-plugin/src/it/hbm2java/src/main/resources/hibernate.properties diff --git a/test/maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.reveng.xml b/test/maven-plugin/src/it/hbm2java/src/main/resources/hibernate.reveng.xml similarity index 100% rename from test/maven-plugin/src/it/hbm2java/src/main/hibernate/hibernate.reveng.xml rename to test/maven-plugin/src/it/hbm2java/src/main/resources/hibernate.reveng.xml From 4939134cf682bb4174142533e9616aace1bfcaee Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 15 Sep 2020 15:13:14 +0200 Subject: [PATCH 180/560] =?UTF-8?q?HBX-2080:=20Maven=20should=20pickup=20?= =?UTF-8?q?=E2=80=98hibernate.properties=E2=80=99=20file=20from=20folder?= =?UTF-8?q?=20=E2=80=98src/main/resources=E2=80=99=20-=20Update=20README.m?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Koen Aers --- maven-plugin/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maven-plugin/README.md b/maven-plugin/README.md index 25e497488d..c67ae15843 100644 --- a/maven-plugin/README.md +++ b/maven-plugin/README.md @@ -168,7 +168,7 @@ To properly generate our entity, we need to do two more things. The first is of ``` In principle, we are now ready to generate the entity, but issuing `mvn clean generate-sources` will result in an error, complaining about the fact that a 'hiberate.properties' file could not be found. -By default the plugin looks in the folder 'src/main/hibernate' for this file. So it is for now sufficient to add a 'hibernate.properties' file in that location with the contents specified below. +By default the plugin looks in the folder 'src/main/resources' for this file. So it is for now sufficient to add a 'hibernate.properties' file in that location with the contents specified below. ``` hibernate.dialect=H2 From 97a2dd948cf91a40b903c588dff2305a38ea5b11 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 2 Oct 2020 15:18:00 +0200 Subject: [PATCH 181/560] HBX-1893: Maven plugin blows up when propertyFile is not configured while it should be optional Signed-off-by: Koen Aers --- .../org/hibernate/mvn/AbstractHbm2xMojo.java | 18 ++++----- .../it/noPropertiesFile/invoker.properties | 2 + .../src/it/noPropertiesFile/pom.xml | 38 +++++++++++++++++++ .../src/it/noPropertiesFile/verify.groovy | 26 +++++++++++++ 4 files changed, 74 insertions(+), 10 deletions(-) create mode 100644 test/maven-plugin/src/it/noPropertiesFile/invoker.properties create mode 100644 test/maven-plugin/src/it/noPropertiesFile/pom.xml create mode 100644 test/maven-plugin/src/it/noPropertiesFile/verify.groovy diff --git a/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java b/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java index 4f629467d5..f9b4c27b50 100644 --- a/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java +++ b/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java @@ -66,9 +66,11 @@ public abstract class AbstractHbm2xMojo extends AbstractMojo { public void execute() { getLog().info("Starting " + this.getClass().getSimpleName() + "..."); ReverseEngineeringStrategy strategy = setupReverseEngineeringStrategy(); - Properties properties = loadPropertiesFile(); - MetadataDescriptor jdbcDescriptor = createJdbcDescriptor(strategy, properties); - executeExporter(jdbcDescriptor); + if (propertyFile.exists()) { + executeExporter(createJdbcDescriptor(strategy, loadPropertiesFile())); + } else { + getLog().info("Property file '" + propertyFile + "' cannot be found, aborting..."); + } getLog().info("Finished " + this.getClass().getSimpleName() + "!"); } @@ -100,14 +102,10 @@ private ReverseEngineeringStrategy setupReverseEngineeringStrategy() { } private Properties loadPropertiesFile() { - if (propertyFile == null) { - return null; - } - - Properties properties = new Properties(); try (FileInputStream is = new FileInputStream(propertyFile)) { - properties.load(is); - return properties; + Properties result = new Properties(); + result.load(is); + return result; } catch (FileNotFoundException e) { throw new BuildException(propertyFile + " not found.", e); } catch (IOException e) { diff --git a/test/maven-plugin/src/it/noPropertiesFile/invoker.properties b/test/maven-plugin/src/it/noPropertiesFile/invoker.properties new file mode 100644 index 0000000000..4537ab14c4 --- /dev/null +++ b/test/maven-plugin/src/it/noPropertiesFile/invoker.properties @@ -0,0 +1,2 @@ +invoker.java.version = 1.8+ +invoker.goals = generate-sources \ No newline at end of file diff --git a/test/maven-plugin/src/it/noPropertiesFile/pom.xml b/test/maven-plugin/src/it/noPropertiesFile/pom.xml new file mode 100644 index 0000000000..2431341e2c --- /dev/null +++ b/test/maven-plugin/src/it/noPropertiesFile/pom.xml @@ -0,0 +1,38 @@ + + + 4.0.0 + + org.hibernate.tool.test + no-properties-file + 0.0.1-SNAPSHOT + + + UTF-8 + UTF-8 + + 1.8 + 1.4.195 + + + + + + org.hibernate + hibernate-tools-maven-plugin + @project.version@ + + + Entity generation + generate-sources + + hbm2java + + + + + + + + \ No newline at end of file diff --git a/test/maven-plugin/src/it/noPropertiesFile/verify.groovy b/test/maven-plugin/src/it/noPropertiesFile/verify.groovy new file mode 100644 index 0000000000..c71714aff6 --- /dev/null +++ b/test/maven-plugin/src/it/noPropertiesFile/verify.groovy @@ -0,0 +1,26 @@ +import java.io.*; + +println "start verify.groovy" + +File entity = new File(basedir, "build.log") + +if (!entity.isFile()) { + + throw new FileNotFoundException("Could not find generated JPA Entity: " + entity) + +} else { + + boolean found = false + String searchString = + "[INFO] Property file '" + + basedir.absolutePath + + "/src/main/resources/hibernate.properties' cannot be found, aborting..." + entity.eachLine { + line -> if (line.startsWith(searchString)) found = true + } + return found + +} + + +println "end verify.groovy" \ No newline at end of file From 0823425b91bcc62ba0ebf986b30c7fd92f97bfbc Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 4 Nov 2020 11:09:14 +0100 Subject: [PATCH 182/560] HBX-2088: Update Ant dependency to version 1.10.9 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 48a1170fb4..fabd72eeaf 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,7 @@ - 1.10.8 + 1.10.9 4.4 3.22.0 2.3.30 From f8f217bf688027e259d79e4e74cda14f7e01a3b8 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 9 Nov 2020 18:46:12 +0100 Subject: [PATCH 183/560] HBX-2089: Update eclipse-jdt-core dependency to version 3.23.0 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fabd72eeaf..f77a1ebfa1 100644 --- a/pom.xml +++ b/pom.xml @@ -43,7 +43,7 @@ 1.10.9 4.4 - 3.22.0 + 3.23.0 2.3.30 1.4.200 5.1.0.Final From 537d4b3388a598c09a8abade48fab622973089ae Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 16 Nov 2020 09:28:34 +0100 Subject: [PATCH 184/560] HBX-2090: Update Hibernate Commons Annotations dependency to version 5.1.2.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f77a1ebfa1..dcef912174 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ 3.23.0 2.3.30 1.4.200 - 5.1.0.Final + 5.1.2.Final 5.5.0-SNAPSHOT 2.5.1 8.0.1 From 3e426b0c136f0a6e15f4bcd70430ce4af9287902 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 16 Nov 2020 12:56:59 +0100 Subject: [PATCH 185/560] HBX-2091: Update JUnit dependency to version 4.13.1 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dcef912174..04de53e958 100644 --- a/pom.xml +++ b/pom.xml @@ -52,7 +52,7 @@ 8.0.1 2.2 1.2.0 - 4.13 + 4.13.1 6.0.6 19.3.0.0 6.1.7.jre8-preview From fd061b6db3b822e7c3b356f6da916c63b69a2cf7 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 27 Nov 2020 10:36:28 +0100 Subject: [PATCH 186/560] HBX-2044: Update Hibernate ORM dependency to 5.5.0-SNAPSHOT - Fix test failure of HibernateUtilTest#testGetForeignKey()' Signed-off-by: Koen Aers --- .../java/org/hibernate/tools/test/util/HibernateUtilTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/utils/src/test/java/org/hibernate/tools/test/util/HibernateUtilTest.java b/test/utils/src/test/java/org/hibernate/tools/test/util/HibernateUtilTest.java index b4d6459ea5..b55498481c 100644 --- a/test/utils/src/test/java/org/hibernate/tools/test/util/HibernateUtilTest.java +++ b/test/utils/src/test/java/org/hibernate/tools/test/util/HibernateUtilTest.java @@ -26,7 +26,7 @@ public void testGetForeignKey() { Table table = new Table(); Assert.assertNull(HibernateUtil.getForeignKey(table, "foo")); Assert.assertNull(HibernateUtil.getForeignKey(table, "bar")); - table.createForeignKey("foo", Collections.emptyList(), null, null); + table.createForeignKey("foo", Collections.emptyList(), "fooClass", null); Assert.assertNotNull(HibernateUtil.getForeignKey(table, "foo")); Assert.assertNull(HibernateUtil.getForeignKey(table, "bar")); } From 99611b1c3106886a623439800b6d573e186403fe Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 26 Nov 2020 17:36:34 +0100 Subject: [PATCH 187/560] HBX-2107: Create a test profile for SQL Server Signed-off-by: Koen Aers --- test/pom.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/pom.xml b/test/pom.xml index 2b34b6c534..991473dcee 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -50,6 +50,14 @@ h2 + + mssql + + utils + common + mssql + + From a44766d84f296a85dcebd9fa45e4b18b7f2b40da Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 27 Nov 2020 10:02:48 +0100 Subject: [PATCH 188/560] HBX-2106: Update dependency on SQL Server JDBC Driver to version 9.1.0.jre8-preview Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 04de53e958..df18fbcad6 100644 --- a/pom.xml +++ b/pom.xml @@ -55,7 +55,7 @@ 4.13.1 6.0.6 19.3.0.0 - 6.1.7.jre8-preview + 9.1.0.jre8-preview From 2b60bd80ffb65c0abb7f716f43e48a7949b64c2f Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 2 Dec 2020 14:33:22 +0100 Subject: [PATCH 189/560] HBX-2109: Specify the connection provider class in the tests to get rid of the stacktraces Signed-off-by: Koen Aers --- .../tool/hbm2x/DocExporterTest/TestCase.java | 1 + .../tool/hbm2x/Hbm2CfgTest/TestCase.java | 3 + .../hbm2x/Hbm2JavaEqualsTest/TestCase.java | 1 + .../TestCase.java | 2 + .../tool/hbm2x/OtherCfg2HbmTest/TestCase.java | 4 +- .../hbm2hbmxml/BackrefTest/TestCase.java | 1 + .../CompositeElementTest/TestCase.java | 1 + .../DynamicComponentTest/TestCase.java | 1 + .../hbm2hbmxml/FormulaTest/TestCase.java | 1 + .../hbm2x/hbm2hbmxml/IdBagTest/TestCase.java | 1 + .../hbm2x/hbm2hbmxml/JoinTest/TestCase.java | 1 + .../hbm2hbmxml/ListArrayTest/TestCase.java | 1 + .../hbm2hbmxml/ManyToManyTest/TestCase.java | 1 + .../hbm2hbmxml/MapAndAnyTest/TestCase.java | 1 + .../hbm2hbmxml/OneToOneTest/TestCase.java | 1 + .../hbm2hbmxml/SetElementTest/TestCase.java | 1 + .../hbm2hbmxml/TypeParamsTest/TestCase.java | 1 + .../completion/ModelCompletion/TestCase.java | 3 +- .../tool/ant/Exception/hibernate.properties | 3 +- .../ant/NoConnInfoExport/hibernate.cfg.xml | 4 +- .../test/util/DummyDatabaseMetadata.java | 1116 +++++++++++++++++ .../tools/test/util/HibernateUtil.java | 17 + .../tools/test/util/HibernateUtilTest.java | 1 + 23 files changed, 1160 insertions(+), 7 deletions(-) create mode 100644 test/utils/src/main/java/org/hibernate/tools/test/util/DummyDatabaseMetadata.java diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/DocExporterTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/DocExporterTest/TestCase.java index d30297ea15..d118ab23ec 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/DocExporterTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/DocExporterTest/TestCase.java @@ -61,6 +61,7 @@ public void setUp() throws Exception { Properties properties = new Properties(); properties.put( "jdk5", "true"); // test generics properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); if(File.pathSeparator.equals(";")) { // to work around windows/jvm not seeming to respect executing just "dot" properties.put("dot.executable", System.getProperties().getProperty("dot.executable","dot.exe")); } else { diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2CfgTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2CfgTest/TestCase.java index 4a1969b1bf..32b5dd7957 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2CfgTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2CfgTest/TestCase.java @@ -62,6 +62,7 @@ public void testMagicPropertyHandling() { properties.setProperty( Environment.HBM2DDL_AUTO, "false"); properties.setProperty( "hibernate.temp.use_jdbc_metadata_defaults", "false"); properties.setProperty("hibernate.dialect", HibernateUtil.Dialect.class.getName()); + properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); exporter.setMetadataDescriptor(MetadataDescriptorFactory .createNativeDescriptor(null, null, properties)); exporter.setOutputDirectory(outputDir); @@ -80,6 +81,7 @@ public void testMagicPropertyHandling() { properties = exporter.getProperties(); properties.setProperty( Environment.HBM2DDL_AUTO, "validator"); properties.setProperty("hibernate.dialect", HibernateUtil.Dialect.class.getName()); + properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); exporter.setMetadataDescriptor(MetadataDescriptorFactory .createNativeDescriptor(null, null, properties)); exporter.setOutputDirectory(outputDir); @@ -90,6 +92,7 @@ public void testMagicPropertyHandling() { properties = exporter.getProperties(); properties.setProperty( AvailableSettings.TRANSACTION_COORDINATOR_STRATEGY, "org.hibernate.console.FakeTransactionManagerLookup"); // Hack for seam-gen console configurations properties.setProperty("hibernate.dialect", HibernateUtil.Dialect.class.getName()); + properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); exporter.setMetadataDescriptor(MetadataDescriptorFactory .createNativeDescriptor(null, null, properties)); exporter.setOutputDirectory(outputDir); diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaEqualsTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaEqualsTest/TestCase.java index feb3618a99..0b95d73318 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaEqualsTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaEqualsTest/TestCase.java @@ -64,6 +64,7 @@ public void setUp() throws Exception { fileWriter.close(); Properties properties = new Properties(); properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, new File[] { hbmXml }, properties); Exporter exporter = new POJOExporter(); diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/HibernateMappingExporterTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/HibernateMappingExporterTest/TestCase.java index 5eb9a55ed6..2b52f3555e 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/HibernateMappingExporterTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/HibernateMappingExporterTest/TestCase.java @@ -4,6 +4,7 @@ import java.io.FileWriter; import java.util.Properties; +import org.hibernate.cfg.AvailableSettings; import org.hibernate.tool.api.metadata.MetadataDescriptor; import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; import org.hibernate.tool.hbm2x.HibernateMappingExporter; @@ -37,6 +38,7 @@ public void testStart() throws Exception { writer.close(); Properties properties = new Properties(); properties.setProperty("hibernate.dialect", HibernateUtil.Dialect.class.getName()); + properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, new File[] { fooHbmXmlOrigin }, properties); final File outputDir = new File(temporaryFolder.getRoot(), "output"); diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/OtherCfg2HbmTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/OtherCfg2HbmTest/TestCase.java index 169a5991a1..894b52d74a 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/OtherCfg2HbmTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/OtherCfg2HbmTest/TestCase.java @@ -14,7 +14,6 @@ import org.dom4j.XPath; import org.dom4j.io.SAXReader; import org.hibernate.boot.Metadata; -import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.cfg.AvailableSettings; import org.hibernate.tool.api.metadata.MetadataDescriptor; import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; @@ -75,10 +74,9 @@ public void testFileExistence() { @Test public void testReadable() { - StandardServiceRegistryBuilder ssrb = new StandardServiceRegistryBuilder(); - ssrb.applySetting(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); Properties properties = new Properties(); properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); File[] hbmFiles = new File[4]; hbmFiles[0] = new File(outputDir, "org/hibernate/tool/hbm2x/Customer.hbm.xml"); hbmFiles[1] = new File(outputDir, "org/hibernate/tool/hbm2x/LineItem.hbm.xml"); diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/TestCase.java index 5ea48cfd51..70db4c999f 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/TestCase.java @@ -101,6 +101,7 @@ public void testReadable() { outputDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/CarPart.hbm.xml")); Properties properties = new Properties(); + properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/TestCase.java index 1b6689c631..def5657e2f 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/TestCase.java @@ -93,6 +93,7 @@ public void testReadable() { "org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/Glarch.hbm.xml")); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); Assert.assertNotNull(metadataDescriptor.createMetadata()); diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/TestCase.java index 4ab3213bf1..d2d9430e93 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/TestCase.java @@ -93,6 +93,7 @@ public void testReadable() { "org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/Glarch.hbm.xml")); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); Assert.assertNotNull(metadataDescriptor.createMetadata()); diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/TestCase.java index fa51742be4..df690a4c11 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/TestCase.java @@ -77,6 +77,7 @@ public void testReadable() { "/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/ShippingAddress.hbm.xml")); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); Assert.assertNotNull(metadataDescriptor.createMetadata()); diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/TestCase.java index a895a6cd47..eff24c139c 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/TestCase.java @@ -103,6 +103,7 @@ public void testReadable() { "/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/Group.hbm.xml")); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); Assert.assertNotNull(metadataDescriptor.createMetadata()); diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/TestCase.java index 9171be79de..24f5f8befe 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/TestCase.java @@ -74,6 +74,7 @@ public void testReadable() { "/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Child.hbm.xml")); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); Assert.assertNotNull(metadataDescriptor.createMetadata()); diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/TestCase.java index 09fdbef2f1..a3c0a3c9bb 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/TestCase.java @@ -91,6 +91,7 @@ public void testReadable() { "org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/Glarch.hbm.xml")); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); Assert.assertNotNull(metadataDescriptor.createMetadata()); diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/TestCase.java index d19f6bd7eb..5bb0a296b8 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/TestCase.java @@ -90,6 +90,7 @@ public void testReadable() { "org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/Group.hbm.xml")); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); Assert.assertNotNull(metadataDescriptor.createMetadata()); diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/TestCase.java index 537e48523e..28b40019de 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/TestCase.java @@ -111,6 +111,7 @@ public void testReadable() { "org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/PropertySet.hbm.xml")); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[4]), properties); Assert.assertNotNull(metadataDescriptor.createMetadata()); diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/TestCase.java index 249238d390..5f7bba9fff 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/TestCase.java @@ -91,6 +91,7 @@ public void testReadable() { "org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/Address.hbm.xml"); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); File[] files = new File[] { personHbmXml, addressHbmXml }; MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files, properties); diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/SetElementTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/SetElementTest/TestCase.java index 04b46f381a..e726814899 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/SetElementTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/SetElementTest/TestCase.java @@ -85,6 +85,7 @@ public void testReadable() { "org/hibernate/tool/hbm2x/hbm2hbmxml/SetElementTest/Search.hbm.xml"); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); File[] files = new File[] { searchHbmXml }; MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files, properties); diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/TypeParamsTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/TypeParamsTest/TestCase.java index 7764ed443e..669ee21bb3 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/TypeParamsTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/TypeParamsTest/TestCase.java @@ -88,6 +88,7 @@ public void testReadable() { "org/hibernate/tool/hbm2x/hbm2hbmxml/TypeParamsTest/Order.hbm.xml"); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); File[] files = new File[] { orderHbmXml }; MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files, properties); diff --git a/test/nodb/src/test/java/org/hibernate/tool/ide/completion/ModelCompletion/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/ide/completion/ModelCompletion/TestCase.java index 5fb4d66184..bbee9d8fb9 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/ide/completion/ModelCompletion/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/ide/completion/ModelCompletion/TestCase.java @@ -658,7 +658,8 @@ protected int getCaretPosition(String str) { private Metadata buildMetadata() { StandardServiceRegistryBuilder ssrb = new StandardServiceRegistryBuilder(); - ssrb.applySetting(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + ssrb.applySetting(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + ssrb.applySetting(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataSources metadataSources = new MetadataSources() .addInputStream(getClass().getResourceAsStream("Product.hbm.xml")) .addInputStream(getClass().getResourceAsStream("Store.hbm.xml")) diff --git a/test/nodb/src/test/resources/org/hibernate/tool/ant/Exception/hibernate.properties b/test/nodb/src/test/resources/org/hibernate/tool/ant/Exception/hibernate.properties index 7c3d06795d..7dbd997fa3 100644 --- a/test/nodb/src/test/resources/org/hibernate/tool/ant/Exception/hibernate.properties +++ b/test/nodb/src/test/resources/org/hibernate/tool/ant/Exception/hibernate.properties @@ -1 +1,2 @@ -hibernate.dialect org.hibernate.dialect.H2Dialect \ No newline at end of file +hibernate.dialect org.hibernate.tools.test.util.HibernateUtil$Dialect +hibernate.connection.provider_class org.hibernate.tools.test.util.HibernateUtil$ConnectionProvider \ No newline at end of file diff --git a/test/nodb/src/test/resources/org/hibernate/tool/ant/NoConnInfoExport/hibernate.cfg.xml b/test/nodb/src/test/resources/org/hibernate/tool/ant/NoConnInfoExport/hibernate.cfg.xml index fd86520f7e..c8e60ae9e3 100644 --- a/test/nodb/src/test/resources/org/hibernate/tool/ant/NoConnInfoExport/hibernate.cfg.xml +++ b/test/nodb/src/test/resources/org/hibernate/tool/ant/NoConnInfoExport/hibernate.cfg.xml @@ -4,7 +4,7 @@ "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"> - org.h2.Driver - org.hibernate.dialect.H2Dialect + org.hibernate.tools.test.util.HibernateUtil$Dialect + org.hibernate.tools.test.util.HibernateUtil$ConnectionProvider diff --git a/test/utils/src/main/java/org/hibernate/tools/test/util/DummyDatabaseMetadata.java b/test/utils/src/main/java/org/hibernate/tools/test/util/DummyDatabaseMetadata.java new file mode 100644 index 0000000000..e8ddeb61eb --- /dev/null +++ b/test/utils/src/main/java/org/hibernate/tools/test/util/DummyDatabaseMetadata.java @@ -0,0 +1,1116 @@ +package org.hibernate.tools.test.util; + +import java.lang.reflect.InvocationHandler; +import java.lang.reflect.Method; +import java.lang.reflect.Proxy; +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.ResultSet; +import java.sql.RowIdLifetime; +import java.sql.SQLException; + +public class DummyDatabaseMetadata implements DatabaseMetaData { + + @Override + public T unwrap(Class iface) throws SQLException { + return null; + } + + @Override + public boolean isWrapperFor(Class iface) throws SQLException { + return false; + } + + @Override + public boolean allProceduresAreCallable() throws SQLException { + return false; + } + + @Override + public boolean allTablesAreSelectable() throws SQLException { + return false; + } + + @Override + public String getURL() throws SQLException { + return null; + } + + @Override + public String getUserName() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean isReadOnly() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean nullsAreSortedHigh() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean nullsAreSortedLow() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean nullsAreSortedAtStart() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean nullsAreSortedAtEnd() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public String getDatabaseProductName() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getDatabaseProductVersion() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getDriverName() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getDriverVersion() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getDriverMajorVersion() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getDriverMinorVersion() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public boolean usesLocalFiles() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean usesLocalFilePerTable() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsMixedCaseIdentifiers() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean storesUpperCaseIdentifiers() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean storesLowerCaseIdentifiers() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean storesMixedCaseIdentifiers() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean storesUpperCaseQuotedIdentifiers() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean storesLowerCaseQuotedIdentifiers() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean storesMixedCaseQuotedIdentifiers() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public String getIdentifierQuoteString() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getSQLKeywords() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getNumericFunctions() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getStringFunctions() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getSystemFunctions() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getTimeDateFunctions() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getSearchStringEscape() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getExtraNameCharacters() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean supportsAlterTableWithAddColumn() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsAlterTableWithDropColumn() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsColumnAliasing() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean nullPlusNonNullIsNull() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsConvert() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsConvert(int fromType, int toType) throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsTableCorrelationNames() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsDifferentTableCorrelationNames() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsExpressionsInOrderBy() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsOrderByUnrelated() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsGroupBy() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsGroupByUnrelated() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsGroupByBeyondSelect() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsLikeEscapeClause() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsMultipleResultSets() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsMultipleTransactions() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsNonNullableColumns() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsMinimumSQLGrammar() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsCoreSQLGrammar() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsExtendedSQLGrammar() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsANSI92EntryLevelSQL() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsANSI92IntermediateSQL() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsANSI92FullSQL() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsIntegrityEnhancementFacility() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsOuterJoins() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsFullOuterJoins() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsLimitedOuterJoins() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public String getSchemaTerm() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getProcedureTerm() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getCatalogTerm() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean isCatalogAtStart() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public String getCatalogSeparator() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean supportsSchemasInDataManipulation() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsSchemasInProcedureCalls() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsSchemasInTableDefinitions() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsSchemasInIndexDefinitions() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsCatalogsInDataManipulation() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsCatalogsInProcedureCalls() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsCatalogsInTableDefinitions() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsCatalogsInIndexDefinitions() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsPositionedDelete() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsPositionedUpdate() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsSelectForUpdate() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsStoredProcedures() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsSubqueriesInComparisons() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsSubqueriesInExists() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsSubqueriesInIns() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsSubqueriesInQuantifieds() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsCorrelatedSubqueries() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsUnion() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsUnionAll() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsOpenCursorsAcrossCommit() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsOpenCursorsAcrossRollback() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsOpenStatementsAcrossCommit() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsOpenStatementsAcrossRollback() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public int getMaxBinaryLiteralLength() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getMaxCharLiteralLength() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getMaxColumnNameLength() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getMaxColumnsInGroupBy() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getMaxColumnsInIndex() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getMaxColumnsInOrderBy() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getMaxColumnsInSelect() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getMaxColumnsInTable() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getMaxConnections() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getMaxCursorNameLength() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getMaxIndexLength() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getMaxSchemaNameLength() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getMaxProcedureNameLength() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getMaxCatalogNameLength() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getMaxRowSize() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public boolean doesMaxRowSizeIncludeBlobs() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public int getMaxStatementLength() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getMaxStatements() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getMaxTableNameLength() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getMaxTablesInSelect() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getMaxUserNameLength() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getDefaultTransactionIsolation() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public boolean supportsTransactions() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsTransactionIsolationLevel(int level) throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsDataDefinitionAndDataManipulationTransactions() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsDataManipulationTransactionsOnly() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean dataDefinitionCausesTransactionCommit() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean dataDefinitionIgnoredInTransactions() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) + throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, + String columnNamePattern) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) + throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public ResultSet getSchemas() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public ResultSet getCatalogs() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public ResultSet getTableTypes() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) + throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) + throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) + throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) + throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public ResultSet getCrossReference(String parentCatalog, String parentSchema, String parentTable, + String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public ResultSet getTypeInfo() throws SQLException { + return getDummyResultSet(); + } + + @Override + public ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) + throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean supportsResultSetType(int type) throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsResultSetConcurrency(int type, int concurrency) throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean ownUpdatesAreVisible(int type) throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean ownDeletesAreVisible(int type) throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean ownInsertsAreVisible(int type) throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean othersUpdatesAreVisible(int type) throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean othersDeletesAreVisible(int type) throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean othersInsertsAreVisible(int type) throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean updatesAreDetected(int type) throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean deletesAreDetected(int type) throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean insertsAreDetected(int type) throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsBatchUpdates() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) + throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public Connection getConnection() throws SQLException { + return getDummyConnection(); + } + + @Override + public boolean supportsSavepoints() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsNamedParameters() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsMultipleOpenResults() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsGetGeneratedKeys() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public ResultSet getSuperTypes(String catalog, String schemaPattern, String typeNamePattern) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public ResultSet getSuperTables(String catalog, String schemaPattern, String tableNamePattern) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, + String attributeNamePattern) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean supportsResultSetHoldability(int holdability) throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public int getResultSetHoldability() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getDatabaseMajorVersion() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getDatabaseMinorVersion() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getJDBCMajorVersion() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getJDBCMinorVersion() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getSQLStateType() throws SQLException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public boolean locatorsUpdateCopy() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean supportsStatementPooling() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public RowIdLifetime getRowIdLifetime() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public ResultSet getSchemas(String catalog, String schemaPattern) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean autoCommitFailureClosesAllResultSets() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + @Override + public ResultSet getClientInfoProperties() throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public ResultSet getFunctions(String catalog, String schemaPattern, String functionNamePattern) + throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public ResultSet getFunctionColumns(String catalog, String schemaPattern, String functionNamePattern, + String columnNamePattern) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public ResultSet getPseudoColumns(String catalog, String schemaPattern, String tableNamePattern, + String columnNamePattern) throws SQLException { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean generatedKeyAlwaysReturned() throws SQLException { + // TODO Auto-generated method stub + return false; + } + + private Connection DUMMY_CONNECTION = null; + private ResultSet DUMMY_RESULT_SET = null; + + private Connection getDummyConnection() { + if (DUMMY_CONNECTION == null) { + DUMMY_CONNECTION = (Connection)Proxy.newProxyInstance( + HibernateUtil.class.getClassLoader(), + new Class[] { Connection.class }, + new InvocationHandler() { + @Override + public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { + if (method.getName().equals("getMetaData")) { + return DummyDatabaseMetadata.this; + } + return null; + } + }); + } + return DUMMY_CONNECTION; + } + + private ResultSet getDummyResultSet() { + if (DUMMY_RESULT_SET == null) { + DUMMY_RESULT_SET = (ResultSet)Proxy.newProxyInstance( + HibernateUtil.class.getClassLoader(), + new Class[] { ResultSet.class }, + new InvocationHandler() { + @Override + public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { + if (method.getName().equals("next")) { + return false; + } + return null; + } + }); + } + return DUMMY_RESULT_SET; + } + +} diff --git a/test/utils/src/main/java/org/hibernate/tools/test/util/HibernateUtil.java b/test/utils/src/main/java/org/hibernate/tools/test/util/HibernateUtil.java index 4a35f908ad..e613bfe3dd 100644 --- a/test/utils/src/main/java/org/hibernate/tools/test/util/HibernateUtil.java +++ b/test/utils/src/main/java/org/hibernate/tools/test/util/HibernateUtil.java @@ -2,12 +2,16 @@ import java.io.File; import java.lang.reflect.Field; +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.SQLException; import java.util.Iterator; import java.util.Properties; import org.hibernate.boot.Metadata; import org.hibernate.boot.MetadataSources; import org.hibernate.cfg.AvailableSettings; +import org.hibernate.engine.jdbc.connections.internal.UserSuppliedConnectionProviderImpl; import org.hibernate.mapping.ForeignKey; import org.hibernate.mapping.Table; import org.hibernate.tool.api.metadata.MetadataDescriptor; @@ -17,6 +21,16 @@ public class HibernateUtil { public static class Dialect extends org.hibernate.dialect.Dialect {} + public static class ConnectionProvider extends UserSuppliedConnectionProviderImpl { + private static final long serialVersionUID = 1L; + @Override + public Connection getConnection() throws SQLException { + return DATABASE_META_DATA.getConnection(); + } + @Override + public void closeConnection(Connection conn) throws SQLException {} + } + public static ForeignKey getForeignKey(Table table, String fkName) { ForeignKey result = null; Iterator iter = table.getForeignKeyIterator(); @@ -54,6 +68,7 @@ public static MetadataDescriptor initializeMetadataDescriptor( } Properties properties = new Properties(); properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.put(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); return MetadataDescriptorFactory.createNativeDescriptor(null, hbmFiles, properties); } @@ -73,4 +88,6 @@ public static void addAnnotatedClass( } } + private static DatabaseMetaData DATABASE_META_DATA = new DummyDatabaseMetadata(); + } diff --git a/test/utils/src/test/java/org/hibernate/tools/test/util/HibernateUtilTest.java b/test/utils/src/test/java/org/hibernate/tools/test/util/HibernateUtilTest.java index b55498481c..d609ea609b 100644 --- a/test/utils/src/test/java/org/hibernate/tools/test/util/HibernateUtilTest.java +++ b/test/utils/src/test/java/org/hibernate/tools/test/util/HibernateUtilTest.java @@ -54,6 +54,7 @@ public void testInitializeConfiguration() { public void testAddAnnotatedClass() { Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, null, properties); Assert.assertNull(metadataDescriptor From ebcbe916504641531223ab56aca2f7b3418e6c95 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 21 Dec 2020 11:25:29 +0100 Subject: [PATCH 190/560] HBX-2117: Update eclipse-jdt-core dependency to version 3.24.0 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index df18fbcad6..28316d38b2 100644 --- a/pom.xml +++ b/pom.xml @@ -43,7 +43,7 @@ 1.10.9 4.4 - 3.23.0 + 3.24.0 2.3.30 1.4.200 5.1.2.Final From 56841e2d9ff5dad17e8d45d80e91601fb1198001 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sun, 27 Dec 2020 18:12:26 +0100 Subject: [PATCH 191/560] HBX-2119: Update dependency on SQL Server JDBC Driver to version 9.1.1.jre8-preview Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 28316d38b2..5fe1f5fa40 100644 --- a/pom.xml +++ b/pom.xml @@ -55,7 +55,7 @@ 4.13.1 6.0.6 19.3.0.0 - 9.1.0.jre8-preview + 9.1.1.jre8-preview From 267dec9e7e61c336ad60e5b1dc1f1f7f1e3e297c Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 16 Feb 2021 11:33:44 +0100 Subject: [PATCH 192/560] Update dependency on SQL Server JDBC Driver to version 9.2.0.jre8 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5fe1f5fa40..ee576f37a5 100644 --- a/pom.xml +++ b/pom.xml @@ -55,7 +55,7 @@ 4.13.1 6.0.6 19.3.0.0 - 9.1.1.jre8-preview + 9.2.0.jre8 From 12ffd696a5c041b037a2ff1f7ec7ff4021d10190 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 9 Mar 2021 11:16:38 +0100 Subject: [PATCH 193/560] HBX-2137: Investigate and reenable ignored and failing test 'org.hibernate.tool.jdbc2cfg.PersistentClasses.TestCase.testBinding()' Signed-off-by: Koen Aers --- main/src/main/java/org/hibernate/cfg/JDBCBinder.java | 1 + 1 file changed, 1 insertion(+) diff --git a/main/src/main/java/org/hibernate/cfg/JDBCBinder.java b/main/src/main/java/org/hibernate/cfg/JDBCBinder.java index 096c504ee7..04066d084f 100644 --- a/main/src/main/java/org/hibernate/cfg/JDBCBinder.java +++ b/main/src/main/java/org/hibernate/cfg/JDBCBinder.java @@ -189,6 +189,7 @@ private void createPersistentClasses(DatabaseCollector collector, Mapping mappin rc.setDiscriminatorValue( rc.getEntityName() ); rc.setTable(table); + rc.setOptimisticLockStyle(OptimisticLockStyle.NONE); try { metadataCollector.addEntityBinding(rc); } catch(DuplicateMappingException dme) { From 3ba1de5a4624c9a47d94f0c00e37209a85d0de2e Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 19 Mar 2021 09:43:44 +0100 Subject: [PATCH 194/560] HBX-2140: Update eclipse-jdt-core dependency to version 3.25.0 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ee576f37a5..a8fc87e536 100644 --- a/pom.xml +++ b/pom.xml @@ -43,7 +43,7 @@ 1.10.9 4.4 - 3.24.0 + 3.25.0 2.3.30 1.4.200 5.1.2.Final From 2dd0a778f261f1c2407cab53be19f7bf1611f770 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sun, 21 Mar 2021 09:25:57 +0100 Subject: [PATCH 195/560] HBX-2142: Update SQL Server JDBC driver dependency to version 9.2.1.jre8 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a8fc87e536..72af30e4d3 100644 --- a/pom.xml +++ b/pom.xml @@ -55,7 +55,7 @@ 4.13.1 6.0.6 19.3.0.0 - 9.2.0.jre8 + 9.2.1.jre8 From f29f360061aeaf2336347b68f7da740d18da25be Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 22 Mar 2021 20:29:36 +0100 Subject: [PATCH 196/560] HBX-2001: Add copyright and license header where appropriate - Update pom.xml Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 72af30e4d3..303e7df957 100644 --- a/pom.xml +++ b/pom.xml @@ -1,6 +1,6 @@ + 1.7 1.4.200 5.1.2.Final 5.5.0.Final @@ -61,6 +62,11 @@ + + com.google.googlejavaformat + google-java-format + ${google-java-format.version} + com.h2database h2 @@ -122,11 +128,6 @@ ant ${ant.version} - - org.eclipse.jdt - org.eclipse.jdt.core - ${eclipse-jdt-core.version} - org.freemarker freemarker diff --git a/test/nodb/src/test/java/org/hibernate/tool/ant/JavaFormatter/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/ant/JavaFormatter/TestCase.java index 614d3ce375..0e52a5a814 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/ant/JavaFormatter/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/ant/JavaFormatter/TestCase.java @@ -2,7 +2,7 @@ import java.io.File; -import org.hibernate.tool.ide.formatting.JavaFormatter; +import org.hibernate.tool.ide.formatting.DefaultJavaPrettyPrinterStrategy; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.ResourceUtil; @@ -53,7 +53,7 @@ public void testJavaFormatFile() { .findFirstString("public", simpleOne) .contains("SimpleOne")); - JavaFormatter formatter = new JavaFormatter(null); + DefaultJavaPrettyPrinterStrategy formatter = new DefaultJavaPrettyPrinterStrategy(null); formatter.formatFile( simpleOne ); Assert.assertTrue(FileUtil @@ -90,7 +90,7 @@ public void testJavaJdk5FormatFile() { Assert.assertFalse(log.contains("Exception")); - JavaFormatter formatter = new JavaFormatter(null); + DefaultJavaPrettyPrinterStrategy formatter = new DefaultJavaPrettyPrinterStrategy(null); Assert.assertTrue( "formatting should pass when using default settings", formatter.formatFile(simple5One)); From e900cf287de2eb3701fcd7d29f6b1a6959ff59a4 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 16 Jun 2021 17:34:05 +0200 Subject: [PATCH 232/560] HBX-2159: Remove the dependency on dom4j - Remove dependency from module 'hibernate-tools-parent' Signed-off-by: Koen Aers --- pom.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pom.xml b/pom.xml index 96dcb38653..291055e7d5 100644 --- a/pom.xml +++ b/pom.xml @@ -43,7 +43,6 @@ 1.10.10 4.4 - 1.6.1 2.3.31 1.7 @@ -85,11 +84,6 @@ ${oracle.version} test - - dom4j - dom4j - ${dom4j.version} - org.apache.commons commons-collections4 From 58b500e1433d8d6f94650d4442e27a8c6e96c29a Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 22 Jun 2021 10:18:49 +0200 Subject: [PATCH 233/560] HBX-2180: Update Hibernate ORM Dependency to version 5.5.2.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 291055e7d5..81650c5f1c 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ 1.7 1.4.200 5.1.2.Final - 5.5.0.Final + 5.5.2.Final 2.5.2 8.0.1 2.2 From bdf607e8a77ca258a5fb40a67c54fc24a1ba83c1 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 22 Jun 2021 10:40:42 +0200 Subject: [PATCH 234/560] HBX-2175: Update version identifier to 5.5.2.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 0d32e9c592..daddab8827 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.5.1-SNAPSHOT + 5.5.2.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 503b0c2785..f52f73c065 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.5.1-SNAPSHOT"; + public static final String VERSION = "5.5.2.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 4d42e5be65..2701e1efda 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.5.1-SNAPSHOT + 5.5.2.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 81650c5f1c..247f0be193 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.5.1-SNAPSHOT + 5.5.2.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index d0989433b2..7f4cc5bd92 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.1-SNAPSHOT + 5.5.2.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index ad1837024d..f8fa54cd6a 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.1-SNAPSHOT + 5.5.2.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index d6f6304d70..c3697ef7e5 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.1-SNAPSHOT + 5.5.2.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 5707299435..2d56b2d521 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.1-SNAPSHOT + 5.5.2.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 7a8896cf96..1e74bc3f64 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.1-SNAPSHOT + 5.5.2.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 4ac08951c3..f8721f43e6 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.1-SNAPSHOT + 5.5.2.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 6243ccd06c..f6409cd6f1 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.1-SNAPSHOT + 5.5.2.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 72604c27da..5c2375a669 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.1-SNAPSHOT + 5.5.2.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 9be4c6bcee..a631894671 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.5.1-SNAPSHOT + 5.5.2.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 1fb09316c2..17ee653c1c 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.1-SNAPSHOT + 5.5.2.Final hibernate-tools-tests-utils From 0a1cd39c301fbdf6c1a2fd54ac9071096f5b8161 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 22 Jun 2021 11:12:43 +0200 Subject: [PATCH 235/560] HBX-2181: Update version identifier to 5.5.3-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index daddab8827..695bc93cc9 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.5.2.Final + 5.5.3-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index f52f73c065..43f3c5c209 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.5.2.Final"; + public static final String VERSION = "5.5.3-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 2701e1efda..158d5ac40f 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.5.2.Final + 5.5.3-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 247f0be193..28ea127884 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.5.2.Final + 5.5.3-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 7f4cc5bd92..bb28ab2cdb 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.2.Final + 5.5.3-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index f8fa54cd6a..f006b76632 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.2.Final + 5.5.3-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index c3697ef7e5..874f8dad6e 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.2.Final + 5.5.3-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 2d56b2d521..725d083e78 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.2.Final + 5.5.3-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 1e74bc3f64..3d2a808e89 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.2.Final + 5.5.3-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index f8721f43e6..a93fea19db 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.2.Final + 5.5.3-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index f6409cd6f1..c6b1e4914d 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.2.Final + 5.5.3-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 5c2375a669..19c7c1d6d6 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.2.Final + 5.5.3-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index a631894671..5786610af8 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.5.2.Final + 5.5.3-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 17ee653c1c..282856736d 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.2.Final + 5.5.3-SNAPSHOT hibernate-tools-tests-utils From 6eee6bd2fc8d253e236e635c9c8d23064b8e24e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Rodi=C3=A8re?= Date: Thu, 10 Jun 2021 08:54:03 +0200 Subject: [PATCH 236/560] Configure Hibernate GitHub bot and pull request template See https://github.com/hibernate/hibernate-github-bot --- .github/PULL_REQUEST_TEMPLATE.md | 5 +++++ .github/hibernate-github-bot.yml | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/hibernate-github-bot.yml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000..5fe6eaef67 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,5 @@ +Please delete this text, and add a link to the Jira issue solved by this PR; +see https://hibernate.atlassian.net/browse/HBX. + +Remember to prepend the title of this PR, as well as all commit messages, +with the key of the Jira issue (`HBX-`). diff --git a/.github/hibernate-github-bot.yml b/.github/hibernate-github-bot.yml new file mode 100644 index 0000000000..01c56ba41d --- /dev/null +++ b/.github/hibernate-github-bot.yml @@ -0,0 +1,3 @@ +--- +jira: + projectKey: "HBX" From 28cd64d4a65624b26e82c203bc5966370d59437f Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 24 Jun 2021 10:15:04 +0200 Subject: [PATCH 237/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Add JUnit Jupiter dependency to the 'hibernate-tools-parent' and 'hibernate-tools-tests-nodb' modules Signed-off-by: Koen Aers --- pom.xml | 13 +++++++++++++ test/nodb/pom.xml | 8 ++++++++ 2 files changed, 21 insertions(+) diff --git a/pom.xml b/pom.xml index 28ea127884..d9ba4bc3fb 100644 --- a/pom.xml +++ b/pom.xml @@ -54,6 +54,7 @@ 2.2 1.2.0 4.13.2 + 5.7.1 6.0.6 19.3.0.0 9.2.1.jre8 @@ -158,6 +159,18 @@ ${hsqldb.version} test + + org.junit.jupiter + junit-jupiter-engine + ${junit-jupiter.version} + test + + + org.junit.vintage + junit-vintage-engine + ${junit-jupiter.version} + test + diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index c6b1e4914d..a37a9bf2b6 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -37,6 +37,14 @@ javax javaee-api + + org.junit.jupiter + junit-jupiter-engine + + + org.junit.vintage + junit-vintage-engine + From baf8db942495f84aa174d2b213582d1778ee37c8 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 24 Jun 2021 10:46:47 +0200 Subject: [PATCH 238/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.Exception.TestCase' Signed-off-by: Koen Aers --- .../tool/ant/Exception/TestCase.java | 45 +++++++++++++------ 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/ant/Exception/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/ant/Exception/TestCase.java index 41ea5fee9b..a2c119a436 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/ant/Exception/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/ant/Exception/TestCase.java @@ -1,30 +1,49 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.Exception; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + import java.io.File; import org.apache.tools.ant.BuildException; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; - +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); } @@ -42,10 +61,10 @@ public void testException() throws Exception { try { project.executeTarget("testException"); - Assert.fail("An exception should occur"); + fail("An exception should occur"); } catch (BuildException e) { - Assert.assertTrue(e.getMessage(), e.getMessage().contains("Error while processing Entity")); + assertTrue(e.getMessage().contains("Error while processing Entity"), e.getMessage()); } From c2d6c7709ddf657cfab5736133fb0b293e11bab9 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 24 Jun 2021 13:47:45 +0200 Subject: [PATCH 239/560] HBX-2185: Create GitHub yaml file to build and test automatically when opening PR - Initial creation Signed-off-by: Koen Aers --- .github/workflows/build_test.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/workflows/build_test.yml diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml new file mode 100644 index 0000000000..1354480cf0 --- /dev/null +++ b/.github/workflows/build_test.yml @@ -0,0 +1,11 @@ +name: Build and Test + +on: + pull_request + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - run: echo "Building and testing" From 01ca2b72204513501e2d1688bf39aea34f06d97d Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 25 Jun 2021 16:17:34 +0200 Subject: [PATCH 240/560] HBX-2185: Create GitHub yaml file to build and test automatically when opening PR - Final yaml file Signed-off-by: Koen Aers --- .github/workflows/build_test.yml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 1354480cf0..54fba73b5e 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -8,4 +8,29 @@ jobs: runs-on: ubuntu-latest steps: - - run: echo "Building and testing" + - name: Checkout PR Branch + uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + + - name: Setup Java 8 + uses: actions/setup-java@v1 + with: + java-version: 8 + java-package: jdk + architecture: x64 + + - name: Build and Test + uses: GabrielBB/xvfb-action@v1 + with: + run: mvn clean install -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true + + - name: Archive Test Artifacts + uses: actions/upload-artifact@v2 + with: + name: test-reports + path: | + **/*target/surefire-reports/ + **/*.log + From 0436c6e65662dadc2f9ce80e714eb60172728bc4 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 25 Jun 2021 17:31:01 +0200 Subject: [PATCH 241/560] HBX-2185: Create GitHub yaml file to build and test automatically when opening PR - The file is not needed in the 5.5 branch Signed-off-by: Koen Aers --- .github/workflows/build_test.yml | 36 -------------------------------- 1 file changed, 36 deletions(-) delete mode 100644 .github/workflows/build_test.yml diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml deleted file mode 100644 index 54fba73b5e..0000000000 --- a/.github/workflows/build_test.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Build and Test - -on: - pull_request - -jobs: - test: - runs-on: ubuntu-latest - - steps: - - name: Checkout PR Branch - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 - - - name: Setup Java 8 - uses: actions/setup-java@v1 - with: - java-version: 8 - java-package: jdk - architecture: x64 - - - name: Build and Test - uses: GabrielBB/xvfb-action@v1 - with: - run: mvn clean install -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true - - - name: Archive Test Artifacts - uses: actions/upload-artifact@v2 - with: - name: test-reports - path: | - **/*target/surefire-reports/ - **/*.log - From 3350d780afd4262c27ded056c7c61154ada2468c Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 24 Jun 2021 12:51:57 +0200 Subject: [PATCH 242/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.JavaFormatter.TestCase' Signed-off-by: Koen Aers --- .../tool/ant/JavaFormatter/TestCase.java | 116 ++++++++++-------- 1 file changed, 68 insertions(+), 48 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/ant/JavaFormatter/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/ant/JavaFormatter/TestCase.java index 0e52a5a814..4b3d5d7a3a 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/ant/JavaFormatter/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/ant/JavaFormatter/TestCase.java @@ -1,31 +1,51 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.ant.JavaFormatter; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import org.hibernate.tool.ide.formatting.DefaultJavaPrettyPrinterStrategy; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; - +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); } @@ -41,22 +61,22 @@ public void testJavaFormatFile() { project.setProperty("resourcesDir", resourcesDir.getAbsolutePath()); File simpleOne = new File(destinationDir, "formatting/SimpleOne.java"); - Assert.assertFalse(simpleOne.exists()); + assertFalse(simpleOne.exists()); project.executeTarget("copyfiles"); String log = AntUtil.getLog(project); - Assert.assertFalse(log.contains("Exception")); + assertFalse(log.contains("Exception")); - Assert.assertTrue(simpleOne.exists()); - Assert.assertFalse(FileUtil + assertTrue(simpleOne.exists()); + assertFalse(FileUtil .findFirstString("public", simpleOne) .contains("SimpleOne")); DefaultJavaPrettyPrinterStrategy formatter = new DefaultJavaPrettyPrinterStrategy(null); formatter.formatFile( simpleOne ); - Assert.assertTrue(FileUtil + assertTrue(FileUtil .findFirstString("public", simpleOne) .contains("SimpleOne")); @@ -74,28 +94,28 @@ public void testJavaJdk5FormatFile() { project.setProperty("resourcesDir", resourcesDir.getAbsolutePath()); File simple5One = new File(destinationDir, "formatting/Simple5One.java"); - Assert.assertFalse(simple5One.exists()); + assertFalse(simple5One.exists()); project.executeTarget("copyfiles"); String log = AntUtil.getLog(project); - Assert.assertFalse(log.contains("Exception")); + assertFalse(log.contains("Exception")); - Assert.assertTrue(simple5One.exists()); - Assert.assertFalse(FileUtil + assertTrue(simple5One.exists()); + assertFalse(FileUtil .findFirstString("public", simple5One) .contains("Simple5One")); project.executeTarget("copyfiles"); - Assert.assertFalse(log.contains("Exception")); + assertFalse(log.contains("Exception")); DefaultJavaPrettyPrinterStrategy formatter = new DefaultJavaPrettyPrinterStrategy(null); - Assert.assertTrue( - "formatting should pass when using default settings", - formatter.formatFile(simple5One)); + assertTrue( + formatter.formatFile(simple5One), + "formatting should pass when using default settings"); - Assert.assertTrue(FileUtil + assertTrue(FileUtil .findFirstString("public", simple5One) .contains("Simple5One")); } @@ -112,21 +132,21 @@ public void testAntFormatTask() { project.setProperty("resourcesDir", resourcesDir.getAbsolutePath()); File simpleOne = new File(destinationDir, "formatting/SimpleOne.java"); - Assert.assertFalse(simpleOne.exists()); + assertFalse(simpleOne.exists()); project.executeTarget("copyfiles"); String log = AntUtil.getLog(project); - Assert.assertFalse(log.contains("Exception")); + assertFalse(log.contains("Exception")); - Assert.assertTrue(simpleOne.exists()); - Assert.assertFalse(FileUtil + assertTrue(simpleOne.exists()); + assertFalse(FileUtil .findFirstString("public", simpleOne) .contains("SimpleOne")); project.executeTarget("formatfiles"); - Assert.assertTrue(FileUtil + assertTrue(FileUtil .findFirstString("public", simpleOne) .contains("SimpleOne")); @@ -144,58 +164,58 @@ public void testConfig() { project.setProperty("resourcesDir", resourcesDir.getAbsolutePath()); File simpleOne = new File(destinationDir, "formatting/SimpleOne.java"); - Assert.assertFalse(simpleOne.exists()); + assertFalse(simpleOne.exists()); File simple5One = new File(destinationDir, "formatting/Simple5One.java"); - Assert.assertFalse(simple5One.exists()); + assertFalse(simple5One.exists()); project.executeTarget("copyfiles"); String log = AntUtil.getLog(project); - Assert.assertFalse(log.contains("Exception")); + assertFalse(log.contains("Exception")); - Assert.assertTrue(simpleOne.exists()); - Assert.assertTrue(simple5One.exists()); + assertTrue(simpleOne.exists()); + assertTrue(simple5One.exists()); - Assert.assertFalse(FileUtil + assertFalse(FileUtil .findFirstString("public", simpleOne) .contains("SimpleOne")); - Assert.assertFalse(FileUtil + assertFalse(FileUtil .findFirstString("public", simple5One) .contains("Simple5One")); project.executeTarget("configtest"); log = AntUtil.getLog(project); - Assert.assertFalse(log.contains("Exception")); + assertFalse(log.contains("Exception")); - Assert.assertTrue(FileUtil + assertTrue(FileUtil .findFirstString("public", simpleOne) .contains("SimpleOne")); - Assert.assertTrue(FileUtil + assertTrue(FileUtil .findFirstString("public", simple5One) .contains("Simple5One")); - Assert.assertTrue(simpleOne.delete()); - Assert.assertTrue(simple5One.delete()); + assertTrue(simpleOne.delete()); + assertTrue(simple5One.delete()); project.executeTarget("copyfiles"); log = AntUtil.getLog(project); - Assert.assertFalse(log.contains("Exception")); + assertFalse(log.contains("Exception")); - Assert.assertFalse(FileUtil + assertFalse(FileUtil .findFirstString("public", simpleOne) .contains("SimpleOne")); - Assert.assertFalse(FileUtil + assertFalse(FileUtil .findFirstString("public", simple5One) .contains("Simple5One")); project.executeTarget("noconfigtest"); log = AntUtil.getLog(project); - Assert.assertFalse(log.contains("Exception")); + assertFalse(log.contains("Exception")); - Assert.assertTrue(FileUtil + assertTrue(FileUtil .findFirstString("public", simpleOne) .contains("SimpleOne")); - Assert.assertTrue(FileUtil + assertTrue(FileUtil .findFirstString("public", simple5One) .contains("Simple5One")); From 24dd41ead9965f9570fded62533ae13cf0ae83aa Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sat, 26 Jun 2021 14:32:41 +0200 Subject: [PATCH 243/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.NoConfig.TestCase' Signed-off-by: Koen Aers --- .../hibernate/tool/ant/NoConfig/TestCase.java | 51 +++++++++++++------ 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/ant/NoConfig/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/ant/NoConfig/TestCase.java index 3eaaedbbab..23b1446ec1 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/ant/NoConfig/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/ant/NoConfig/TestCase.java @@ -1,30 +1,51 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.ant.NoConfig; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + import java.io.File; import org.apache.tools.ant.BuildException; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; - +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); } @@ -40,20 +61,20 @@ public void testNoConfig() { project.setProperty("resourcesDir", resourcesDir.getAbsolutePath()); File generatedSchema = new File(destinationDir, "generated-schema.sql"); - Assert.assertFalse(generatedSchema.exists()); + assertFalse(generatedSchema.exists()); try { project.executeTarget("testNoConfig"); - Assert.fail("Exception should happen"); + fail("Exception should happen"); } catch (BuildException e) { - Assert.assertTrue(e.getMessage().contains("No configuration specified")); + assertTrue(e.getMessage().contains("No configuration specified")); } - Assert.assertFalse(generatedSchema.exists()); + assertFalse(generatedSchema.exists()); } From f627c4c51b5fdee5cb05d76e45c5d494287aceac Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sun, 27 Jun 2021 13:53:12 +0200 Subject: [PATCH 244/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.NoConnInfoExport.TestCase' Signed-off-by: Koen Aers --- .../tool/ant/NoConnInfoExport/TestCase.java | 48 +++++++++++++------ 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/ant/NoConnInfoExport/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/ant/NoConnInfoExport/TestCase.java index cd288eeb0f..9c41134b2c 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/ant/NoConnInfoExport/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/ant/NoConnInfoExport/TestCase.java @@ -1,30 +1,50 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.ant.NoConnInfoExport; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; - +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); } @@ -40,12 +60,12 @@ public void testNoConnInfoExport() { project.setProperty("resourcesDir", resourcesDir.getAbsolutePath()); File noConnInfo = new File(destinationDir, "noConnInfo.sql"); - Assert.assertFalse(noConnInfo.exists()); + assertFalse(noConnInfo.exists()); project.executeTarget("testNoConnInfoExport"); - Assert.assertTrue(noConnInfo.exists()); - Assert.assertTrue(FileUtil + assertTrue(noConnInfo.exists()); + assertTrue(FileUtil .findFirstString("create", noConnInfo) .contains("create table TopDown (id bigint not null, name varchar(255), primary key (id));")); } From 1f912dfdc3ac8a40b38612b86df78a2efe8f8628 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 28 Jun 2021 09:55:41 +0200 Subject: [PATCH 245/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.NoExporters.TestCase' Signed-off-by: Koen Aers --- .../tool/ant/NoExporters/TestCase.java | 43 ++++++++++++++----- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/ant/NoExporters/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/ant/NoExporters/TestCase.java index c749b633a6..7eed121b83 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/ant/NoExporters/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/ant/NoExporters/TestCase.java @@ -1,26 +1,47 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.ant.NoExporters; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + import java.io.File; import org.apache.tools.ant.BuildException; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); } @@ -37,12 +58,12 @@ public void testNoConnInfoExport() { try { project.executeTarget("testNoExporters"); - Assert.fail("should have failed with no exporters!"); + fail("should have failed with no exporters!"); } catch (BuildException e) { // should happen! - Assert.assertTrue(e.getMessage().indexOf("No exporters specified")>=0); + assertTrue(e.getMessage().indexOf("No exporters specified")>=0); } From df8a2faaabd94e879a540a180c6fe7e3c2cdcb0a Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 28 Jun 2021 10:12:05 +0200 Subject: [PATCH 246/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.cfg.MetaDataDialectFactoryTest.TestCase' Signed-off-by: Koen Aers --- .../MetaDataDialectFactoryTest/TestCase.java | 46 ++++++++++++++----- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/cfg/MetaDataDialectFactoryTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/cfg/MetaDataDialectFactoryTest/TestCase.java index f3e2d51a51..5d45b529dd 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/cfg/MetaDataDialectFactoryTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/cfg/MetaDataDialectFactoryTest/TestCase.java @@ -1,5 +1,28 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.cfg.MetaDataDialectFactoryTest; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; + import java.util.Properties; import org.hibernate.cfg.JDBCBinderException; @@ -17,8 +40,7 @@ import org.hibernate.dialect.Oracle10gDialect; import org.hibernate.dialect.Oracle8iDialect; import org.hibernate.dialect.Oracle9iDialect; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; public class TestCase { @@ -63,11 +85,11 @@ public void testCreateMetaDataDialectNonExistingOverride() { p.setProperty("hibernatetool.metadatadialect", "DoesNotExists"); try { MetaDataDialectFactory.createMetaDataDialect(new MySQL5Dialect(), p); - Assert.fail(); + fail(); } catch (JDBCBinderException jbe) { // expected } catch(Exception e) { - Assert.fail(); + fail(); } } @@ -126,33 +148,33 @@ public void testFromDialectName() { private void assertSameClass(Class clazz, Object instance) { if(clazz==null && instance==null) { - Assert.assertEquals((Object)null, (Object)null); + assertEquals((Object)null, (Object)null); return; } if(clazz==null) { - Assert.assertEquals(null, instance); + assertEquals(null, instance); return; } if(instance==null) { - Assert.assertEquals(clazz.getCanonicalName(), null); + assertEquals(clazz.getCanonicalName(), null); return; } - Assert.assertEquals(clazz.getCanonicalName(), instance.getClass().getName()); + assertEquals(clazz.getCanonicalName(), instance.getClass().getName()); } private void assertSameClass(String msg, Class clazz, Object instance) { if(clazz==null && instance==null) { - Assert.assertEquals((Object)null, (Object)null); + assertEquals((Object)null, (Object)null); return; } if(clazz==null) { - Assert.assertEquals(msg, null, instance); + assertEquals(null, instance, msg); return; } if(instance==null) { - Assert.assertEquals(msg, clazz.getCanonicalName(), null); + assertEquals(clazz.getCanonicalName(), null, msg); return; } - Assert.assertEquals(msg, clazz.getCanonicalName(), instance.getClass().getName()); + assertEquals(clazz.getCanonicalName(), instance.getClass().getName(), msg); } } From 719a91b3ca02d15d2a6b4c48f654393c56bba676 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 28 Jun 2021 11:05:03 +0200 Subject: [PATCH 247/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.cfg.reveng.ReverseEngineeringStrategyUtilTest.TestCase' Signed-off-by: Koen Aers --- .../TestCase.java | 42 ++++++++++++++----- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/cfg/reveng/ReverseEngineeringStrategyUtilTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/cfg/reveng/ReverseEngineeringStrategyUtilTest/TestCase.java index 361174739d..331b94eb3d 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/cfg/reveng/ReverseEngineeringStrategyUtilTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/cfg/reveng/ReverseEngineeringStrategyUtilTest/TestCase.java @@ -1,27 +1,47 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.cfg.reveng.ReverseEngineeringStrategyUtilTest; -import org.hibernate.cfg.reveng.ReverseEngineeringStrategyUtil; -import org.junit.Assert; -import org.junit.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import org.hibernate.cfg.reveng.ReverseEngineeringStrategyUtil; +import org.junit.jupiter.api.Test; public class TestCase { @Test public void testSimplePluralizeWithSingleH() throws Exception { String plural = ReverseEngineeringStrategyUtil.simplePluralize("h"); - Assert.assertEquals("hs", plural); + assertEquals("hs", plural); } @Test public void testPluralize(){ - Assert.assertEquals("boxes", ReverseEngineeringStrategyUtil.simplePluralize("box")); - Assert.assertEquals("buses", ReverseEngineeringStrategyUtil.simplePluralize("bus")); - Assert.assertEquals("keys", ReverseEngineeringStrategyUtil.simplePluralize("key")); - Assert.assertEquals("countries", ReverseEngineeringStrategyUtil.simplePluralize("country")); - Assert.assertEquals("churches", ReverseEngineeringStrategyUtil.simplePluralize("church")); - Assert.assertEquals("bushes", ReverseEngineeringStrategyUtil.simplePluralize("bush")); - Assert.assertEquals("roofs", ReverseEngineeringStrategyUtil.simplePluralize("roof")); + assertEquals("boxes", ReverseEngineeringStrategyUtil.simplePluralize("box")); + assertEquals("buses", ReverseEngineeringStrategyUtil.simplePluralize("bus")); + assertEquals("keys", ReverseEngineeringStrategyUtil.simplePluralize("key")); + assertEquals("countries", ReverseEngineeringStrategyUtil.simplePluralize("country")); + assertEquals("churches", ReverseEngineeringStrategyUtil.simplePluralize("church")); + assertEquals("bushes", ReverseEngineeringStrategyUtil.simplePluralize("bush")); + assertEquals("roofs", ReverseEngineeringStrategyUtil.simplePluralize("roof")); } } \ No newline at end of file From 8a90200a3a21d10b9067ca4995d42d9fa194bfb3 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 28 Jun 2021 11:20:56 +0200 Subject: [PATCH 248/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.DocExporterTest.TestCase' Signed-off-by: Koen Aers --- .../tool/hbm2x/DocExporterTest/TestCase.java | 121 +++++++++++------- 1 file changed, 73 insertions(+), 48 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/DocExporterTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/DocExporterTest/TestCase.java index d118ab23ec..174207fbfc 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/DocExporterTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/DocExporterTest/TestCase.java @@ -1,5 +1,32 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.DocExporterTest; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + import java.io.File; import java.io.FileInputStream; import java.io.IOException; @@ -14,11 +41,9 @@ import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; import org.xml.sax.EntityResolver; import org.xml.sax.ErrorHandler; import org.xml.sax.InputSource; @@ -41,19 +66,19 @@ public class TestCase { "DependentValue.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); - private File outputDir = null; + private File srcDir = null; private File resourcesDir = null; private boolean ignoreDot; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "src"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); @@ -74,59 +99,59 @@ public void setUp() throws Exception { properties.setProperty("dot.ignoreerror", Boolean.toString(ignoreDot)); exporter.getProperties().putAll(properties); exporter.setMetadataDescriptor(metadataDescriptor); - exporter.setOutputDirectory(outputDir); + exporter.setOutputDirectory(srcDir); exporter.start(); } @Test public void testExporter() { - JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "index.html") ); - JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "assets/doc-style.css") ); - JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "assets/hibernate_logo.gif") ); - JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "tables/default/summary.html") ); - JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "tables/default/Customer.html") ); - Assert.assertFalse(new File(outputDir, "tables/default/UPerson.html").exists() ); - JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "tables/CROWN/CROWN_USERS.html") ); - JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "entities/org/hibernate/tool/hbm2x/Customer.html") ); - Assert.assertTrue(new File(outputDir, "entities/org/hibernate/tool/hbm2x/UPerson.html").exists() ); - JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "entities/org/hibernate/tool/hbm2x/UUser.html") ); + JUnitUtil.assertIsNonEmptyFile(new File(srcDir, "index.html") ); + JUnitUtil.assertIsNonEmptyFile(new File(srcDir, "assets/doc-style.css") ); + JUnitUtil.assertIsNonEmptyFile(new File(srcDir, "assets/hibernate_logo.gif") ); + JUnitUtil.assertIsNonEmptyFile(new File(srcDir, "tables/default/summary.html") ); + JUnitUtil.assertIsNonEmptyFile(new File(srcDir, "tables/default/Customer.html") ); + assertFalse(new File(srcDir, "tables/default/UPerson.html").exists() ); + JUnitUtil.assertIsNonEmptyFile(new File(srcDir, "tables/CROWN/CROWN_USERS.html") ); + JUnitUtil.assertIsNonEmptyFile(new File(srcDir, "entities/org/hibernate/tool/hbm2x/Customer.html") ); + assertTrue(new File(srcDir, "entities/org/hibernate/tool/hbm2x/UPerson.html").exists() ); + JUnitUtil.assertIsNonEmptyFile(new File(srcDir, "entities/org/hibernate/tool/hbm2x/UUser.html") ); if (!ignoreDot) { - JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "entities/entitygraph.dot")); - JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "entities/entitygraph.png")); - JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "tables/tablegraph.dot")); - JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "tables/tablegraph.png")); + JUnitUtil.assertIsNonEmptyFile(new File(srcDir, "entities/entitygraph.dot")); + JUnitUtil.assertIsNonEmptyFile(new File(srcDir, "entities/entitygraph.png")); + JUnitUtil.assertIsNonEmptyFile(new File(srcDir, "tables/tablegraph.dot")); + JUnitUtil.assertIsNonEmptyFile(new File(srcDir, "tables/tablegraph.png")); } - checkHtml(outputDir); + checkHtml(srcDir); } @Test public void testCommentIncluded() { - // A unique customer comment! - File tableFile = new File(outputDir, "tables/default/Customer.html"); - JUnitUtil.assertIsNonEmptyFile(tableFile ); - Assert.assertNotNull(FileUtil.findFirstString("A unique customer comment!", tableFile)); + // A unique customer comment! + File tableFile = new File(srcDir, "tables/default/Customer.html"); + JUnitUtil.assertIsNonEmptyFile(tableFile ); + assertNotNull(FileUtil.findFirstString("A unique customer comment!", tableFile)); } @Test public void testGenericsRenderedCorrectly() { - // A unique customer comment! - File tableFile = new File(outputDir, "entities/org/hibernate/tool/hbm2x/Customer.html"); - JUnitUtil.assertIsNonEmptyFile(tableFile); - Assert.assertNull( - "Generics syntax should not occur verbatim in html", - FileUtil.findFirstString("List<", tableFile)); - Assert.assertNotNull( - "Generics syntax occur verbatim in html", - FileUtil.findFirstString("List<", tableFile)); + // A unique customer comment! + File tableFile = new File(srcDir, "entities/org/hibernate/tool/hbm2x/Customer.html"); + JUnitUtil.assertIsNonEmptyFile(tableFile); + assertNull( + FileUtil.findFirstString("List<", tableFile), + "Generics syntax should not occur verbatim in html"); + assertNotNull( + FileUtil.findFirstString("List<", tableFile), + "Generics syntax occur verbatim in html"); } @Test public void testInheritedProperties() { - File entityFile = new File(outputDir, "entities/org/hibernate/tool/hbm2x/UUser.html"); + File entityFile = new File(srcDir, "entities/org/hibernate/tool/hbm2x/UUser.html"); JUnitUtil.assertIsNonEmptyFile(entityFile); - Assert.assertNotNull( - "Missing inherited property", - FileUtil.findFirstString("firstName", entityFile)); + assertNotNull( + FileUtil.findFirstString("firstName", entityFile), + "Missing inherited property"); } private void checkHtml(File file) { @@ -142,10 +167,10 @@ private void checkHtml(File file) { parser.setErrorHandler(handler); parser.setEntityResolver(new TestResolver()); parser.parse(new InputSource(new FileInputStream(file))); - Assert.assertEquals(file + "has errors ", 0, handler.errors); - Assert.assertEquals(file + "has warnings ", 0, handler.warnings); + assertEquals(0, handler.errors, file + "has errors "); + assertEquals(0, handler.warnings, file + "has warnings "); } catch (Exception e) { - Assert.fail(e.getMessage()); + fail(e.getMessage()); } } } From b1bd9006721b9fea8a8fca9edcae8a05c1d5911a Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 28 Jun 2021 12:09:21 +0200 Subject: [PATCH 249/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.GenericExporterTest.TestCase' Signed-off-by: Koen Aers --- .../hbm2x/GenericExporterTest/TestCase.java | 78 ++++++++++++------- 1 file changed, 49 insertions(+), 29 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/GenericExporterTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/GenericExporterTest/TestCase.java index 05afe4c136..465dd32c4a 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/GenericExporterTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/GenericExporterTest/TestCase.java @@ -1,9 +1,31 @@ /* - * Created on 2004-12-01 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.GenericExporterTest; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; @@ -17,11 +39,9 @@ import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author max @@ -35,19 +55,19 @@ public class TestCase { "HelloWorld.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); - + @TempDir + public File outputFolder = new File("output"); + private MetadataDescriptor metadataDescriptor = null; private File outputDir = null; private File resourcesDir = null; private String resourcesLocation = null; - @Before + @BeforeEach public void setUp() { - outputDir = new File(temporaryFolder.getRoot(), "output"); + outputDir = new File(outputFolder, "src"); outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); @@ -64,10 +84,10 @@ public void testSingleFileGeneration() { ge.start(); JUnitUtil.assertIsNonEmptyFile(new File( outputDir,"artifacts.txt")); JUnitUtil.assertIsNonEmptyFile(new File( outputDir, "templates.txt")); - Assert.assertEquals( + assertEquals( null, FileUtil.findFirstString("$", new File(outputDir, "artifacts.txt"))); - Assert.assertEquals( + assertEquals( "File for artifacts in " + Version.getDefault().getVersion(), FileUtil.findFirstString("artifacts", new File( outputDir, "artifacts.txt"))); } @@ -127,14 +147,14 @@ public void testForEachGeneration() { JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "org/hibernate/tool/hbm2x/genericAuthor.txt")); JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "org/hibernate/tool/hbm2x/genericArticle.txt")); JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "org/hibernate/tool/hbm2x/genericArticle.txt")); - Assert.assertFalse( - "component file should not exist", - new File(outputDir, "genericUniversalAddress.txt" ).exists()); + assertFalse( + new File(outputDir, "genericUniversalAddress.txt" ).exists(), + "component file should not exist"); JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "genericHelloUniverse.txt" ) ); try { ge.setForEach( "does, not, exist" ); ge.start(); - Assert.fail(); + fail(); } catch(Exception e) { //e.printStackTrace(); //expected @@ -151,23 +171,23 @@ public void testForEachWithExceptionGeneration() { try { ge.setForEach("entity"); ge.start(); - Assert.fail(); + fail(); } catch(ExporterException e) { - Assert.assertTrue(e.getMessage().startsWith("Error while processing Entity:")); + assertTrue(e.getMessage().startsWith("Error while processing Entity:")); } try { ge.setForEach("component"); ge.start(); - Assert.fail(); + fail(); } catch(ExporterException e) { - Assert.assertTrue(e.getMessage().startsWith("Error while processing Component: UniversalAddress")); + assertTrue(e.getMessage().startsWith("Error while processing Component: UniversalAddress")); } try { ge.setForEach("configuration"); ge.start(); - Assert.fail(); + fail(); } catch(ExporterException e) { - Assert.assertTrue(e.getMessage().startsWith("Error while processing Configuration")); + assertTrue(e.getMessage().startsWith("Error while processing Configuration")); } } @@ -195,11 +215,11 @@ public void testPropertySet() throws FileNotFoundException, IOException { is.close(); } } - Assert.assertEquals(generated.getProperty("booleanProperty"), "true"); - Assert.assertEquals(generated.getProperty("hibernatetool.booleanProperty"), "true"); - Assert.assertNull(generated.getProperty("booleanWasTrue")); - Assert.assertEquals(generated.getProperty("myTool.value"), "value"); - Assert.assertEquals(generated.getProperty("refproperty"), "proptest=A value"); + assertEquals(generated.getProperty("booleanProperty"), "true"); + assertEquals(generated.getProperty("hibernatetool.booleanProperty"), "true"); + assertNull(generated.getProperty("booleanWasTrue")); + assertEquals(generated.getProperty("myTool.value"), "value"); + assertEquals(generated.getProperty("refproperty"), "proptest=A value"); } } From 432ee822c9b91f1c1b50efbef39ac2526d46b39f Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 28 Jun 2021 12:36:58 +0200 Subject: [PATCH 250/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.HashcodeEqualsTest.TestCase' Signed-off-by: Koen Aers --- .../hbm2x/HashcodeEqualsTest/TestCase.java | 65 ++++++++++++------- 1 file changed, 41 insertions(+), 24 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/HashcodeEqualsTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/HashcodeEqualsTest/TestCase.java index b1c9481458..d6743dabf8 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/HashcodeEqualsTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/HashcodeEqualsTest/TestCase.java @@ -1,9 +1,28 @@ /* - * Created on 2004-12-01 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.HashcodeEqualsTest; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; + import java.io.File; import org.hibernate.tool.api.metadata.MetadataDescriptor; @@ -14,11 +33,9 @@ import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; import org.hibernate.tools.test.util.JavaUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author max @@ -30,25 +47,25 @@ public class TestCase { "HashEquals.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); - private File outputDir = null; + private File srcDir = null; private File resourcesDir = null; private ArtifactCollector artifactCollector = null; private MetadataDescriptor metadataDescriptor = null; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "output"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); Exporter exporter = new POJOExporter(); exporter.setMetadataDescriptor(metadataDescriptor); - exporter.setOutputDirectory(outputDir); + exporter.setOutputDirectory(srcDir); artifactCollector = new ArtifactCollector(); exporter.setArtifactCollector(artifactCollector); exporter.start(); @@ -58,7 +75,7 @@ public void setUp() throws Exception { public void testJDK5FailureExpectedOnJDK4() { POJOExporter exporter = new POJOExporter(); exporter.setMetadataDescriptor(metadataDescriptor); - exporter.setOutputDirectory(outputDir); + exporter.setOutputDirectory(srcDir); exporter.getProperties().setProperty("jdk5", "true"); artifactCollector = new ArtifactCollector(); exporter.setArtifactCollector(artifactCollector); @@ -71,17 +88,17 @@ public void testJDK5FailureExpectedOnJDK4() { @Test public void testFileExistence() { JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, "org/hibernate/tool/hbm2x/HashEquals.java")); + srcDir, "org/hibernate/tool/hbm2x/HashEquals.java")); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, "org/hibernate/tool/hbm2x/Address.java")); - Assert.assertEquals(2, artifactCollector.getFileCount("java")); + srcDir, "org/hibernate/tool/hbm2x/Address.java")); + assertEquals(2, artifactCollector.getFileCount("java")); } @Test public void testCompilable() { - File compiled = new File(temporaryFolder.getRoot(), "compiled"); + File compiled = new File(outputFolder, "compiled"); compiled.mkdir(); - JavaUtil.compile(outputDir, compiled); + JavaUtil.compile(srcDir, compiled); JUnitUtil.assertIsNonEmptyFile(new File( compiled, "org/hibernate/tool/hbm2x/HashEquals.class")); JUnitUtil.assertIsNonEmptyFile(new File( @@ -90,17 +107,17 @@ public void testCompilable() { @Test public void testNoVelocityLeftOvers() { - Assert.assertNull(FileUtil + assertNull(FileUtil .findFirstString( "$", new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/HashEquals.java"))); - Assert.assertNull(FileUtil + assertNull(FileUtil .findFirstString( "$", new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/Address.java"))); } From 2c459a21e89e32d04774dcc5ec92856861a16eaf Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 28 Jun 2021 13:44:28 +0200 Subject: [PATCH 251/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.Hbm2CfgTest.TestCase' Signed-off-by: Koen Aers --- .../tool/hbm2x/Hbm2CfgTest/TestCase.java | 75 ++++++++++++------- 1 file changed, 46 insertions(+), 29 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2CfgTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2CfgTest/TestCase.java index 32b5dd7957..c94ca98e7e 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2CfgTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2CfgTest/TestCase.java @@ -1,9 +1,29 @@ /* - * Created on 2004-12-01 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.Hbm2CfgTest; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; + import java.io.File; import java.util.Properties; @@ -15,11 +35,9 @@ import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author max @@ -31,25 +49,25 @@ public class TestCase { "HelloWorld.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); - - private File outputDir = null; + @TempDir + public File outputFolder = new File("output"); + + private File srcDir = null; private File resourcesDir = null; private HibernateConfigurationExporter cfgexporter; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "src"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); cfgexporter = new HibernateConfigurationExporter(); cfgexporter.setMetadataDescriptor(metadataDescriptor); - cfgexporter.setOutputDirectory(outputDir); + cfgexporter.setOutputDirectory(srcDir); cfgexporter.start(); } @@ -65,17 +83,17 @@ public void testMagicPropertyHandling() { properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); exporter.setMetadataDescriptor(MetadataDescriptorFactory .createNativeDescriptor(null, null, properties)); - exporter.setOutputDirectory(outputDir); + exporter.setOutputDirectory(srcDir); exporter.start(); - File file = new File(outputDir, "hibernate.cfg.xml"); - Assert.assertNull( + File file = new File(srcDir, "hibernate.cfg.xml"); + assertNull( FileUtil.findFirstString( Environment.SESSION_FACTORY_NAME, file )); - Assert.assertNotNull( + assertNotNull( FileUtil.findFirstString( "hibernate.basic\">aValue<", file )); - Assert.assertNull( + assertNull( FileUtil.findFirstString( Environment.HBM2DDL_AUTO, file )); - Assert.assertNull( + assertNull( FileUtil.findFirstString("hibernate.temp.use_jdbc_metadata_defaults", file )); exporter = new HibernateConfigurationExporter(); properties = exporter.getProperties(); @@ -84,9 +102,9 @@ public void testMagicPropertyHandling() { properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); exporter.setMetadataDescriptor(MetadataDescriptorFactory .createNativeDescriptor(null, null, properties)); - exporter.setOutputDirectory(outputDir); + exporter.setOutputDirectory(srcDir); exporter.start(); - Assert.assertNotNull( + assertNotNull( FileUtil.findFirstString( Environment.HBM2DDL_AUTO, file )); exporter = new HibernateConfigurationExporter(); properties = exporter.getProperties(); @@ -95,26 +113,25 @@ public void testMagicPropertyHandling() { properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); exporter.setMetadataDescriptor(MetadataDescriptorFactory .createNativeDescriptor(null, null, properties)); - exporter.setOutputDirectory(outputDir); + exporter.setOutputDirectory(srcDir); exporter.start(); - Assert.assertNull( + assertNull( FileUtil.findFirstString( AvailableSettings.TRANSACTION_COORDINATOR_STRATEGY, file )); } @Test public void testFileExistence() { - JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "hibernate.cfg.xml") ); + JUnitUtil.assertIsNonEmptyFile(new File(srcDir, "hibernate.cfg.xml") ); } @Test public void testArtifactCollection() { - Assert.assertEquals(1, cfgexporter.getArtifactCollector().getFileCount("cfg.xml")); + assertEquals(1, cfgexporter.getArtifactCollector().getFileCount("cfg.xml")); } - @SuppressWarnings("el-syntax") @Test public void testNoVelocityLeftOvers() { - Assert.assertNull(FileUtil.findFirstString("${",new File(outputDir, "hibernate.cfg.xml"))); + assertNull(FileUtil.findFirstString("${",new File(srcDir, "hibernate.cfg.xml"))); } } From d4a841a6715fa2631055877c65c407610de2acaa Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 28 Jun 2021 14:15:18 +0200 Subject: [PATCH 252/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.Hbm2DaoTest' Signed-off-by: Koen Aers --- .../tool/hbm2x/Hbm2DaoTest/TestCase.java | 79 +++++++++++-------- 1 file changed, 48 insertions(+), 31 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2DaoTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2DaoTest/TestCase.java index eb5f7c4ac6..27d376b63a 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2DaoTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2DaoTest/TestCase.java @@ -1,9 +1,28 @@ /* - * Created on 2004-12-01 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.Hbm2DaoTest; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import java.io.IOException; @@ -14,11 +33,9 @@ import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; import org.hibernate.tools.test.util.JavaUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author max @@ -31,26 +48,26 @@ public class TestCase { "Author.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); - private File outputDir; + private File srcDir; private File resourcesDir; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "src"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); POJOExporter javaExporter = new POJOExporter(); javaExporter.setMetadataDescriptor(metadataDescriptor); - javaExporter.setOutputDirectory(outputDir); + javaExporter.setOutputDirectory(srcDir); POJOExporter exporter = new DAOExporter(); exporter.setMetadataDescriptor(metadataDescriptor); - exporter.setOutputDirectory(outputDir); + exporter.setOutputDirectory(srcDir); exporter.getProperties().setProperty("ejb3", "false"); exporter.getProperties().setProperty("jdk5", "true"); exporter.start(); @@ -60,47 +77,47 @@ public void setUp() throws Exception { @Test public void testFileExistence() { JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, "org/hibernate/tool/hbm2x/ArticleHome.java")); + srcDir, "org/hibernate/tool/hbm2x/ArticleHome.java")); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, "org/hibernate/tool/hbm2x/AuthorHome.java")); + srcDir, "org/hibernate/tool/hbm2x/AuthorHome.java")); } @Test public void testCompilable() throws IOException { - File compiled = new File(temporaryFolder.getRoot(), "compiled"); + File compiled = new File(outputFolder, "compiled"); compiled.mkdir(); - FileUtil.generateNoopComparator(outputDir); - JavaUtil.compile(outputDir, compiled); - Assert.assertTrue(new File(compiled, "org/hibernate/tool/hbm2x/Article.class").exists()); - Assert.assertTrue(new File(compiled, "org/hibernate/tool/hbm2x/ArticleHome.class").exists()); - Assert.assertTrue(new File(compiled, "org/hibernate/tool/hbm2x/Author.class").exists()); - Assert.assertTrue(new File(compiled, "org/hibernate/tool/hbm2x/AuthorHome.class").exists()); - Assert.assertTrue(new File(compiled, "comparator/NoopComparator.class").exists()); + FileUtil.generateNoopComparator(srcDir); + JavaUtil.compile(srcDir, compiled); + assertTrue(new File(compiled, "org/hibernate/tool/hbm2x/Article.class").exists()); + assertTrue(new File(compiled, "org/hibernate/tool/hbm2x/ArticleHome.class").exists()); + assertTrue(new File(compiled, "org/hibernate/tool/hbm2x/Author.class").exists()); + assertTrue(new File(compiled, "org/hibernate/tool/hbm2x/AuthorHome.class").exists()); + assertTrue(new File(compiled, "comparator/NoopComparator.class").exists()); } @Test public void testNoVelocityLeftOvers() { - Assert.assertNull(FileUtil + assertNull(FileUtil .findFirstString( "$", new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/ArticleHome.java"))); - Assert.assertNull(FileUtil + assertNull(FileUtil .findFirstString( "$", new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/AuthorHome.java"))); } @Test public void testNamedQueries() { - Assert.assertTrue(FileUtil + assertTrue(FileUtil .findFirstString( "findByNameAndAddress", new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/AuthorHome.java") ) .trim().startsWith("public List" )); } From 83218b4a998bdbc15ceb210e1457d302a3701224 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 28 Jun 2021 14:29:37 +0200 Subject: [PATCH 253/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.Hbm2EJBDaoTest.TestCase' Signed-off-by: Koen Aers --- .../tool/hbm2x/Hbm2EJBDaoTest/TestCase.java | 77 +++++++++++-------- 1 file changed, 47 insertions(+), 30 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2EJBDaoTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2EJBDaoTest/TestCase.java index 4df7caabdf..3b88845dcc 100755 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2EJBDaoTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2EJBDaoTest/TestCase.java @@ -1,9 +1,28 @@ /* - * Created on 2004-12-01 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.Hbm2EJBDaoTest; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import java.io.IOException; import java.util.ArrayList; @@ -19,11 +38,9 @@ import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; import org.hibernate.tools.test.util.JavaUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author max @@ -36,26 +53,26 @@ public class TestCase { "Author.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); - private File outputDir = null; - private File resourcesDir = null; + private File srcDir; + private File resourcesDir; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "src"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); POJOExporter javaExporter = new POJOExporter(); javaExporter.setMetadataDescriptor(metadataDescriptor); - javaExporter.setOutputDirectory(outputDir); + javaExporter.setOutputDirectory(srcDir); POJOExporter exporter = new DAOExporter(); exporter.setMetadataDescriptor(metadataDescriptor); - exporter.setOutputDirectory(outputDir); + exporter.setOutputDirectory(srcDir); exporter.getProperties().setProperty("ejb3", "true"); exporter.getProperties().setProperty("jdk5", "true"); exporter.start(); @@ -65,40 +82,40 @@ public void setUp() throws Exception { @Test public void testFileExistence() { JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, "org/hibernate/tool/hbm2x/ArticleHome.java")); + srcDir, "org/hibernate/tool/hbm2x/ArticleHome.java")); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, "org/hibernate/tool/hbm2x/AuthorHome.java")); + srcDir, "org/hibernate/tool/hbm2x/AuthorHome.java")); } @Test public void testCompilable() throws IOException { - File compiled = new File(temporaryFolder.getRoot(), "compiled"); + File compiled = new File(outputFolder, "compiled"); compiled.mkdir(); - FileUtil.generateNoopComparator(outputDir); + FileUtil.generateNoopComparator(srcDir); List jars = new ArrayList(); jars.add(JavaUtil.resolvePathToJarFileFor(Persistence.class)); // for jpa api jars.add(JavaUtil.resolvePathToJarFileFor(EJB.class)); // for javaee api - JavaUtil.compile(outputDir, compiled); - Assert.assertTrue(new File(compiled, "org/hibernate/tool/hbm2x/Article.class").exists()); - Assert.assertTrue(new File(compiled, "org/hibernate/tool/hbm2x/ArticleHome.class").exists()); - Assert.assertTrue(new File(compiled, "org/hibernate/tool/hbm2x/Author.class").exists()); - Assert.assertTrue(new File(compiled, "org/hibernate/tool/hbm2x/AuthorHome.class").exists()); - Assert.assertTrue(new File(compiled, "comparator/NoopComparator.class").exists()); + JavaUtil.compile(srcDir, compiled); + assertTrue(new File(compiled, "org/hibernate/tool/hbm2x/Article.class").exists()); + assertTrue(new File(compiled, "org/hibernate/tool/hbm2x/ArticleHome.class").exists()); + assertTrue(new File(compiled, "org/hibernate/tool/hbm2x/Author.class").exists()); + assertTrue(new File(compiled, "org/hibernate/tool/hbm2x/AuthorHome.class").exists()); + assertTrue(new File(compiled, "comparator/NoopComparator.class").exists()); } @Test public void testNoVelocityLeftOvers() { - Assert.assertNull(FileUtil + assertNull(FileUtil .findFirstString( "$", new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/ArticleHome.java"))); - Assert.assertNull(FileUtil + assertNull(FileUtil .findFirstString( "$", new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/AuthorHome.java"))); } From 1b0f733d69eea1f9fd78fbc86112028d412efdaa Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 28 Jun 2021 18:31:09 +0200 Subject: [PATCH 254/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.hbm2hbmxml.AbstractTest.TestCase' Signed-off-by: Koen Aers --- .../hbm2x/hbm2hbmxml/AbstractTest/Car.java | 20 +++++ .../hbm2hbmxml/AbstractTest/CarPart.java | 20 +++++ .../hbm2hbmxml/AbstractTest/TestCase.java | 74 ++++++++++--------- 3 files changed, 80 insertions(+), 34 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/Car.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/Car.java index dd1e0c6aaa..d43ef2c004 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/Car.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/Car.java @@ -1,3 +1,23 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.AbstractTest; import java.io.ObjectStreamClass; diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/CarPart.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/CarPart.java index 77d943fb06..2f15f4db35 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/CarPart.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/CarPart.java @@ -1,3 +1,23 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.AbstractTest; import java.io.ObjectStreamClass; diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/TestCase.java index a6d054689c..bc8816d69c 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/TestCase.java @@ -1,21 +1,28 @@ /* - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.AbstractTest; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + import java.io.File; import java.util.ArrayList; import java.util.Properties; @@ -33,11 +40,9 @@ import org.hibernate.tool.hbm2x.HibernateMappingExporter; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; @@ -52,41 +57,41 @@ public class TestCase { "Car.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); - private File outputDir = null; + private File srcDir = null; private File resourcesDir = null; private Exporter hbmexporter = null; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "output"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); hbmexporter = new HibernateMappingExporter(); hbmexporter.setMetadataDescriptor(metadataDescriptor); - hbmexporter.setOutputDirectory(outputDir); + hbmexporter.setOutputDirectory(srcDir); hbmexporter.start(); } @Test public void testAllFilesExistence() { JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/Car.hbm.xml") ); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/CarPart.hbm.xml") ); } @Test public void testAbstractPresent() throws Exception { File outputXml = new File( - outputDir, + srcDir, "/org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/CarPart.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -96,25 +101,26 @@ public void testAbstractPresent() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals( "Expected to get one class element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one class element"); Element node = (Element)nodeList.item(0); - Assert.assertNotNull(node.getAttribute("abstract"), "Abstract attrinute was not exported."); - Assert.assertEquals(node.getAttribute("abstract"), "true"); + assertNotNull(node.getAttribute("abstract"), "Abstract attrinute was not exported."); + assertEquals(node.getAttribute("abstract"), "true"); } + @Test public void testReadable() { ArrayList files = new ArrayList(4); files.add(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/Car.hbm.xml")); files.add(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/CarPart.hbm.xml")); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); - Assert.assertNotNull(metadataDescriptor.createMetadata()); + assertNotNull(metadataDescriptor.createMetadata()); } } From a20365d91b13dee7ec4cb634fc9533c43a8b823d Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 28 Jun 2021 19:49:22 +0200 Subject: [PATCH 255/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.hbm2hbmxml.BackrefTest.TestCase' Signed-off-by: Koen Aers --- .../hbm2x/hbm2hbmxml/BackrefTest/Car.java | 20 ++++++ .../hbm2x/hbm2hbmxml/BackrefTest/CarPart.java | 20 ++++++ .../hbm2hbmxml/BackrefTest/TestCase.java | 67 ++++++++++--------- 3 files changed, 76 insertions(+), 31 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/Car.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/Car.java index c22d13fa09..f1c6f414df 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/Car.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/Car.java @@ -1,3 +1,23 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.BackrefTest; import java.io.ObjectStreamClass; diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/CarPart.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/CarPart.java index 5a06a40539..a6fe612a49 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/CarPart.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/CarPart.java @@ -1,3 +1,23 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.BackrefTest; import java.io.ObjectStreamClass; diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/TestCase.java index 70db4c999f..b8816ebfd9 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/TestCase.java @@ -1,21 +1,28 @@ /* - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.BackrefTest; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import java.util.ArrayList; import java.util.Iterator; @@ -31,11 +38,9 @@ import org.hibernate.tool.hbm2x.HibernateMappingExporter; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author Dmitry Geraskov @@ -47,36 +52,36 @@ public class TestCase { "Car.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private Metadata metadata = null; - private File outputDir = null; + private File srcDir = null; private File resourcesDir = null; private Exporter hbmexporter = null; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "src"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); metadata = metadataDescriptor.createMetadata(); hbmexporter = new HibernateMappingExporter(); hbmexporter.setMetadataDescriptor(metadataDescriptor); - hbmexporter.setOutputDirectory(outputDir); + hbmexporter.setOutputDirectory(srcDir); hbmexporter.start(); } @Test public void testAllFilesExistence() { JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/Car.hbm.xml") ); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/CarPart.hbm.xml") ); } @@ -88,24 +93,24 @@ public void testBackrefPresent() { while (iterator.hasNext() && !hasBackrefs) { hasBackrefs = (iterator.next() instanceof Backref); } - Assert.assertTrue("Class mapping should create Backref for this testcase", hasBackrefs); + assertTrue(hasBackrefs, "Class mapping should create Backref for this testcase"); } @Test public void testReadable() { ArrayList files = new ArrayList(4); files.add(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/Car.hbm.xml")); files.add(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/CarPart.hbm.xml")); Properties properties = new Properties(); properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); - Assert.assertNotNull(metadataDescriptor.createMetadata()); + assertNotNull(metadataDescriptor.createMetadata()); } } From 33273bc4c331b49cf46ea808d597d3e3bd283d10 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 28 Jun 2021 20:14:50 +0200 Subject: [PATCH 256/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.hbm2hbmxml.Cfg2HbmToolTest.TestCase' Signed-off-by: Koen Aers --- .../hbm2hbmxml/Cfg2HbmToolTest/TestCase.java | 35 +++++++++++++++---- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/Cfg2HbmToolTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/Cfg2HbmToolTest/TestCase.java index 9ee4abc683..7590a36832 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/Cfg2HbmToolTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/Cfg2HbmToolTest/TestCase.java @@ -1,6 +1,28 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.hbm2x.hbm2hbmxml.Cfg2HbmToolTest; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + import org.hibernate.mapping.JoinedSubclass; import org.hibernate.mapping.PersistentClass; import org.hibernate.mapping.RootClass; @@ -8,8 +30,7 @@ import org.hibernate.mapping.Subclass; import org.hibernate.mapping.UnionSubclass; import org.hibernate.tool.hbm2x.Cfg2HbmTool; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; /** * @author Dmitry Geraskov @@ -21,11 +42,11 @@ public class TestCase { public void testNeedsTable(){ Cfg2HbmTool c2h = new Cfg2HbmTool(); PersistentClass pc = new RootClass(null); - Assert.assertTrue(c2h.needsTable(pc)); - Assert.assertTrue(c2h.needsTable(new JoinedSubclass(pc, null))); - Assert.assertTrue(c2h.needsTable(new UnionSubclass(pc, null))); - Assert.assertFalse(c2h.needsTable(new SingleTableSubclass(pc, null))); - Assert.assertFalse(c2h.needsTable(new Subclass(pc, null))); + assertTrue(c2h.needsTable(pc)); + assertTrue(c2h.needsTable(new JoinedSubclass(pc, null))); + assertTrue(c2h.needsTable(new UnionSubclass(pc, null))); + assertFalse(c2h.needsTable(new SingleTableSubclass(pc, null))); + assertFalse(c2h.needsTable(new Subclass(pc, null))); } } From 830109d59e9962ba400d57dc0771df3c43152f43 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 28 Jun 2021 21:33:18 +0200 Subject: [PATCH 257/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.hbm2hbmxml.CompositeElementTest.TestCase' Signed-off-by: Koen Aers --- .../hbm2hbmxml/CompositeElementTest/Fee.java | 21 ++++- .../CompositeElementTest/FooComponent.java | 21 ++++- .../CompositeElementTest/GlarchProxy.java | 20 +++++ .../CompositeElementTest/TestCase.java | 83 ++++++++++--------- 4 files changed, 104 insertions(+), 41 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/Fee.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/Fee.java index 908a3491d4..e2beb80225 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/Fee.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/Fee.java @@ -1,4 +1,23 @@ -//$Id$ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.CompositeElementTest; import java.io.ObjectStreamClass; diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/FooComponent.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/FooComponent.java index a7f5ebfdb3..9afc590a3d 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/FooComponent.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/FooComponent.java @@ -1,4 +1,23 @@ -//$Id$ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.CompositeElementTest; import java.io.ObjectStreamClass; diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/GlarchProxy.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/GlarchProxy.java index e5df1fb63a..1aa9f47a72 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/GlarchProxy.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/GlarchProxy.java @@ -1,3 +1,23 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.CompositeElementTest; import java.util.List; diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/TestCase.java index 3daf07f290..11e02382e8 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/TestCase.java @@ -1,21 +1,28 @@ /* - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.CompositeElementTest; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + import java.io.File; import java.util.ArrayList; import java.util.Properties; @@ -33,11 +40,9 @@ import org.hibernate.tool.hbm2x.HibernateMappingExporter; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; @@ -53,35 +58,35 @@ public class TestCase { "Glarch.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); - private File outputDir = null; + private File srcDir = null; private File resourcesDir = null; private Exporter hbmexporter = null; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "output"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); hbmexporter = new HibernateMappingExporter(); hbmexporter.setMetadataDescriptor(metadataDescriptor); - hbmexporter.setOutputDirectory(outputDir); + hbmexporter.setOutputDirectory(srcDir); hbmexporter.start(); } @Test public void testAllFilesExistence() { JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/Fee.hbm.xml") ); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/Glarch.hbm.xml") ); } @@ -89,23 +94,23 @@ public void testAllFilesExistence() { public void testReadable() { ArrayList files = new ArrayList(4); files.add(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/Fee.hbm.xml")); files.add(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/Glarch.hbm.xml")); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); - Assert.assertNotNull(metadataDescriptor.createMetadata()); + assertNotNull(metadataDescriptor.createMetadata()); } @Test public void testCompositeElementNode() throws Exception { File outputXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/Glarch.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -117,7 +122,7 @@ public void testCompositeElementNode() throws Exception { .evaluate(document, XPathConstants.NODESET); Element secondList = (Element)nodeList.item(1); NodeList compositeElementList = secondList.getElementsByTagName("composite-element"); - Assert.assertEquals("Expected to get one composite-element element", 1, compositeElementList.getLength()); + assertEquals(1, compositeElementList.getLength(), "Expected to get one composite-element element"); Element compositeElement = (Element)compositeElementList.item(0); NodeList compositeElementChildNodes = compositeElement.getChildNodes(); int amountOfProperties = 0; @@ -125,17 +130,17 @@ public void testCompositeElementNode() throws Exception { Node node = compositeElementChildNodes.item(i); if ("property".equals(node.getNodeName())) amountOfProperties++; } - Assert.assertEquals("Expected to get two property element", 2, amountOfProperties); + assertEquals(2, amountOfProperties, "Expected to get two property element"); NodeList manyToOneList = secondList.getElementsByTagName("many-to-one"); - Assert.assertEquals(1, manyToOneList.getLength()); + assertEquals(1, manyToOneList.getLength()); Element manyToOneElement = (Element)manyToOneList.item(0); - Assert.assertEquals("fee", manyToOneElement.getAttribute("name")); - Assert.assertEquals("all", manyToOneElement.getAttribute("cascade")); + assertEquals("fee", manyToOneElement.getAttribute("name")); + assertEquals("all", manyToOneElement.getAttribute("cascade")); NodeList nestedCompositeElementList = compositeElement.getElementsByTagName("nested-composite-element"); - Assert.assertEquals(1, nestedCompositeElementList.getLength()); + assertEquals(1, nestedCompositeElementList.getLength()); Element nestedCompositeElement = (Element)nestedCompositeElementList.item(0); - Assert.assertEquals("subcomponent", nestedCompositeElement.getAttribute("name")); - Assert.assertEquals( + assertEquals("subcomponent", nestedCompositeElement.getAttribute("name")); + assertEquals( "org.hibernate.tool.hbm2x.hbm2hbmxml.CompositeElementTest.FooComponent", nestedCompositeElement.getAttribute("class")); } From ca53d9b15c9e1cce6025ec63a48a20e0ba357595 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 28 Jun 2021 22:02:34 +0200 Subject: [PATCH 258/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.hbm2hbmxml.DynamicComponentTest.TestCase' Signed-off-by: Koen Aers --- .../hbm2hbmxml/DynamicComponentTest/Fee.java | 21 ++++- .../DynamicComponentTest/FooComponent.java | 21 ++++- .../DynamicComponentTest/GlarchProxy.java | 20 +++++ .../DynamicComponentTest/TestCase.java | 77 ++++++++++--------- 4 files changed, 101 insertions(+), 38 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/Fee.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/Fee.java index ba73297aef..3c24bd11bb 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/Fee.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/Fee.java @@ -1,4 +1,23 @@ -//$Id$ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.DynamicComponentTest; import java.io.ObjectStreamClass; diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/FooComponent.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/FooComponent.java index 0076010d78..8a9687b5c5 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/FooComponent.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/FooComponent.java @@ -1,4 +1,23 @@ -//$Id$ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.DynamicComponentTest; import java.io.ObjectStreamClass; diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/GlarchProxy.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/GlarchProxy.java index 1fac2cfe33..28bb1eb6d8 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/GlarchProxy.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/GlarchProxy.java @@ -1,3 +1,23 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.DynamicComponentTest; import java.util.List; diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/TestCase.java index c31805a35a..f584648c05 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/TestCase.java @@ -1,21 +1,28 @@ /* - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.DynamicComponentTest; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + import java.io.File; import java.util.ArrayList; import java.util.Properties; @@ -33,11 +40,9 @@ import org.hibernate.tool.hbm2x.HibernateMappingExporter; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; @@ -52,35 +57,35 @@ public class TestCase { "Glarch.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); - private File outputDir = null; + private File srcDir = null; private File resourcesDir = null; private Exporter hbmexporter = null; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "output"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); hbmexporter = new HibernateMappingExporter(); hbmexporter.setMetadataDescriptor(metadataDescriptor); - hbmexporter.setOutputDirectory(outputDir); + hbmexporter.setOutputDirectory(srcDir); hbmexporter.start(); } @Test public void testAllFilesExistence() { JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/Fee.hbm.xml") ); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/Glarch.hbm.xml") ); } @@ -88,23 +93,23 @@ public void testAllFilesExistence() { public void testReadable() { ArrayList files = new ArrayList(4); files.add(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/Fee.hbm.xml")); files.add(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/Glarch.hbm.xml")); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); - Assert.assertNotNull(metadataDescriptor.createMetadata()); + assertNotNull(metadataDescriptor.createMetadata()); } @Test public void testClassProxy() throws Exception { File outputXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/Glarch.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -114,15 +119,15 @@ public void testClassProxy() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one class element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one class element"); Element element = (Element) nodeList.item(0); - Assert.assertEquals(element.getAttribute("proxy"),"org.hibernate.tool.hbm2x.hbm2hbmxml.DynamicComponentTest.GlarchProxy"); + assertEquals(element.getAttribute("proxy"),"org.hibernate.tool.hbm2x.hbm2hbmxml.DynamicComponentTest.GlarchProxy"); } @Test public void testDynamicComponentNode() throws Exception { File outputXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/Glarch.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -132,9 +137,9 @@ public void testDynamicComponentNode() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/dynamic-component") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one dynamic-component element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one dynamic-component element"); Element element = (Element) nodeList.item(0); - Assert.assertEquals(element.getAttribute( "name" ),"dynaBean"); + assertEquals(element.getAttribute( "name" ),"dynaBean"); } } From 13667f991504d734183320c4e4fe2d2dc1ac8890 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 28 Jun 2021 22:38:36 +0200 Subject: [PATCH 259/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.hbm2hbmxml.FormulaTest.TestCase' Signed-off-by: Koen Aers --- .../hbm2x/hbm2hbmxml/FormulaTest/Address.java | 20 ++++++ .../hbm2hbmxml/FormulaTest/AddressId.java | 20 ++++++ .../hbm2hbmxml/FormulaTest/Customer.java | 20 ++++++ .../hbm2hbmxml/FormulaTest/TestCase.java | 62 ++++++++++--------- 4 files changed, 93 insertions(+), 29 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Address.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Address.java index 3c157182d5..48ad11ae6a 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Address.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Address.java @@ -1,3 +1,23 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.FormulaTest; public class Address { diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/AddressId.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/AddressId.java index 43ca6b1be1..f7efc64057 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/AddressId.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/AddressId.java @@ -1,3 +1,23 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.FormulaTest; public class AddressId { diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Customer.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Customer.java index 0af5a2ee64..a7ef84bba6 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Customer.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Customer.java @@ -1,3 +1,23 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.FormulaTest; public class Customer { diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/TestCase.java index df690a4c11..8c53617b17 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/TestCase.java @@ -1,21 +1,27 @@ /* - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.FormulaTest; +import static org.junit.jupiter.api.Assertions.assertNotNull; + import java.io.File; import java.util.ArrayList; import java.util.Properties; @@ -26,11 +32,9 @@ import org.hibernate.tool.hbm2x.Exporter; import org.hibernate.tool.hbm2x.HibernateMappingExporter; import org.hibernate.tools.test.util.HibernateUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author koen @@ -41,25 +45,25 @@ public class TestCase { "Customer.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); - private File outputDir = null; + private File srcDir = null; private File resourcesDir = null; private Exporter hbmexporter = null; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "output"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); hbmexporter = new HibernateMappingExporter(); hbmexporter.setMetadataDescriptor(metadataDescriptor); - hbmexporter.setOutputDirectory(outputDir); + hbmexporter.setOutputDirectory(srcDir); hbmexporter.start(); } @@ -67,20 +71,20 @@ public void setUp() throws Exception { public void testReadable() { ArrayList files = new ArrayList(4); files.add(new File( - outputDir, + srcDir, "/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Customer.hbm.xml")); files.add(new File( - outputDir, + srcDir, "/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/BillingAddress.hbm.xml")); files.add(new File( - outputDir, + srcDir, "/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/ShippingAddress.hbm.xml")); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); - Assert.assertNotNull(metadataDescriptor.createMetadata()); + assertNotNull(metadataDescriptor.createMetadata()); } } From 6350491624f15757084919a6eccfa80aab01b175 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 28 Jun 2021 23:34:46 +0200 Subject: [PATCH 260/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.hbm2hbmxml.Hbm2HbmXmlTest.TestCase' Signed-off-by: Koen Aers --- .../hbm2hbmxml/Hbm2HbmXmlTest/TestCase.java | 281 ++++++++++-------- 1 file changed, 149 insertions(+), 132 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/Hbm2HbmXmlTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/Hbm2HbmXmlTest/TestCase.java index bc73e5372c..5a63ae711b 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/Hbm2HbmXmlTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/Hbm2HbmXmlTest/TestCase.java @@ -1,12 +1,31 @@ -//$Id$ - -/* - * Tests for generating the HBM documents from the Configuration data structure. - * The generated XML document will be validated and queried to make sure the - * basic structure is correct in each test. +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.Hbm2HbmXmlTest; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import javax.xml.parsers.DocumentBuilder; @@ -21,11 +40,9 @@ import org.hibernate.tool.hbm2x.HibernateMappingGlobalSettings; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; @@ -59,53 +76,53 @@ public static class Persister { "ClassFullAttribute.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private MetadataDescriptor metadataDescriptor = null; - private File outputDir = null; + private File srcDir = null; private File resourcesDir = null; private Exporter hbmexporter = null; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "output"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); hbmexporter = new HibernateMappingExporter(); hbmexporter.setMetadataDescriptor(metadataDescriptor); - hbmexporter.setOutputDirectory(outputDir); + hbmexporter.setOutputDirectory(srcDir); hbmexporter.start(); } @Test public void testAllFilesExistence() { JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "GeneralHbmSettings.hbm.xml") ); - Assert.assertFalse(new File( - outputDir, + assertFalse(new File( + srcDir, "org/hibernate/tool/cfg2hbm/GeneralHbmSettings.hbm.xml").exists() ); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/Hbm2HbmXmlTest/Basic.hbm.xml") ); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/Hbm2HbmXmlTest/BasicGlobals.hbm.xml") ); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/Hbm2HbmXmlTest/BasicCompositeId.hbm.xml") ); } @Test public void testArtifactCollection() { - Assert.assertEquals( - "4 mappings + 1 global", + assertEquals( 5, - hbmexporter.getArtifactCollector().getFileCount("hbm.xml")); + hbmexporter.getArtifactCollector().getFileCount("hbm.xml"), + "4 mappings + 1 global"); } /** @@ -120,11 +137,11 @@ public void testGlobalSettingsGeneratedDatabase() throws Exception { hgs.setCatalogName("mycatalog"); Exporter gsExporter = new HibernateMappingExporter(); gsExporter.setMetadataDescriptor(metadataDescriptor); - gsExporter.setOutputDirectory(outputDir); + gsExporter.setOutputDirectory(srcDir); ( (HibernateMappingExporter)gsExporter).setGlobalSettings(hgs); gsExporter.start(); File outputXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/Hbm2HbmXmlTest/BasicGlobals.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -132,10 +149,10 @@ public void testGlobalSettingsGeneratedDatabase() throws Exception { Document document = db.parse(outputXml); Element root = document.getDocumentElement(); // There are 7 attributes because there are defaults defined by the DTD makes up the missing entries - Assert.assertEquals("Unexpected number of hibernate-mapping elements ", 7, root.getAttributes().getLength() ); - Assert.assertEquals("Unexpected package name", "org.hibernate.tool.hbm2x.hbm2hbmxml.Hbm2HbmXmlTest", root.getAttribute("package") ); - Assert.assertEquals("Unexpected schema name", "myschema", root.getAttribute("schema") ); - Assert.assertEquals("Unexpected mycatalog name", "mycatalog", root.getAttribute("catalog")); + assertEquals(7, root.getAttributes().getLength(), "Unexpected number of hibernate-mapping elements "); + assertEquals("org.hibernate.tool.hbm2x.hbm2hbmxml.Hbm2HbmXmlTest", root.getAttribute("package"), "Unexpected package name"); + assertEquals("myschema", root.getAttribute("schema"), "Unexpected schema name"); + assertEquals("mycatalog", root.getAttribute("catalog"), "Unexpected mycatalog name"); } /** @@ -150,11 +167,11 @@ public void testGlobalSettingsGeneratedAccessAndCascadeNonDefault() throws Exce hgs.setDefaultCascade("save-update"); Exporter gbsExporter = new HibernateMappingExporter(); gbsExporter.setMetadataDescriptor(metadataDescriptor); - gbsExporter.setOutputDirectory(outputDir); + gbsExporter.setOutputDirectory(srcDir); ( (HibernateMappingExporter)gbsExporter).setGlobalSettings(hgs); gbsExporter.start(); File outputXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/Hbm2HbmXmlTest/BasicGlobals.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -162,16 +179,16 @@ public void testGlobalSettingsGeneratedAccessAndCascadeNonDefault() throws Exce Document document = db.parse(outputXml); Element root = document.getDocumentElement(); // There are 5 attributes because there are non-defaults not set for this test - Assert.assertEquals("Unexpected number of hibernate-mapping elements ", 5, root.getAttributes().getLength()); - Assert.assertEquals("Unexpected package name", "org.hibernate.tool.hbm2x.hbm2hbmxml.Hbm2HbmXmlTest", root.getAttribute("package")); - Assert.assertEquals("Unexpected access setting", "field", root.getAttribute("default-access")); - Assert.assertEquals("Unexpected cascade setting", "save-update", root.getAttribute("default-cascade") ); + assertEquals(5, root.getAttributes().getLength(), "Unexpected number of hibernate-mapping elements "); + assertEquals("org.hibernate.tool.hbm2x.hbm2hbmxml.Hbm2HbmXmlTest", root.getAttribute("package"), "Unexpected package name"); + assertEquals("field", root.getAttribute("default-access"), "Unexpected access setting"); + assertEquals("save-update", root.getAttribute("default-cascade"), "Unexpected cascade setting"); } @Test public void testMetaAttributes() throws Exception { File outputXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/Hbm2HbmXmlTest/Basic.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -181,33 +198,33 @@ public void testMetaAttributes() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/meta") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one meta element", 2, nodeList.getLength()); + assertEquals(2, nodeList.getLength(), "Expected to get one meta element"); Node node = (Node) nodeList.item(0); - Assert.assertEquals(node.getTextContent(),"Basic"); + assertEquals(node.getTextContent(),"Basic"); nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/id/meta") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one meta element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one meta element"); node = (Node) nodeList.item(0); - Assert.assertEquals(node.getTextContent(),"basicId"); + assertEquals(node.getTextContent(),"basicId"); nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/property/meta") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one meta element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one meta element"); node = (Node) nodeList.item(0); - Assert.assertEquals(node.getTextContent(),"description"); + assertEquals(node.getTextContent(),"description"); nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/set/meta") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one meta element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one meta element"); node = (Node) nodeList.item(0); - Assert.assertEquals(node.getTextContent(),"anotherone"); + assertEquals(node.getTextContent(),"anotherone"); } @Test public void testCollectionAttributes() throws Exception { File outputXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/Hbm2HbmXmlTest/Basic.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -217,15 +234,15 @@ public void testCollectionAttributes() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/set") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one set element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one set element"); Element node = (Element) nodeList.item(0); - Assert.assertEquals("delete, update", node.getAttribute("cascade")); + assertEquals("delete, update", node.getAttribute("cascade")); } @Test public void testComments() throws Exception { File outputXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/Hbm2HbmXmlTest/ClassFullAttribute.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -235,21 +252,21 @@ public void testComments() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/comment") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one comment element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one comment element"); Node node = (Node) nodeList.item(0); - Assert.assertEquals(node.getTextContent(),"A comment for ClassFullAttribute"); + assertEquals(node.getTextContent(),"A comment for ClassFullAttribute"); nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/property/column/comment") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one comment element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one comment element"); node = (Node) nodeList.item(0); - Assert.assertEquals(node.getTextContent(),"columnd comment"); + assertEquals(node.getTextContent(),"columnd comment"); } @Test public void testNoComments() throws Exception { File outputXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/Hbm2HbmXmlTest/Basic.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -259,11 +276,11 @@ public void testNoComments() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/comment") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get no comment element", nodeList.getLength(), 0); + assertEquals(nodeList.getLength(), 0, "Expected to get no comment element"); nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/property/column/comment") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get no comment element", 0, nodeList.getLength()); + assertEquals(0, nodeList.getLength(), "Expected to get no comment element"); } /** @@ -279,11 +296,11 @@ public void testGlobalSettingsGeneratedAccessAndCascadeDefault() throws Excepti hgs.setDefaultCascade("none"); Exporter gbsExporter = new HibernateMappingExporter(); gbsExporter.setMetadataDescriptor(metadataDescriptor); - gbsExporter.setOutputDirectory(outputDir); + gbsExporter.setOutputDirectory(srcDir); ( (HibernateMappingExporter)gbsExporter).setGlobalSettings(hgs); gbsExporter.start(); File outputXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/Hbm2HbmXmlTest/BasicGlobals.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -291,10 +308,10 @@ public void testGlobalSettingsGeneratedAccessAndCascadeDefault() throws Excepti Document document = db.parse(outputXml); Element root = document.getDocumentElement(); // There are 5 attributes because there are non-defaults not set for this test - Assert.assertEquals("Unexpected number of hibernate-mapping elements ", 5, root.getAttributes().getLength()); - Assert.assertEquals("Unexpected package name", "org.hibernate.tool.hbm2x.hbm2hbmxml.Hbm2HbmXmlTest", root.getAttribute("package")); - Assert.assertEquals("Unexpected access setting", "property", root.getAttribute("default-access")); - Assert.assertEquals("Unexpected cascade setting", "none", root.getAttribute("default-cascade")); + assertEquals(5, root.getAttributes().getLength(), "Unexpected number of hibernate-mapping elements "); + assertEquals("org.hibernate.tool.hbm2x.hbm2hbmxml.Hbm2HbmXmlTest", root.getAttribute("package"), "Unexpected package name"); + assertEquals("property", root.getAttribute("default-access"), "Unexpected access setting"); + assertEquals("none", root.getAttribute("default-cascade"), "Unexpected cascade setting"); } /** @@ -310,11 +327,11 @@ public void testGlobalSettingsLasyAndAutoImportNonDefault() throws Exception { hgs.setAutoImport(false); Exporter gbsExporter = new HibernateMappingExporter(); gbsExporter.setMetadataDescriptor(metadataDescriptor); - gbsExporter.setOutputDirectory(outputDir); + gbsExporter.setOutputDirectory(srcDir); ( (HibernateMappingExporter)gbsExporter).setGlobalSettings(hgs); gbsExporter.start(); File outputXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/Hbm2HbmXmlTest/BasicGlobals.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -322,16 +339,16 @@ public void testGlobalSettingsLasyAndAutoImportNonDefault() throws Exception { Document document = db.parse(outputXml); Element root = document.getDocumentElement(); // There are 5 attributes because there are non-defaults not set for this test - Assert.assertEquals("Unexpected number of hibernate-mapping elements ", 5, root.getAttributes().getLength()); - Assert.assertEquals("Unexpected package name", "org.hibernate.tool.hbm2x.hbm2hbmxml.Hbm2HbmXmlTest", root.getAttribute("package")); - Assert.assertEquals("Unexpected access setting", "false", root.getAttribute("default-lazy")); - Assert.assertEquals("Unexpected cascade setting", "false", root.getAttribute("auto-import")); + assertEquals(5, root.getAttributes().getLength(), "Unexpected number of hibernate-mapping elements "); + assertEquals("org.hibernate.tool.hbm2x.hbm2hbmxml.Hbm2HbmXmlTest", root.getAttribute("package"), "Unexpected package name"); + assertEquals("false", root.getAttribute("default-lazy"), "Unexpected access setting"); + assertEquals("false", root.getAttribute("auto-import"), "Unexpected cascade setting"); } @Test public void testIdGeneratorHasNotArgumentParameters() throws Exception { File outputXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/Hbm2HbmXmlTest/BasicGlobals.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -342,19 +359,19 @@ public void testIdGeneratorHasNotArgumentParameters() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/id/generator") .evaluate(document, XPathConstants.NODESET); - Assert.assertTrue("Expected to get one generator element", nodeList.getLength() == 1); + assertTrue(nodeList.getLength() == 1, "Expected to get one generator element"); Node genAtt = ( (Element)nodeList.item(0)).getAttributeNode("class"); - Assert.assertEquals("Unexpected generator class name", "assigned", genAtt.getTextContent() ); + assertEquals("assigned", genAtt.getTextContent(), "Unexpected generator class name"); nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/id/generator/param") .evaluate(document, XPathConstants.NODESET); - Assert.assertTrue("Expected to get no generator param elements", nodeList.getLength() == 0); + assertTrue(nodeList.getLength() == 0, "Expected to get no generator param elements"); } @Test public void testIdGeneratorHasArgumentParameters() throws Exception { File outputXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/Hbm2HbmXmlTest/Basic.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -365,13 +382,13 @@ public void testIdGeneratorHasArgumentParameters() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/id/generator") .evaluate(document, XPathConstants.NODESET); - Assert.assertTrue("Expected to get one generator element", nodeList.getLength() == 1); + assertTrue(nodeList.getLength() == 1, "Expected to get one generator element"); Node genAtt = ( (Element)nodeList.item(0)).getAttributeNode("class"); - Assert.assertEquals("Unexpected generator class name", "org.hibernate.id.TableHiLoGenerator", genAtt.getTextContent()); + assertEquals("org.hibernate.id.TableHiLoGenerator", genAtt.getTextContent(), "Unexpected generator class name"); nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/id/generator/param") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get correct number of generator param elements", 2, nodeList.getLength()); + assertEquals(2, nodeList.getLength(), "Expected to get correct number of generator param elements"); Element tableElement = (Element)nodeList.item(0); Attr paramTableAtt = tableElement.getAttributeNode("name"); Element columnElement = (Element)nodeList.item(1); @@ -385,16 +402,16 @@ public void testIdGeneratorHasArgumentParameters() throws Exception { paramColumnAtt = temp; columnElement = tempElement; } - Assert.assertEquals("Unexpected generator param name", "table", paramTableAtt.getTextContent() ); - Assert.assertEquals("Unexpected generator param name", "column", paramColumnAtt.getTextContent() ); - Assert.assertEquals("Unexpected param value for table", "uni_table", tableElement.getTextContent() ); - Assert.assertEquals("Unexpected param value for column", "next_hi_value", columnElement.getTextContent() ); + assertEquals("table", paramTableAtt.getTextContent(), "Unexpected generator param name"); + assertEquals("column", paramColumnAtt.getTextContent(), "Unexpected generator param name"); + assertEquals("uni_table", tableElement.getTextContent(), "Unexpected param value for table"); + assertEquals("next_hi_value", columnElement.getTextContent(), "Unexpected param value for column"); } @Test public void testGeneralHbmSettingsQuery() throws Exception { File outputXml = new File( - outputDir, + srcDir, "GeneralHbmSettings.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -405,29 +422,29 @@ public void testGeneralHbmSettingsQuery() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/query") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get correct number of query elements", 2, nodeList.getLength() ); + assertEquals(2, nodeList.getLength(), "Expected to get correct number of query elements"); Attr genAtt = ( (Element)nodeList.item(0) ).getAttributeNode("name"); - Assert.assertEquals("Unexpected query name", "test_query_1", genAtt.getTextContent() ); + assertEquals("test_query_1", genAtt.getTextContent(), "Unexpected query name"); genAtt = ( (Element)nodeList.item(0) ).getAttributeNode("flush-mode"); - Assert.assertNull("Expected flush-mode value to be null", genAtt); + assertNull(genAtt, "Expected flush-mode value to be null"); genAtt = ( (Element)nodeList.item(1) ).getAttributeNode("name"); - Assert.assertEquals("Unexpected query name", "test_query_2", genAtt.getTextContent() ); + assertEquals("test_query_2", genAtt.getTextContent(), "Unexpected query name"); genAtt = ( (Element)nodeList.item(1) ).getAttributeNode("flush-mode"); - Assert.assertEquals("Unexpected flush-mode value", "auto", genAtt.getTextContent() ); + assertEquals("auto", genAtt.getTextContent(), "Unexpected flush-mode value"); genAtt = ( (Element)nodeList.item(1) ).getAttributeNode("cacheable"); - Assert.assertEquals("Unexpected cacheable value", "true", genAtt.getTextContent() ); + assertEquals("true", genAtt.getTextContent(), "Unexpected cacheable value"); genAtt = ( (Element)nodeList.item(1) ).getAttributeNode("cache-region"); - Assert.assertEquals("Unexpected cache-region value", "myregion", genAtt.getTextContent() ); + assertEquals("myregion", genAtt.getTextContent(), "Unexpected cache-region value"); genAtt = ( (Element)nodeList.item(1) ).getAttributeNode("fetch-size"); - Assert.assertEquals("Unexpected fetch-size value", "10", genAtt.getTextContent() ); + assertEquals("10", genAtt.getTextContent(), "Unexpected fetch-size value"); genAtt = ( (Element)nodeList.item(1) ).getAttributeNode("timeout"); - Assert.assertEquals("Unexpected timeout value", "1000", genAtt.getTextContent() ); + assertEquals("1000", genAtt.getTextContent(), "Unexpected timeout value"); } @Test public void testGeneralHbmSettingsSQLQueryBasic() throws Exception { File outputXml = new File( - outputDir, + srcDir, "GeneralHbmSettings.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -438,20 +455,20 @@ public void testGeneralHbmSettingsSQLQueryBasic() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/sql-query") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get correct number of query elements", 6, nodeList.getLength() ); + assertEquals(6, nodeList.getLength(), "Expected to get correct number of query elements"); nodeList = (NodeList)xpath .compile("//hibernate-mapping/sql-query[@name=\"test_sqlquery_1\"]") .evaluate(document, XPathConstants.NODESET); Element node = (Element)nodeList.item(0); - Assert.assertNotNull("Expected sql-query named 'test_sqlquery_1' not to be null", node); + assertNotNull(node, "Expected sql-query named 'test_sqlquery_1' not to be null"); Attr genAtt = node.getAttributeNode("flush-mode"); - Assert.assertNull("Expected flush-mode value to be null", genAtt); + assertNull(genAtt, "Expected flush-mode value to be null"); } @Test public void testGeneralHbmSettingsSQLQueryAllAttributes() throws Exception { File outputXml = new File( - outputDir, + srcDir, "GeneralHbmSettings.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -463,27 +480,27 @@ public void testGeneralHbmSettingsSQLQueryAllAttributes() throws Exception { .compile("//hibernate-mapping/sql-query[@name=\"test_sqlquery_2\"]") .evaluate(document, XPathConstants.NODESET); Element node = (Element)nodeList.item(0); - Assert.assertNotNull("Expected sql-query named 'test_sqlquery_2' not to be null", node); + assertNotNull(node, "Expected sql-query named 'test_sqlquery_2' not to be null"); Attr genAtt = node.getAttributeNode("name"); - Assert.assertEquals("Unexpected query name", "test_sqlquery_2", genAtt.getTextContent() ); + assertEquals("test_sqlquery_2", genAtt.getTextContent(), "Unexpected query name"); genAtt = node.getAttributeNode("flush-mode"); - Assert.assertEquals("Unexpected flush-mode value", "auto", genAtt.getTextContent() ); + assertEquals("auto", genAtt.getTextContent(), "Unexpected flush-mode value"); genAtt = node.getAttributeNode("cacheable"); - Assert.assertEquals("Unexpected cacheable value", "true", genAtt.getTextContent() ); + assertEquals("true", genAtt.getTextContent(), "Unexpected cacheable value"); genAtt = node.getAttributeNode("cache-region"); - Assert.assertEquals("Unexpected cache-region value", "myregion", genAtt.getTextContent() ); + assertEquals("myregion", genAtt.getTextContent(), "Unexpected cache-region value"); genAtt = node.getAttributeNode("fetch-size"); - Assert.assertEquals("Unexpected fetch-size value", "10", genAtt.getTextContent() ); + assertEquals("10", genAtt.getTextContent(), "Unexpected fetch-size value"); genAtt = node.getAttributeNode("timeout"); - Assert.assertEquals("Unexpected timeout value", "1000", genAtt.getTextContent() ); + assertEquals("1000", genAtt.getTextContent(), "Unexpected timeout value"); Element syncTable = (Element)node.getElementsByTagName("synchronize").item(0); - Assert.assertNull("Expected synchronize element to be null", syncTable); + assertNull(syncTable, "Expected synchronize element to be null"); } @Test public void testGeneralHbmSettingsSQLQuerySynchronize() throws Exception { File outputXml = new File( - outputDir, + srcDir, "GeneralHbmSettings.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -495,21 +512,21 @@ public void testGeneralHbmSettingsSQLQuerySynchronize() throws Exception { .compile("//hibernate-mapping/sql-query[@name=\"test_sqlquery_3\"]") .evaluate(document, XPathConstants.NODESET); Element node = (Element)nodeList.item(0); - Assert.assertNotNull("Expected sql-query named 'test_sqlquery_3' not to be null", node); + assertNotNull(node, "Expected sql-query named 'test_sqlquery_3' not to be null"); Attr genAtt = node.getAttributeNode("name"); - Assert.assertEquals("Unexpected query name", "test_sqlquery_3", genAtt.getTextContent() ); + assertEquals("test_sqlquery_3", genAtt.getTextContent(), "Unexpected query name"); Element syncTable = (Element)node.getElementsByTagName("synchronize").item(0); - Assert.assertNotNull("Expected synchronize element to not be null", syncTable); + assertNotNull(syncTable, "Expected synchronize element to not be null"); genAtt = syncTable.getAttributeNode("table"); - Assert.assertEquals("Unexpected table value for synchronize element", "mytable", genAtt.getTextContent() ); + assertEquals("mytable", genAtt.getTextContent(), "Unexpected table value for synchronize element"); Element returnEl = (Element)node.getElementsByTagName("return").item(0); - Assert.assertNull("Expected return element to be null", returnEl); + assertNull(returnEl, "Expected return element to be null"); } @Test public void testGeneralHbmSettingsSQLQueryWithReturnRoot() throws Exception { File outputXml = new File( - outputDir, + srcDir, "GeneralHbmSettings.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -521,21 +538,21 @@ public void testGeneralHbmSettingsSQLQueryWithReturnRoot() throws Exception { .compile("//hibernate-mapping/sql-query[@name=\"test_sqlquery_4\"]") .evaluate(document, XPathConstants.NODESET); Element node = (Element)nodeList.item(0); - Assert.assertNotNull("Expected sql-query named 'test_sqlquery_4' not to be null", node); + assertNotNull(node, "Expected sql-query named 'test_sqlquery_4' not to be null"); Attr genAtt = node.getAttributeNode("name"); - Assert.assertEquals("Unexpected query name", "test_sqlquery_4", genAtt.getTextContent() ); + assertEquals(genAtt.getTextContent(), "test_sqlquery_4", "Unexpected query name"); Element returnEl = (Element)node.getElementsByTagName("return").item(0); - Assert.assertNotNull("Expected return element to not be null", returnEl); + assertNotNull(returnEl, "Expected return element to not be null"); genAtt = returnEl.getAttributeNode("alias"); - Assert.assertEquals("Unexpected alias value for return element", "e", genAtt.getTextContent() ); + assertEquals("e", genAtt.getTextContent(), "Unexpected alias value for return element"); genAtt = returnEl.getAttributeNode("class"); - Assert.assertEquals("Unexpected class value for return element", "org.hibernate.tool.hbm2x.hbm2hbmxml.BasicGlobals", genAtt.getTextContent()); + assertEquals("org.hibernate.tool.hbm2x.hbm2hbmxml.BasicGlobals", genAtt.getTextContent(), "Unexpected class value for return element"); } @Test public void testGeneralHbmSettingsSQLQueryWithReturnRole() throws Exception { File outputXml = new File( - outputDir, + srcDir, "GeneralHbmSettings.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -547,21 +564,21 @@ public void testGeneralHbmSettingsSQLQueryWithReturnRole() throws Exception { .compile("//hibernate-mapping/sql-query[@name=\"test_sqlquery_5\"]") .evaluate(document, XPathConstants.NODESET); Element node = (Element)nodeList.item(0); - Assert.assertNotNull("Expected sql-query named 'test_sqlquery_5' not to be null", node); + assertNotNull(node, "Expected sql-query named 'test_sqlquery_5' not to be null"); Attr genAtt = node.getAttributeNode("name"); - Assert.assertEquals("Unexpected query name", "test_sqlquery_5", genAtt.getTextContent() ); + assertEquals("test_sqlquery_5", genAtt.getTextContent(), "Unexpected query name"); Element returnEl = (Element)node.getElementsByTagName("return-join").item(0); - Assert.assertNotNull("Expected return element to not be null", returnEl); + assertNotNull(returnEl, "Expected return element to not be null"); genAtt = returnEl.getAttributeNode("alias"); - Assert.assertEquals("Unexpected alias value for return element", "e", genAtt.getTextContent() ); + assertEquals("e", genAtt.getTextContent(), "Unexpected alias value for return element"); genAtt = returnEl.getAttributeNode("property"); - Assert.assertEquals("Unexpected property role value for return element", "e.age", genAtt.getTextContent()); + assertEquals("e.age", genAtt.getTextContent(), "Unexpected property role value for return element"); } @Test public void testGeneralHbmSettingsSQLQueryWithReturnCollection() throws Exception { File outputXml = new File( - outputDir, + srcDir, "GeneralHbmSettings.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -573,17 +590,17 @@ public void testGeneralHbmSettingsSQLQueryWithReturnCollection() throws Excepti .compile("//hibernate-mapping/sql-query[@name=\"test_sqlquery_6\"]") .evaluate(document, XPathConstants.NODESET); Element node = (Element)nodeList.item(0); - Assert.assertNotNull("Expected sql-query named 'test_sqlquery_6' not to be null", node); + assertNotNull(node, "Expected sql-query named 'test_sqlquery_6' not to be null"); Attr genAtt = node.getAttributeNode("name"); - Assert.assertEquals("Unexpected query name", "test_sqlquery_6", genAtt.getTextContent()); + assertEquals("test_sqlquery_6", genAtt.getTextContent(), "Unexpected query name"); Element returnEl = (Element)node.getElementsByTagName("load-collection").item(0); - Assert.assertNotNull("Expected return element to not be null", returnEl); + assertNotNull(returnEl, "Expected return element to not be null"); genAtt = returnEl.getAttributeNode("alias"); - Assert.assertEquals("Unexpected alias value for return element", "e", genAtt.getTextContent()); + assertEquals("e", genAtt.getTextContent(), "Unexpected alias value for return element"); genAtt = returnEl.getAttributeNode("role"); - Assert.assertEquals("Unexpected collection role value for return element", "org.hibernate.tool.hbm2x.hbm2hbmxml.Hbm2HbmXmlTest.BasicGlobals.price", genAtt.getTextContent()); + assertEquals("org.hibernate.tool.hbm2x.hbm2hbmxml.Hbm2HbmXmlTest.BasicGlobals.price", genAtt.getTextContent(), "Unexpected collection role value for return element"); genAtt = returnEl.getAttributeNode("lock-mode"); - Assert.assertEquals("Unexpected class lock-mode for return element", "none", genAtt.getTextContent()); + assertEquals("none", genAtt.getTextContent(), "Unexpected class lock-mode for return element"); } } From 7a2aacce9808391c6790b211c5d15e06f66c9b70 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 28 Jun 2021 23:49:39 +0200 Subject: [PATCH 261/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.hbm2hbmxml.IdBagTest.TestCase' Signed-off-by: Koen Aers --- .../hbm2x/hbm2hbmxml/IdBagTest/Group.java | 20 ++++ .../hbm2x/hbm2hbmxml/IdBagTest/TestCase.java | 96 ++++++++++--------- .../tool/hbm2x/hbm2hbmxml/IdBagTest/User.java | 20 ++++ 3 files changed, 91 insertions(+), 45 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/Group.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/Group.java index 3c2aa42d43..bc315e6bee 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/Group.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/Group.java @@ -1,3 +1,23 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.IdBagTest; public class Group { diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/TestCase.java index 5fa883b0e5..82717cb357 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/TestCase.java @@ -1,21 +1,29 @@ /* - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.IdBagTest; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; + import java.io.File; import java.util.ArrayList; import java.util.Properties; @@ -33,11 +41,9 @@ import org.hibernate.tool.hbm2x.HibernateMappingExporter; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; @@ -52,44 +58,44 @@ public class TestCase { "UserGroup.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); - private File outputDir = null; + private File srcDir = null; private File resourcesDir = null; private Exporter hbmexporter = null; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "output"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); hbmexporter = new HibernateMappingExporter(); hbmexporter.setMetadataDescriptor(metadataDescriptor); - hbmexporter.setOutputDirectory(outputDir); + hbmexporter.setOutputDirectory(srcDir); hbmexporter.start(); } @Test public void testAllFilesExistence() { - Assert.assertFalse(new File( - outputDir, + assertFalse(new File( + srcDir, "/GeneralHbmSettings.hbm.xml").exists()); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/User.hbm.xml")); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/Group.hbm.xml")); } @Test public void testArtifactCollection() { - Assert.assertEquals( + assertEquals( 2, hbmexporter.getArtifactCollector().getFileCount("hbm.xml")); } @@ -98,23 +104,23 @@ public void testArtifactCollection() { public void testReadable() { ArrayList files = new ArrayList(4); files.add(new File( - outputDir, + srcDir, "/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/User.hbm.xml")); files.add(new File( - outputDir, + srcDir, "/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/Group.hbm.xml")); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); - Assert.assertNotNull(metadataDescriptor.createMetadata()); + assertNotNull(metadataDescriptor.createMetadata()); } @Test public void testIdBagAttributes() throws Exception { File outputXml = new File( - outputDir, + srcDir, "/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/User.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -124,18 +130,18 @@ public void testIdBagAttributes() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/idbag") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one idbag element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one idbag element"); Element node = (Element) nodeList.item(0); - Assert.assertEquals(node.getAttribute( "table" ),"`UserGroups`"); - Assert.assertEquals(node.getAttribute( "name" ),"groups"); - Assert.assertEquals(node.getAttribute( "lazy" ),"false"); - Assert.assertEquals(node.getAttribute( "access" ),"field"); + assertEquals(node.getAttribute( "table" ),"`UserGroups`"); + assertEquals(node.getAttribute( "name" ),"groups"); + assertEquals(node.getAttribute( "lazy" ),"false"); + assertEquals(node.getAttribute( "access" ),"field"); } @Test public void testCollectionId() throws Exception { File outputXml = new File( - outputDir, + srcDir, "/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/User.hbm.xml"); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); @@ -144,14 +150,14 @@ public void testCollectionId() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/idbag/collection-id") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one collection-id element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one collection-id element"); Element node = (Element) nodeList.item(0); - Assert.assertEquals(node.getAttribute( "column" ),"userGroupId"); - Assert.assertEquals(node.getAttribute( "type" ),"long"); + assertEquals(node.getAttribute( "column" ),"userGroupId"); + assertEquals(node.getAttribute( "type" ),"long"); nodeList = node.getElementsByTagName("generator"); - Assert.assertEquals("Expected to get one generator element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one generator element"); node = (Element) nodeList.item(0); - Assert.assertEquals(node.getAttribute( "class" ),"increment"); + assertEquals(node.getAttribute( "class" ),"increment"); } } diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/User.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/User.java index 4f603a3e5f..4047d4b10a 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/User.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/User.java @@ -1,3 +1,23 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.IdBagTest; import java.util.ArrayList; From e32e72d008a1ae256a81e5d1e58535c27258db73 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 29 Jun 2021 00:07:06 +0200 Subject: [PATCH 262/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.hbm2hbmxml.InheritanceTest.TestCase' Signed-off-by: Koen Aers --- .../hbm2hbmxml/InheritanceTest/TestCase.java | 85 +++++++++++-------- 1 file changed, 50 insertions(+), 35 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/InheritanceTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/InheritanceTest/TestCase.java index fc9f920842..1051cb5375 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/InheritanceTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/InheritanceTest/TestCase.java @@ -1,12 +1,29 @@ -//$Id$ - /* - * Tests for generating the HBM documents from the Configuration data structure. - * The generated XML document will be validated and queried to make sure the - * basic structure is correct in each test. + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.InheritanceTest; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; + import java.io.File; import java.util.ArrayList; import java.util.Properties; @@ -24,12 +41,10 @@ import org.hibernate.tool.hbm2x.HibernateMappingExporter; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; @@ -45,47 +60,47 @@ public class TestCase { "Aliens.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); - private File outputDir = null; + private File srcDir = null; private File resourcesDir = null; private Exporter hbmexporter = null; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "output"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); hbmexporter = new HibernateMappingExporter(); hbmexporter.setMetadataDescriptor(metadataDescriptor); - hbmexporter.setOutputDirectory(outputDir); + hbmexporter.setOutputDirectory(srcDir); hbmexporter.start(); } @Test public void testAllFilesExistence() { - Assert.assertFalse(new File( - outputDir, + assertFalse(new File( + srcDir, "GeneralHbmSettings.hbm.xml").exists() ); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/InheritanceTest/Human.hbm.xml")); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/InheritanceTest/Alien.hbm.xml") ); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "/org/hibernate/tool/hbm2x/hbm2hbmxml/InheritanceTest/Animal.hbm.xml") ); } @Test public void testArtifactCollection() { - Assert.assertEquals( + assertEquals( 3, hbmexporter.getArtifactCollector().getFileCount("hbm.xml")); } @@ -93,27 +108,27 @@ public void testArtifactCollection() { public void testReadable() { ArrayList files = new ArrayList(4); files.add(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/InheritanceTest/Alien.hbm.xml")); files.add(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/InheritanceTest/Human.hbm.xml")); files.add(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/InheritanceTest/Animal.hbm.xml")); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[3]), properties); - Assert.assertNotNull(metadataDescriptor.createMetadata()); + assertNotNull(metadataDescriptor.createMetadata()); } // TODO Re-enable this test: HBX-1247 - @Ignore + @Disabled @Test public void testComment() throws Exception { File outputXml = new File( - outputDir, + srcDir, "/org/hibernate/tool/hbm2x/hbm2hbmxml/InheritanceTest/Alien.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -123,13 +138,13 @@ public void testComment() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/joined-subclass/comment") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one comment element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one comment element"); } @Test public void testDiscriminator() throws Exception { File outputXml = new File( - outputDir, + srcDir, "/org/hibernate/tool/hbm2x/hbm2hbmxml/InheritanceTest/Animal.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -139,9 +154,9 @@ public void testDiscriminator() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/discriminator") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one discriminator element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one discriminator element"); Element node = (Element) nodeList.item(0); - Assert.assertEquals(node.getAttribute( "type" ), "string"); + assertEquals(node.getAttribute( "type" ), "string"); } } From 0bb93b02f1ef1235ae7194f68b96e3746a187f0d Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 29 Jun 2021 00:24:49 +0200 Subject: [PATCH 263/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.hbm2hbmxml.JoinTest.TestCase' Signed-off-by: Koen Aers --- .../tool/hbm2x/hbm2hbmxml/JoinTest/Child.java | 21 ++++++- .../hbm2x/hbm2hbmxml/JoinTest/Parent.java | 21 ++++++- .../hbm2x/hbm2hbmxml/JoinTest/TestCase.java | 60 ++++++++++--------- 3 files changed, 72 insertions(+), 30 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Child.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Child.java index 7fc6739d69..ed82ae0f91 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Child.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Child.java @@ -1,4 +1,23 @@ -//$Id$ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.JoinTest; /** diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Parent.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Parent.java index 0a272620d8..97285a43ac 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Parent.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Parent.java @@ -1,4 +1,23 @@ -//$Id$ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.JoinTest; import java.util.Collection; diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/TestCase.java index 24f5f8befe..0ad2fa6579 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/TestCase.java @@ -1,21 +1,27 @@ /* - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.JoinTest; +import static org.junit.jupiter.api.Assertions.assertNotNull; + import java.io.File; import java.util.ArrayList; import java.util.Properties; @@ -26,11 +32,9 @@ import org.hibernate.tool.hbm2x.Exporter; import org.hibernate.tool.hbm2x.HibernateMappingExporter; import org.hibernate.tools.test.util.HibernateUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author koen @@ -41,25 +45,25 @@ public class TestCase { "Parent.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); - private File outputDir = null; + private File srcDir = null; private File resourcesDir = null; private Exporter hbmexporter = null; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "output"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); hbmexporter = new HibernateMappingExporter(); hbmexporter.setMetadataDescriptor(metadataDescriptor); - hbmexporter.setOutputDirectory(outputDir); + hbmexporter.setOutputDirectory(srcDir); hbmexporter.start(); } @@ -67,17 +71,17 @@ public void setUp() throws Exception { public void testReadable() { ArrayList files = new ArrayList(4); files.add(new File( - outputDir, + srcDir, "/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Parent.hbm.xml")); files.add(new File( - outputDir, + srcDir, "/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Child.hbm.xml")); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); - Assert.assertNotNull(metadataDescriptor.createMetadata()); + assertNotNull(metadataDescriptor.createMetadata()); } } From fa6a378b67f29dd90e257a46abbdbdfeee803046 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 29 Jun 2021 09:30:00 +0200 Subject: [PATCH 264/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.hbm2hbmxml.ListArrayTest.TestCase' Signed-off-by: Koen Aers --- .../hbm2x/hbm2hbmxml/ListArrayTest/Fee.java | 21 +++- .../ListArrayTest/FooComponent.java | 21 +++- .../hbm2hbmxml/ListArrayTest/Glarch.java | 21 +++- .../hbm2hbmxml/ListArrayTest/GlarchProxy.java | 20 ++++ .../hbm2hbmxml/ListArrayTest/TestCase.java | 109 +++++++++--------- 5 files changed, 137 insertions(+), 55 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/Fee.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/Fee.java index 1ca5787c4a..8b3c316e55 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/Fee.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/Fee.java @@ -1,4 +1,23 @@ -//$Id$ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.ListArrayTest; import java.io.ObjectStreamClass; diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/FooComponent.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/FooComponent.java index d87cb38fb5..e6e6eac27f 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/FooComponent.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/FooComponent.java @@ -1,4 +1,23 @@ -//$Id$ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.ListArrayTest; import java.io.ObjectStreamClass; diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/Glarch.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/Glarch.java index 1a0635e9a7..5ef4556f91 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/Glarch.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/Glarch.java @@ -1,4 +1,23 @@ -//$Id$ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.ListArrayTest; import java.io.ObjectStreamClass; diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/GlarchProxy.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/GlarchProxy.java index 17be373c87..6a7918144f 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/GlarchProxy.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/GlarchProxy.java @@ -1,3 +1,23 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.ListArrayTest; import java.util.List; diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/TestCase.java index 9e73b460af..e2c7653aec 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/TestCase.java @@ -1,21 +1,28 @@ /* - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.ListArrayTest; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + import java.io.File; import java.util.ArrayList; import java.util.Properties; @@ -33,11 +40,9 @@ import org.hibernate.tool.hbm2x.HibernateMappingExporter; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; @@ -52,33 +57,33 @@ public class TestCase { "Glarch.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); - private File outputDir = null; + private File srcDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "output"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); Exporter hbmexporter = new HibernateMappingExporter(); hbmexporter.setMetadataDescriptor(metadataDescriptor); - hbmexporter.setOutputDirectory(outputDir); + hbmexporter.setOutputDirectory(srcDir); hbmexporter.start(); } @Test public void testAllFilesExistence() { JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/Fee.hbm.xml") ); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/Glarch.hbm.xml") ); } @@ -86,23 +91,23 @@ public void testAllFilesExistence() { public void testReadable() { ArrayList files = new ArrayList(4); files.add(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/Fee.hbm.xml")); files.add(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/Glarch.hbm.xml")); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); - Assert.assertNotNull(metadataDescriptor.createMetadata()); + assertNotNull(metadataDescriptor.createMetadata()); } @Test public void testListNode() throws Exception { File outputXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/Glarch.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -112,41 +117,41 @@ public void testListNode() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/list") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get two list element", 2, nodeList.getLength()); + assertEquals(2, nodeList.getLength(), "Expected to get two list element"); Element node = (Element) nodeList.item(1); //second list - Assert.assertEquals("fooComponents", node.getAttribute( "name" )); - Assert.assertEquals("true", node.getAttribute( "lazy" )); - Assert.assertEquals("all", node.getAttribute( "cascade" )); + assertEquals("fooComponents", node.getAttribute( "name" )); + assertEquals("true", node.getAttribute( "lazy" )); + assertEquals("all", node.getAttribute( "cascade" )); nodeList = node.getElementsByTagName("list-index"); - Assert.assertEquals("Expected to get one list-index element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one list-index element"); nodeList = ((Element) nodeList.item(0)).getElementsByTagName("column"); - Assert.assertEquals("Expected to get one column element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one column element"); node = (Element) nodeList.item(0); - Assert.assertEquals("tha_indecks", node.getAttribute( "name" )); + assertEquals("tha_indecks", node.getAttribute( "name" )); node = (Element)node.getParentNode().getParentNode();//list nodeList = node.getElementsByTagName("composite-element"); - Assert.assertEquals("Expected to get one composite-element element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one composite-element element"); node = (Element) nodeList.item(0); int propertyCount = 0; nodeList = node.getChildNodes(); for (int i = 0; i < nodeList.getLength(); i++) { if ("property".equals(nodeList.item(i).getNodeName())) propertyCount++; } - Assert.assertEquals("Expected to get two property element", 2, propertyCount); + assertEquals(2, propertyCount, "Expected to get two property element"); node = (Element)node.getElementsByTagName("many-to-one").item(0); - Assert.assertEquals("fee", node.getAttribute( "name" )); - Assert.assertEquals("all", node.getAttribute( "cascade" )); + assertEquals("fee", node.getAttribute( "name" )); + assertEquals("all", node.getAttribute( "cascade" )); //TODO :assertEquals(node.attribute( "outer-join" ).getText(),"true"); node = (Element)node.getParentNode();//composite-element node = (Element)node.getElementsByTagName("nested-composite-element").item(0); - Assert.assertEquals("subcomponent", node.getAttribute( "name" )); - Assert.assertEquals("org.hibernate.tool.hbm2x.hbm2hbmxml.ListArrayTest.FooComponent", node.getAttribute( "class" )); + assertEquals("subcomponent", node.getAttribute( "name" )); + assertEquals("org.hibernate.tool.hbm2x.hbm2hbmxml.ListArrayTest.FooComponent", node.getAttribute( "class" )); } @Test public void testArrayNode() throws Exception { File outputXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/Glarch.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -156,19 +161,19 @@ public void testArrayNode() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/array") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one array element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one array element"); Element node = (Element) nodeList.item(0); - Assert.assertEquals("proxyArray", node.getAttribute( "name" )); - Assert.assertEquals("org.hibernate.tool.hbm2x.hbm2hbmxml.ListArrayTest.GlarchProxy", node.getAttribute( "element-class" )); + assertEquals("proxyArray", node.getAttribute( "name" )); + assertEquals("org.hibernate.tool.hbm2x.hbm2hbmxml.ListArrayTest.GlarchProxy", node.getAttribute( "element-class" )); nodeList = node.getElementsByTagName("list-index"); - Assert.assertEquals("Expected to get one list-index element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one list-index element"); nodeList = ((Element) nodeList.item(0)).getElementsByTagName("column"); - Assert.assertEquals("Expected to get one column element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one column element"); node = (Element) nodeList.item(0); - Assert.assertEquals("array_indecks", node.getAttribute( "name" )); + assertEquals("array_indecks", node.getAttribute( "name" )); node = (Element)node.getParentNode().getParentNode();//array nodeList = node.getElementsByTagName("one-to-many"); - Assert.assertEquals("Expected to get one 'one-to-many' element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one 'one-to-many' element"); } } From 04459a579c538bc1da39a874fb6d70c21f081d29 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 29 Jun 2021 14:24:18 +0200 Subject: [PATCH 265/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.hbm2hbmxml.ManyToManyTest.TestCase' Signed-off-by: Koen Aers --- .../hbm2hbmxml/ManyToManyTest/Group.java | 21 +++- .../hbm2hbmxml/ManyToManyTest/TestCase.java | 103 ++++++++++-------- .../hbm2x/hbm2hbmxml/ManyToManyTest/User.java | 21 +++- 3 files changed, 99 insertions(+), 46 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/Group.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/Group.java index bdb9a052f5..83566d1098 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/Group.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/Group.java @@ -1,4 +1,23 @@ -//$Id: Group.java 7085 2005-06-08 17:59:47Z oneovthafew $ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.ManyToManyTest; import java.io.ObjectStreamClass; diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/TestCase.java index da086b8482..79683801a6 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/TestCase.java @@ -1,12 +1,29 @@ -//$Id$ - /* - * Tests for generating the HBM documents from the Configuration data structure. - * The generated XML document will be validated and queried to make sure the - * basic structure is correct in each test. + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.ManyToManyTest; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; + import java.io.File; import java.util.ArrayList; import java.util.Properties; @@ -24,11 +41,9 @@ import org.hibernate.tool.hbm2x.HibernateMappingExporter; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; @@ -39,44 +54,44 @@ public class TestCase { "UserGroup.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private Exporter hbmexporter = null; - private File outputDir = null; + private File srcDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "output"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); hbmexporter = new HibernateMappingExporter(); hbmexporter.setMetadataDescriptor(metadataDescriptor); - hbmexporter.setOutputDirectory(outputDir); + hbmexporter.setOutputDirectory(srcDir); hbmexporter.start(); } @Test public void testAllFilesExistence() { - Assert.assertFalse(new File( - outputDir, + assertFalse(new File( + srcDir, "GeneralHbmSettings.hbm.xml") .exists() ); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/User.hbm.xml") ); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/Group.hbm.xml") ); } @Test public void testArtifactCollection() { - Assert.assertEquals( + assertEquals( 2, hbmexporter.getArtifactCollector().getFileCount("hbm.xml")); } @@ -85,23 +100,23 @@ public void testArtifactCollection() { public void testReadable() { ArrayList files = new ArrayList(4); files.add(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/User.hbm.xml")); files.add(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/Group.hbm.xml")); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); - Assert.assertNotNull(metadataDescriptor.createMetadata()); + assertNotNull(metadataDescriptor.createMetadata()); } @Test public void testManyToMany() throws Exception { File outputXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/User.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -111,21 +126,21 @@ public void testManyToMany() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/set/many-to-many") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one many-to-many element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one many-to-many element"); Element node = (Element) nodeList.item(0); - Assert.assertEquals(node.getAttribute( "entity-name" ),"org.hibernate.tool.hbm2x.hbm2hbmxml.ManyToManyTest.Group"); + assertEquals(node.getAttribute( "entity-name" ),"org.hibernate.tool.hbm2x.hbm2hbmxml.ManyToManyTest.Group"); nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/set") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one set element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one set element"); node = (Element)nodeList.item(0); - Assert.assertEquals(node.getAttribute( "table" ),"UserGroup"); + assertEquals(node.getAttribute( "table" ),"UserGroup"); } @Test public void testCompositeId() throws Exception { File outputXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/Group.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -135,27 +150,27 @@ public void testCompositeId() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one class element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one class element"); Element node = (Element) nodeList.item(0); - Assert.assertEquals(node.getAttribute("table"), "`Group`"); + assertEquals(node.getAttribute("table"), "`Group`"); nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/composite-id") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one composite-id element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one composite-id element"); nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/composite-id/key-property") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get two key-property elements", 2, nodeList.getLength()); + assertEquals(2, nodeList.getLength(), "Expected to get two key-property elements"); node = (Element) nodeList.item(0); - Assert.assertEquals(node.getAttribute("name"), "name"); + assertEquals(node.getAttribute("name"), "name"); node = (Element) nodeList.item(1); - Assert.assertEquals(node.getAttribute("name"), "org"); + assertEquals(node.getAttribute("name"), "org"); } @Test public void testSetAttributes() throws Exception { File outputXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/Group.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -165,12 +180,12 @@ public void testSetAttributes() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/set") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one set element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one set element"); Element node = (Element) nodeList.item(0); - Assert.assertEquals(node.getAttribute("table"), "UserGroup"); - Assert.assertEquals(node.getAttribute("name"), "users"); - Assert.assertEquals(node.getAttribute("inverse"), "true"); - Assert.assertEquals(node.getAttribute("lazy"), "extra"); + assertEquals(node.getAttribute("table"), "UserGroup"); + assertEquals(node.getAttribute("name"), "users"); + assertEquals(node.getAttribute("inverse"), "true"); + assertEquals(node.getAttribute("lazy"), "extra"); } } diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/User.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/User.java index d56f0b106d..a45ef84f1e 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/User.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/User.java @@ -1,4 +1,23 @@ -//$Id: User.java 7085 2005-06-08 17:59:47Z oneovthafew $ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.ManyToManyTest; import java.io.ObjectStreamClass; From b01703a0fccf13b32a583eadce25860e82269e01 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 29 Jun 2021 15:19:16 +0200 Subject: [PATCH 266/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.hbm2hbmxml.MapAndAnyTest.TestCase' Signed-off-by: Koen Aers --- .../hbm2hbmxml/MapAndAnyTest/Address.java | 20 +++ .../hbm2hbmxml/MapAndAnyTest/Person.java | 20 +++ .../hbm2hbmxml/MapAndAnyTest/TestCase.java | 148 +++++++++--------- 3 files changed, 117 insertions(+), 71 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/Address.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/Address.java index 0dfa7b3645..5f5b0b7b4f 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/Address.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/Address.java @@ -1,3 +1,23 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.MapAndAnyTest; import java.util.Set; diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/Person.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/Person.java index 65042d30ac..1bfa8b6d3b 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/Person.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/Person.java @@ -1,3 +1,23 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.MapAndAnyTest; /** diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/TestCase.java index 397fc5a9e5..32a999fd29 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/TestCase.java @@ -1,21 +1,29 @@ /* - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.MapAndAnyTest; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import java.util.ArrayList; import java.util.Properties; @@ -37,11 +45,9 @@ import org.hibernate.tool.hbm2x.HibernateMappingExporter; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; @@ -57,42 +63,42 @@ public class TestCase { "Person.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private Exporter hbmexporter = null; - private File outputDir = null; + private File srcDir = null; private File resourcesDir = null; private Metadata metadata = null; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "output"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); metadata = metadataDescriptor.createMetadata(); hbmexporter = new HibernateMappingExporter(); hbmexporter.setMetadataDescriptor(metadataDescriptor); - hbmexporter.setOutputDirectory(outputDir); + hbmexporter.setOutputDirectory(srcDir); hbmexporter.start(); } @Test public void testAllFilesExistence() { JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/ComplexPropertyValue.hbm.xml") ); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/IntegerPropertyValue.hbm.xml") ); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/StringPropertyValue.hbm.xml") ); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/PropertySet.hbm.xml") ); } @@ -100,29 +106,29 @@ public void testAllFilesExistence() { public void testReadable() { ArrayList files = new ArrayList(4); files.add(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/ComplexPropertyValue.hbm.xml")); files.add(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/IntegerPropertyValue.hbm.xml")); files.add(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/StringPropertyValue.hbm.xml")); files.add(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/PropertySet.hbm.xml")); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[4]), properties); - Assert.assertNotNull(metadataDescriptor.createMetadata()); + assertNotNull(metadataDescriptor.createMetadata()); } @Test public void testAnyNode() throws Exception { File outputXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/PropertySet.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -132,45 +138,45 @@ public void testAnyNode() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/any") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one any element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one any element"); Element node = (Element) nodeList.item(0); - Assert.assertEquals(node.getAttribute( "name" ),"someSpecificProperty"); - Assert.assertEquals(node.getAttribute( "id-type" ),"long"); - Assert.assertEquals(node.getAttribute( "meta-type" ),"string"); - Assert.assertEquals(node.getAttribute( "cascade" ), "all"); - Assert.assertEquals(node.getAttribute( "access" ), "field"); + assertEquals(node.getAttribute( "name" ),"someSpecificProperty"); + assertEquals(node.getAttribute( "id-type" ),"long"); + assertEquals(node.getAttribute( "meta-type" ),"string"); + assertEquals(node.getAttribute( "cascade" ), "all"); + assertEquals(node.getAttribute( "access" ), "field"); nodeList = node.getElementsByTagName("column"); - Assert.assertEquals("Expected to get two column elements", 2, nodeList.getLength()); + assertEquals(2, nodeList.getLength(), "Expected to get two column elements"); nodeList = node.getElementsByTagName("meta-value"); - Assert.assertEquals("Expected to get three meta-value elements", 3, nodeList.getLength()); + assertEquals(3, nodeList.getLength(), "Expected to get three meta-value elements"); node = (Element) nodeList.item(0); String className = node.getAttribute( "class" ); - Assert.assertNotNull("Expected class attribute in meta-value", className); + assertNotNull(className, "Expected class attribute in meta-value"); if (className.indexOf("IntegerPropertyValue") > 0){ - Assert.assertEquals(node.getAttribute( "value" ),"I"); + assertEquals(node.getAttribute( "value" ),"I"); } else if (className.indexOf("StringPropertyValue") > 0){ - Assert.assertEquals(node.getAttribute( "value" ),"S"); + assertEquals(node.getAttribute( "value" ),"S"); } else { - Assert.assertTrue(className.indexOf("ComplexPropertyValue") > 0); - Assert.assertEquals(node.getAttribute( "value" ),"C"); + assertTrue(className.indexOf("ComplexPropertyValue") > 0); + assertEquals(node.getAttribute( "value" ),"C"); } } @Test public void testMetaValueRead() throws Exception{ PersistentClass pc = metadata.getEntityBinding("org.hibernate.tool.hbm2x.hbm2hbmxml.MapAndAnyTest.Person"); - Assert.assertNotNull(pc); + assertNotNull(pc); Property prop = pc.getProperty("data"); - Assert.assertNotNull(prop); - Assert.assertTrue(prop.getValue() instanceof Any); + assertNotNull(prop); + assertTrue(prop.getValue() instanceof Any); Any any = (Any) prop.getValue(); - Assert.assertTrue("Expected to get one meta-value element", any.getMetaValues() != null); - Assert.assertEquals("Expected to get one meta-value element", 1, any.getMetaValues().size()); + assertTrue(any.getMetaValues() != null, "Expected to get one meta-value element"); + assertEquals(1, any.getMetaValues().size(), "Expected to get one meta-value element"); } @Test public void testMapManyToAny() throws Exception { - File outputXml = new File(outputDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/PropertySet.hbm.xml"); + File outputXml = new File(srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/PropertySet.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); @@ -179,37 +185,37 @@ public void testMapManyToAny() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/map") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one any element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one any element"); Element node = (Element) nodeList.item(0); - Assert.assertEquals(node.getAttribute( "name" ),"generalProperties"); - Assert.assertEquals(node.getAttribute( "table" ),"T_GEN_PROPS"); - Assert.assertEquals(node.getAttribute( "lazy" ),"true"); - Assert.assertEquals(node.getAttribute( "cascade" ), "all"); - Assert.assertEquals(node.getAttribute( "access" ), "field"); + assertEquals(node.getAttribute( "name" ),"generalProperties"); + assertEquals(node.getAttribute( "table" ),"T_GEN_PROPS"); + assertEquals(node.getAttribute( "lazy" ),"true"); + assertEquals(node.getAttribute( "cascade" ), "all"); + assertEquals(node.getAttribute( "access" ), "field"); nodeList = node.getElementsByTagName("key"); - Assert.assertEquals("Expected to get one key element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one key element"); nodeList = node.getElementsByTagName("map-key"); - Assert.assertEquals("Expected to get one map-key element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one map-key element"); node = (Element) nodeList.item(0); - Assert.assertEquals(node.getAttribute( "type" ),"string"); + assertEquals(node.getAttribute( "type" ),"string"); nodeList = node.getElementsByTagName("column"); - Assert.assertEquals("Expected to get one column element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one column element"); node = (Element)node.getParentNode();//map nodeList = node.getElementsByTagName("many-to-any"); - Assert.assertEquals("Expected to get one many-to-any element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one many-to-any element"); node = (Element) nodeList.item(0); nodeList = node.getElementsByTagName("column"); - Assert.assertEquals("Expected to get two column elements", 2, nodeList.getLength()); + assertEquals(2, nodeList.getLength(), "Expected to get two column elements"); nodeList = node.getElementsByTagName("meta-value"); - Assert.assertEquals("Expected to get two meta-value elements", 2, nodeList.getLength()); + assertEquals(2, nodeList.getLength(), "Expected to get two meta-value elements"); node = (Element) nodeList.item(0); String className = node.getAttribute( "class" ); - Assert.assertNotNull("Expected class attribute in meta-value", className); + assertNotNull(className, "Expected class attribute in meta-value"); if (className.indexOf("IntegerPropertyValue") > 0){ - Assert.assertEquals(node.getAttribute( "value" ),"I"); + assertEquals(node.getAttribute( "value" ),"I"); } else { - Assert.assertTrue(className.indexOf("StringPropertyValue") > 0); - Assert.assertEquals(node.getAttribute( "value" ),"S"); + assertTrue(className.indexOf("StringPropertyValue") > 0); + assertEquals(node.getAttribute( "value" ),"S"); } } From 4da244e9483a2dc473c3d3e75300422ff8ade2e7 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 29 Jun 2021 15:40:56 +0200 Subject: [PATCH 267/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.hbm2hbmxml.OneToOneTest.TestCase' Signed-off-by: Koen Aers --- .../hbm2hbmxml/OneToOneTest/Address.java | 20 +++++ .../hbm2x/hbm2hbmxml/OneToOneTest/Person.java | 20 +++++ .../hbm2hbmxml/OneToOneTest/TestCase.java | 87 +++++++++++-------- 3 files changed, 91 insertions(+), 36 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/Address.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/Address.java index 136ec9f30f..0e973468ba 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/Address.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/Address.java @@ -1,3 +1,23 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.OneToOneTest; public class Address { diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/Person.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/Person.java index 2f24e2ca10..83fb219005 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/Person.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/Person.java @@ -1,3 +1,23 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.OneToOneTest; public class Person { diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/TestCase.java index b2f525cddf..f83415b5bf 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/TestCase.java @@ -1,12 +1,29 @@ -//$Id$ - -/* - * Tests for generating the HBM documents from the Configuration data structure. - * The generated XML document will be validated and queried to make sure the - * basic structure is correct in each test. +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.OneToOneTest; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; + import java.io.File; import java.util.Properties; @@ -23,11 +40,9 @@ import org.hibernate.tool.hbm2x.HibernateMappingExporter; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; @@ -40,45 +55,45 @@ public class TestCase { "PersonAddressOneToOnePrimaryKey.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); - private File outputDir = null; + private File srcDir = null; private File resourcesDir = null; private Exporter hbmexporter = null; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "output"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); hbmexporter = new HibernateMappingExporter(); hbmexporter.setMetadataDescriptor(metadataDescriptor); - hbmexporter.setOutputDirectory(outputDir); + hbmexporter.setOutputDirectory(srcDir); hbmexporter.start(); } @Test public void testAllFilesExistence() { - Assert.assertFalse(new File( - outputDir, "GeneralHbmSettings.hbm.xml") + assertFalse(new File( + srcDir, "GeneralHbmSettings.hbm.xml") .exists()); JUnitUtil.assertIsNonEmptyFile( new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/Person.hbm.xml")); JUnitUtil.assertIsNonEmptyFile( new File( - outputDir, + srcDir, "/org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/Address.hbm.xml")); } @Test public void testArtifactCollection() { - Assert.assertEquals( + assertEquals( 2, hbmexporter.getArtifactCollector().getFileCount("hbm.xml")); } @@ -86,10 +101,10 @@ public void testArtifactCollection() { @Test public void testReadable() { File personHbmXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/Person.hbm.xml"); File addressHbmXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/Address.hbm.xml"); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); @@ -97,12 +112,12 @@ public void testReadable() { File[] files = new File[] { personHbmXml, addressHbmXml }; MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files, properties); - Assert.assertNotNull(metadataDescriptor.createMetadata()); + assertNotNull(metadataDescriptor.createMetadata()); } public void testOneToOne() throws Exception { File xmlFile = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/Person.hbm.xml"); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); @@ -111,22 +126,22 @@ public void testOneToOne() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/one-to-one") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one-to-one element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one-to-one element"); Element node = (Element) nodeList.item(0); - Assert.assertEquals(node.getAttribute( "name" ),"address"); - Assert.assertEquals(node.getAttribute( "constrained" ),"false"); + assertEquals(node.getAttribute( "name" ),"address"); + assertEquals(node.getAttribute( "constrained" ),"false"); xmlFile = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/Address.hbm.xml"); document = db.parse(xmlFile); nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/one-to-one") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one set element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one set element"); node = (Element)nodeList.item(0); - Assert.assertEquals(node.getAttribute( "name" ),"person"); - Assert.assertEquals(node.getAttribute( "constrained" ),"true"); - Assert.assertEquals(node.getAttribute( "access" ), "field"); + assertEquals(node.getAttribute( "name" ),"person"); + assertEquals(node.getAttribute( "constrained" ),"true"); + assertEquals(node.getAttribute( "access" ), "field"); } } From fc5c94fa4fa8326a8250adc26da90ce8352c4e47 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 29 Jun 2021 16:02:51 +0200 Subject: [PATCH 268/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.hbm2hbmxml.SetElementTest.TestCase' Signed-off-by: Koen Aers --- .../hbm2hbmxml/SetElementTest/Search.java | 21 ++++- .../hbm2hbmxml/SetElementTest/TestCase.java | 85 ++++++++++--------- 2 files changed, 65 insertions(+), 41 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/SetElementTest/Search.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/SetElementTest/Search.java index c98b066c8a..86f57699eb 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/SetElementTest/Search.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/SetElementTest/Search.java @@ -1,4 +1,23 @@ -//$Id$ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.SetElementTest; import java.util.SortedSet; diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/SetElementTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/SetElementTest/TestCase.java index 326ebf7459..e1d27781d8 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/SetElementTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/SetElementTest/TestCase.java @@ -1,21 +1,28 @@ /* - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.SetElementTest; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + import java.io.File; import java.util.Properties; @@ -32,11 +39,9 @@ import org.hibernate.tool.hbm2x.HibernateMappingExporter; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; @@ -51,24 +56,24 @@ public class TestCase { "Search.hbm.xml", }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private Exporter hbmexporter = null; - private File outputDir = null; + private File srcDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "output"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); hbmexporter = new HibernateMappingExporter(); hbmexporter.setMetadataDescriptor(metadataDescriptor); - hbmexporter.setOutputDirectory(outputDir); + hbmexporter.setOutputDirectory(srcDir); hbmexporter.start(); } @@ -76,14 +81,14 @@ public void setUp() throws Exception { public void testAllFilesExistence() { JUnitUtil.assertIsNonEmptyFile( new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/SetElementTest/Search.hbm.xml")); } @Test public void testReadable() { File searchHbmXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/SetElementTest/Search.hbm.xml"); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); @@ -91,14 +96,14 @@ public void testReadable() { File[] files = new File[] { searchHbmXml }; MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files, properties); - Assert.assertNotNull(metadataDescriptor.createMetadata()); + assertNotNull(metadataDescriptor.createMetadata()); } @Test public void testKey() throws Exception { File outputXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/SetElementTest/Search.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -108,13 +113,13 @@ public void testKey() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/set/key") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one key element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one key element"); Element node = (Element)nodeList.item(0); if (node.getAttribute( "column" ) != null && !"".equals(node.getAttribute("column"))) {//implied attribute - Assert.assertEquals(node.getAttribute( "column" ),"searchString"); + assertEquals(node.getAttribute( "column" ),"searchString"); } else { node = (Element)node.getElementsByTagName("column").item(0); - Assert.assertEquals(node.getAttribute( "name" ),"searchString"); + assertEquals(node.getAttribute( "name" ),"searchString"); } } @@ -122,7 +127,7 @@ public void testKey() throws Exception { public void testSetElement() throws Exception { File outputXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/SetElementTest/Search.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -132,20 +137,20 @@ public void testSetElement() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/set") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one set element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one set element"); Element node = (Element) nodeList.item(0); - Assert.assertEquals(node.getAttribute( "name" ),"searchResults"); - Assert.assertEquals(node.getAttribute( "access" ),"field"); + assertEquals(node.getAttribute( "name" ),"searchResults"); + assertEquals(node.getAttribute( "access" ),"field"); nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/set/element") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one element 'element'", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one element 'element'"); node = (Element) nodeList.item(0); - Assert.assertEquals(node.getAttribute( "type" ), "string"); + assertEquals(node.getAttribute( "type" ), "string"); nodeList = node.getElementsByTagName("column"); - Assert.assertEquals("Expected to get one element 'column'", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one element 'column'"); node = (Element) nodeList.item(0); - Assert.assertEquals(node.getAttribute( "name" ), "text"); + assertEquals(node.getAttribute( "name" ), "text"); } } From 6e062b6da88b8ea9681a0a472d9d53371c624d47 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 29 Jun 2021 16:20:06 +0200 Subject: [PATCH 269/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.hbm2hbmxml.TypeParamsTest.TestCase' Signed-off-by: Koen Aers --- .../hbm2hbmxml/TypeParamsTest/TestCase.java | 118 +++++++++--------- 1 file changed, 62 insertions(+), 56 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/TypeParamsTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/TypeParamsTest/TestCase.java index 30fdc0878a..631082a091 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/TypeParamsTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/TypeParamsTest/TestCase.java @@ -1,21 +1,29 @@ /* - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.hbm2hbmxml.TypeParamsTest; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import java.util.HashMap; import java.util.Map; @@ -35,11 +43,9 @@ import org.hibernate.tool.hbm2x.HibernateMappingExporter; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; @@ -54,23 +60,23 @@ public class TestCase { "Order.hbm.xml", }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); - private File outputDir = null; + private File srcDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "output"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); Exporter hbmexporter = new HibernateMappingExporter(); hbmexporter.setMetadataDescriptor(metadataDescriptor); - hbmexporter.setOutputDirectory(outputDir); + hbmexporter.setOutputDirectory(srcDir); hbmexporter.start(); } @@ -78,7 +84,7 @@ public void setUp() throws Exception { public void testAllFilesExistence() { JUnitUtil.assertIsNonEmptyFile( new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/TypeParamsTest/Order.hbm.xml")); } @@ -86,7 +92,7 @@ public void testAllFilesExistence() { public void testReadable() { File orderHbmXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/TypeParamsTest/Order.hbm.xml"); Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); @@ -94,13 +100,13 @@ public void testReadable() { File[] files = new File[] { orderHbmXml }; MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files, properties); - Assert.assertNotNull(metadataDescriptor.createMetadata()); + assertNotNull(metadataDescriptor.createMetadata()); } @Test public void testTypeParamsElements() throws Exception { File outputXml = new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/TypeParamsTest/Order.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); @@ -110,7 +116,7 @@ public void testTypeParamsElements() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/property") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one property element", 2, nodeList.getLength()); + assertEquals(2, nodeList.getLength(), "Expected to get one property element"); Element statusElement = (Element) nodeList.item(0); Element nameElement = (Element) nodeList.item(1); if(!statusElement.getAttribute( "name" ).equals("status")) { @@ -118,42 +124,42 @@ public void testTypeParamsElements() throws Exception { nameElement = statusElement; statusElement = temp; } - Assert.assertEquals(statusElement.getAttribute( "name" ),"status"); + assertEquals(statusElement.getAttribute( "name" ),"status"); nodeList = statusElement.getElementsByTagName("type"); - Assert.assertEquals("Expected to get one type element", 1, nodeList.getLength()); + assertEquals( 1, nodeList.getLength(), "Expected to get one type element"); nodeList = ((Element) nodeList.item(0)).getElementsByTagName("param"); - Assert.assertEquals("Expected to get 5 params elements", nodeList.getLength(), 5); + assertEquals(nodeList.getLength(), 5, "Expected to get 5 params elements"); Map params = new HashMap(); for (int i = 0; i < nodeList.getLength(); i++) { Element param = (Element) nodeList.item(i); params.put(param.getAttribute( "name" ), param.getTextContent()); } Set set = params.keySet(); - Assert.assertEquals("Expected to get 5 different params elements", params.size(), 5); - Assert.assertTrue( - "Can't find 'catalog' param", - set.contains("catalog")); - Assert.assertEquals("", params.get("catalog")); - Assert.assertTrue( - "Can't find 'column' param", - set.contains("column")); - Assert.assertEquals("STATUS", params.get("column")); - Assert.assertTrue( - "Can't find 'table' param", - set.contains("table")); - Assert.assertEquals("ORDERS", params.get("table")); - Assert.assertTrue( - "Can't find 'schema' param", - set.contains("schema")); - Assert.assertEquals("", params.get("schema")); - Assert.assertTrue( - "Can't find 'enumClass' param", - set.contains("enumClass")); - Assert.assertEquals( + assertEquals(params.size(), 5, "Expected to get 5 different params elements"); + assertTrue( + set.contains("catalog"), + "Can't find 'catalog' param"); + assertEquals("", params.get("catalog")); + assertTrue( + set.contains("column"), + "Can't find 'column' param"); + assertEquals("STATUS", params.get("column")); + assertTrue( + set.contains("table"), + "Can't find 'table' param"); + assertEquals("ORDERS", params.get("table")); + assertTrue( + set.contains("schema"), + "Can't find 'schema' param"); + assertEquals("", params.get("schema")); + assertTrue( + set.contains("enumClass"), + "Can't find 'enumClass' param"); + assertEquals( "org.hibernate.tool.hbm2x.hbm2hbmxml.Order$Status", params.get("enumClass")); - Assert.assertTrue("property name should not have any type element",nameElement.getElementsByTagName("type").getLength() == 0); - Assert.assertEquals(nameElement.getAttribute("type"), "string"); + assertTrue(nameElement.getElementsByTagName("type").getLength() == 0, "property name should not have any type element"); + assertEquals(nameElement.getAttribute("type"), "string"); } } From 935d35c0260f457be9504def2f499dd3a956725d Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 29 Jun 2021 16:34:33 +0200 Subject: [PATCH 270/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.Hbm2HibernateDAOTest.TestCase' Signed-off-by: Koen Aers --- .../hbm2x/Hbm2HibernateDAOTest/TestCase.java | 66 ++++++++++++------- 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2HibernateDAOTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2HibernateDAOTest/TestCase.java index 40c382c8a2..a9a7cb2dd6 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2HibernateDAOTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2HibernateDAOTest/TestCase.java @@ -1,9 +1,27 @@ /* - * Created on 2004-12-01 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.Hbm2HibernateDAOTest; +import static org.junit.jupiter.api.Assertions.assertNull; + import java.io.File; import java.io.IOException; import java.util.ArrayList; @@ -19,11 +37,9 @@ import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; import org.hibernate.tools.test.util.JavaUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author max @@ -36,26 +52,26 @@ public class TestCase { "Author.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); - - private File outputDir = null; + @TempDir + public File outputFolder = new File("output"); + + private File srcDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "output"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); POJOExporter javaExporter = new POJOExporter(); javaExporter.setMetadataDescriptor(metadataDescriptor); - javaExporter.setOutputDirectory(outputDir); + javaExporter.setOutputDirectory(srcDir); POJOExporter exporter = new DAOExporter(); exporter.setMetadataDescriptor(metadataDescriptor); - exporter.setOutputDirectory(outputDir); + exporter.setOutputDirectory(srcDir); exporter.getProperties().setProperty("ejb3", "false"); exporter.getProperties().setProperty("jdk5", "true"); exporter.start(); @@ -65,22 +81,22 @@ public void setUp() throws Exception { @Test public void testFileExistence() { JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/Hbm2HibernateDAOTest/ArticleHome.java") ); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/Hbm2HibernateDAOTest/AuthorHome.java") ); } @Test public void testCompilable() throws IOException { - File compiled = new File(temporaryFolder.getRoot(), "compiled"); + File compiled = new File(outputFolder, "compiled"); compiled.mkdir(); - FileUtil.generateNoopComparator(outputDir); + FileUtil.generateNoopComparator(srcDir); List jars = new ArrayList(); jars.add(JavaUtil.resolvePathToJarFileFor(Persistence.class)); // for jpa api jars.add(JavaUtil.resolvePathToJarFileFor(Version.class)); // for hibernate core - JavaUtil.compile(outputDir, compiled, jars); + JavaUtil.compile(srcDir, compiled, jars); JUnitUtil.assertIsNonEmptyFile(new File( compiled, "org/hibernate/tool/hbm2x/Hbm2HibernateDAOTest/AuthorHome.class") ); @@ -100,12 +116,12 @@ public void testCompilable() throws IOException { @Test public void testNoVelocityLeftOvers() { - Assert.assertNull(FileUtil.findFirstString( + assertNull(FileUtil.findFirstString( "$", - new File(outputDir, "org/hibernate/tool/hbm2x/Hbm2HibernateDAOTest/ArticleHome.java"))); - Assert.assertNull(FileUtil.findFirstString( + new File(srcDir, "org/hibernate/tool/hbm2x/Hbm2HibernateDAOTest/ArticleHome.java"))); + assertNull(FileUtil.findFirstString( "$", - new File(outputDir, "org/hibernate/tool/hbm2x/Hbm2HibernateDAOTest/AuthorHome.java") ) ); + new File(srcDir, "org/hibernate/tool/hbm2x/Hbm2HibernateDAOTest/AuthorHome.java") ) ); } } From bf4130627d1c879d8f5ced150c1a6c9535a473c4 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 29 Jun 2021 16:51:41 +0200 Subject: [PATCH 271/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.Hbm2JavaConstructorTest.TestCase' Signed-off-by: Koen Aers --- .../Hbm2JavaConstructorTest/TestCase.java | 99 +++++++++++-------- 1 file changed, 59 insertions(+), 40 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaConstructorTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaConstructorTest/TestCase.java index cf812b235a..1ccd15d943 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaConstructorTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaConstructorTest/TestCase.java @@ -1,9 +1,30 @@ /* - * Created on 2004-12-01 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.Hbm2JavaConstructorTest; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import java.nio.file.Files; import java.util.HashSet; @@ -22,11 +43,9 @@ import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JavaUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author max @@ -38,26 +57,26 @@ public class TestCase { "Constructors.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); - private File outputDir = null; + private File srcDir = null; private File resourcesDir = null; private Metadata metadata = null; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "output"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); metadata = metadataDescriptor.createMetadata(); Exporter exporter = new POJOExporter(); exporter.setMetadataDescriptor(metadataDescriptor); - exporter.setOutputDirectory(outputDir); + exporter.setOutputDirectory(srcDir); exporter.start(); } @@ -65,28 +84,28 @@ public void setUp() throws Exception { public void testCompilable() throws Exception { String constructorUsageResourcePath = "/org/hibernate/tool/hbm2x/Hbm2JavaConstructorTest/ConstructorUsage.java_"; File constructorUsageOrigin = new File(getClass().getResource(constructorUsageResourcePath).toURI()); - File constructorUsageDestination = new File(outputDir, "ConstructorUsage.java"); - File targetDir = new File(temporaryFolder.getRoot(), "compilerOutput" ); + File constructorUsageDestination = new File(srcDir, "ConstructorUsage.java"); + File targetDir = new File(outputFolder, "compilerOutput" ); targetDir.mkdir(); Files.copy(constructorUsageOrigin.toPath(), constructorUsageDestination.toPath()); - JavaUtil.compile(outputDir, targetDir); - Assert.assertTrue(new File(targetDir, "ConstructorUsage.class").exists()); - Assert.assertTrue(new File(targetDir, "Company.class").exists()); - Assert.assertTrue(new File(targetDir, "BigCompany.class").exists()); - Assert.assertTrue(new File(targetDir, "EntityAddress.class").exists()); + JavaUtil.compile(srcDir, targetDir); + assertTrue(new File(targetDir, "ConstructorUsage.class").exists()); + assertTrue(new File(targetDir, "Company.class").exists()); + assertTrue(new File(targetDir, "BigCompany.class").exists()); + assertTrue(new File(targetDir, "EntityAddress.class").exists()); } @Test public void testNoVelocityLeftOvers() { - Assert.assertNull(FileUtil.findFirstString( + assertNull(FileUtil.findFirstString( "$", - new File(outputDir, "Company.java" ) ) ); - Assert.assertNull(FileUtil.findFirstString( + new File(srcDir, "Company.java" ) ) ); + assertNull(FileUtil.findFirstString( "$", - new File(outputDir,"BigCompany.java" ) ) ); - Assert.assertNull(FileUtil.findFirstString( + new File(srcDir,"BigCompany.java" ) ) ); + assertNull(FileUtil.findFirstString( "$", - new File(outputDir,"EntityAddress.java" ) ) ); + new File(srcDir,"EntityAddress.java" ) ) ); } @Test @@ -95,31 +114,31 @@ public void testEntityConstructorLogic() { POJOClass company = c2j.getPOJOClass(metadata.getEntityBinding("Company")); List all = company.getPropertyClosureForFullConstructor(); assertNoDuplicates(all); - Assert.assertEquals(3, all.size()); + assertEquals(3, all.size()); List superCons = company.getPropertyClosureForSuperclassFullConstructor(); - Assert.assertEquals("company is a base class, should not have superclass cons",0, superCons.size()); + assertEquals(0, superCons.size(), "company is a base class, should not have superclass cons"); List subCons = company.getPropertiesForFullConstructor(); assertNoDuplicates(subCons); - Assert.assertEquals(3, subCons.size()); + assertEquals(3, subCons.size()); assertNoOverlap(superCons, subCons); POJOClass bigCompany = c2j.getPOJOClass(metadata.getEntityBinding("BigCompany")); List bigsuperCons = bigCompany.getPropertyClosureForSuperclassFullConstructor(); assertNoDuplicates(bigsuperCons); //assertEquals(3, bigsuperCons.size()); List bigsubCons = bigCompany.getPropertiesForFullConstructor(); - Assert.assertEquals(1, bigsubCons.size()); + assertEquals(1, bigsubCons.size()); assertNoOverlap(bigsuperCons, bigsubCons); List bigall = bigCompany.getPropertyClosureForFullConstructor(); assertNoDuplicates(bigall); - Assert.assertEquals(4, bigall.size()); + assertEquals(4, bigall.size()); PersistentClass classMapping = metadata.getEntityBinding("Person"); POJOClass person = c2j.getPOJOClass(classMapping); List propertiesForMinimalConstructor = person.getPropertiesForMinimalConstructor(); - Assert.assertEquals(2,propertiesForMinimalConstructor.size()); - Assert.assertFalse(propertiesForMinimalConstructor.contains(classMapping.getIdentifierProperty())); + assertEquals(2,propertiesForMinimalConstructor.size()); + assertFalse(propertiesForMinimalConstructor.contains(classMapping.getIdentifierProperty())); List propertiesForFullConstructor = person.getPropertiesForFullConstructor(); - Assert.assertEquals(2,propertiesForFullConstructor.size()); - Assert.assertFalse(propertiesForFullConstructor.contains(classMapping.getIdentifierProperty())); + assertEquals(2,propertiesForFullConstructor.size()); + assertFalse(propertiesForFullConstructor.contains(classMapping.getIdentifierProperty())); } @Test @@ -128,22 +147,22 @@ public void testMinimal() { metadata.getEntityBinding("BrandProduct"), new Cfg2JavaTool()); List propertiesForMinimalConstructor = bp.getPropertiesForMinimalConstructor(); - Assert.assertEquals(1,propertiesForMinimalConstructor.size()); + assertEquals(1,propertiesForMinimalConstructor.size()); List propertiesForFullConstructor = bp.getPropertiesForFullConstructor(); - Assert.assertEquals(2, propertiesForFullConstructor.size()); + assertEquals(2, propertiesForFullConstructor.size()); } private void assertNoDuplicates(List bigall) { Set set = new HashSet(); set.addAll(bigall); - Assert.assertEquals("list had duplicates!",set.size(),bigall.size()); + assertEquals(set.size(),bigall.size(), "list had duplicates!"); } private void assertNoOverlap(List first, List second) { Set set = new HashSet(); set.addAll(first); set.addAll(second); - Assert.assertEquals(set.size(),first.size()+second.size()); + assertEquals(set.size(),first.size()+second.size()); } } From 04a00c55b4d52d0a931247aca49ef0dfcb72deab Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 29 Jun 2021 17:42:01 +0200 Subject: [PATCH 272/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.Hbm2JavaDidirectionalIndexedCollectionMappingTest.TestCase' Signed-off-by: Koen Aers --- .../TestCase.java | 48 ++++++++++++------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaDidirectionalIndexedCollectionMappingTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaDidirectionalIndexedCollectionMappingTest/TestCase.java index ccea98c70f..8fa5a9d9cd 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaDidirectionalIndexedCollectionMappingTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaDidirectionalIndexedCollectionMappingTest/TestCase.java @@ -1,20 +1,36 @@ /* - * Created on 2004-12-01 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.Hbm2JavaDidirectionalIndexedCollectionMappingTest; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import org.hibernate.tool.api.metadata.MetadataDescriptor; import org.hibernate.tool.hbm2x.Exporter; import org.hibernate.tool.hbm2x.POJOExporter; import org.hibernate.tools.test.util.HibernateUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author max @@ -26,30 +42,30 @@ public class TestCase { "GenericModel.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); - private File outputDir = null; + private File srcDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "output"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); Exporter exporter = new POJOExporter(); exporter.setMetadataDescriptor(metadataDescriptor); - exporter.setOutputDirectory(outputDir); + exporter.setOutputDirectory(srcDir); exporter.start(); } @Test public void testReflection() throws Exception { - Assert.assertTrue(new File(outputDir, "GenericObject.java").exists()); - Assert.assertTrue(new File(outputDir, "GenericValue.java").exists()); + assertTrue(new File(srcDir, "GenericObject.java").exists()); + assertTrue(new File(srcDir, "GenericValue.java").exists()); } } From 8ba75ed55fbb4c224ddf9af7aa8827cd7ae083fe Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 29 Jun 2021 17:58:46 +0200 Subject: [PATCH 273/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.Hbm2JavaEjb3Test.TestCase' Signed-off-by: Koen Aers --- .../tool/hbm2x/Hbm2JavaEjb3Test/TestCase.java | 127 ++++++++++-------- 1 file changed, 73 insertions(+), 54 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaEjb3Test/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaEjb3Test/TestCase.java index b836db861d..cb9b387eae 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaEjb3Test/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaEjb3Test/TestCase.java @@ -1,9 +1,30 @@ /* - * Created on 2004-12-01 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.Hbm2JavaEjb3Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import java.util.ArrayList; import java.util.List; @@ -25,11 +46,9 @@ import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; import org.hibernate.tools.test.util.JavaUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author max @@ -44,27 +63,27 @@ public class TestCase { "Passenger.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); - - private File outputDir = null; + @TempDir + public File outputFolder = new File("output"); + + private File srcDir = null; private File resourcesDir = null; private Metadata metadata = null; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "output"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); metadata = metadataDescriptor.createMetadata(); - FileUtil.generateNoopComparator(outputDir); + FileUtil.generateNoopComparator(srcDir); POJOExporter exporter = new POJOExporter(); exporter.setMetadataDescriptor(metadataDescriptor); - exporter.setOutputDirectory(outputDir); + exporter.setOutputDirectory(srcDir); exporter.setTemplatePath(new String[0]); exporter.getProperties().setProperty("ejb3", "true"); exporter.getProperties().setProperty("jdk5", "true"); @@ -74,41 +93,41 @@ public void setUp() throws Exception { @Test public void testFileExistence() { JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/Hbm2JavaEjb3Test/Author.java")); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/Hbm2JavaEjb3Test/Article.java")); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/Hbm2JavaEjb3Test/Train.java")); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/Hbm2JavaEjb3Test/Passenger.java") ); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/Hbm2JavaEjb3Test/TransportationPk.java") ); } @Test public void testBasicComponent() { - Assert.assertEquals( + assertEquals( "@Embeddable", FileUtil.findFirstString( "@Embeddable", new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/Hbm2JavaEjb3Test/TransportationPk.java"))); } @Test public void testCompile() { - File compiled = new File(temporaryFolder.getRoot(), "compiled"); + File compiled = new File(outputFolder, "compiled"); compiled.mkdir(); List jars = new ArrayList(); jars.add(JavaUtil.resolvePathToJarFileFor(Persistence.class)); // for jpa api jars.add(JavaUtil.resolvePathToJarFileFor(Version.class)); // for hibernate core - JavaUtil.compile(outputDir, compiled, jars); + JavaUtil.compile(srcDir, compiled, jars); JUnitUtil.assertIsNonEmptyFile(new File( compiled, "comparator/NoopComparator.class") ); @@ -133,10 +152,10 @@ public void testCompile() { public void testEqualsHashCode() { PersistentClass classMapping = metadata.getEntityBinding("org.hibernate.tool.hbm2x.Hbm2JavaEjb3Test.Passenger"); POJOClass clazz = new Cfg2JavaTool().getPOJOClass(classMapping); - Assert.assertFalse(clazz.needsEqualsHashCode()); + assertFalse(clazz.needsEqualsHashCode()); classMapping = metadata.getEntityBinding("org.hibernate.tool.hbm2x.Hbm2JavaEjb3Test.Article"); clazz = new Cfg2JavaTool().getPOJOClass(classMapping); - Assert.assertTrue(clazz.needsEqualsHashCode()); + assertTrue(clazz.needsEqualsHashCode()); } @Test @@ -146,30 +165,30 @@ public void testAnnotationColumnDefaults() { POJOClass clazz = cfg2java.getPOJOClass(classMapping); Property p = classMapping.getProperty("content"); String string = clazz.generateAnnColumnAnnotation( p ); - Assert.assertNotNull(string); - Assert.assertEquals(-1, string.indexOf("unique=")); - Assert.assertTrue(string.indexOf("nullable=")>=0); - Assert.assertEquals(-1, string.indexOf("insertable=")); - Assert.assertEquals(-1, string.indexOf("updatable=")); - Assert.assertTrue(string.indexOf("length=10000")>0); + assertNotNull(string); + assertEquals(-1, string.indexOf("unique=")); + assertTrue(string.indexOf("nullable=")>=0); + assertEquals(-1, string.indexOf("insertable=")); + assertEquals(-1, string.indexOf("updatable=")); + assertTrue(string.indexOf("length=10000")>0); p = classMapping.getProperty("name"); string = clazz.generateAnnColumnAnnotation( p ); - Assert.assertNotNull(string); - Assert.assertEquals(-1, string.indexOf("unique=")); - Assert.assertTrue(string.indexOf("nullable=")>=0); - Assert.assertEquals(-1, string.indexOf("insertable=")); - Assert.assertTrue(string.indexOf("updatable=false")>0); - Assert.assertTrue(string.indexOf("length=100")>0); + assertNotNull(string); + assertEquals(-1, string.indexOf("unique=")); + assertTrue(string.indexOf("nullable=")>=0); + assertEquals(-1, string.indexOf("insertable=")); + assertTrue(string.indexOf("updatable=false")>0); + assertTrue(string.indexOf("length=100")>0); classMapping = metadata.getEntityBinding( "org.hibernate.tool.hbm2x.Hbm2JavaEjb3Test.Train" ); clazz = cfg2java.getPOJOClass(classMapping); p = classMapping.getProperty( "name" ); string = clazz.generateAnnColumnAnnotation( p ); - Assert.assertNotNull(string); - Assert.assertTrue(string.indexOf("unique=true")>0); - Assert.assertTrue(string.indexOf("nullable=")>=0); - Assert.assertEquals(-1, string.indexOf("insertable=")); - Assert.assertEquals(-1,string.indexOf("updatable=")); - Assert.assertEquals(-1, string.indexOf("length=")); + assertNotNull(string); + assertTrue(string.indexOf("unique=true")>0); + assertTrue(string.indexOf("nullable=")>=0); + assertEquals(-1, string.indexOf("insertable=")); + assertEquals(-1,string.indexOf("updatable=")); + assertEquals(-1, string.indexOf("length=")); } @Test @@ -178,36 +197,36 @@ public void testEmptyCascade() { Cfg2JavaTool cfg2java = new Cfg2JavaTool(); EntityPOJOClass clazz = (EntityPOJOClass) cfg2java.getPOJOClass(classMapping); Property property = classMapping.getProperty( "author" ); - Assert.assertEquals(0, clazz.getCascadeTypes( property ).length); - Assert.assertEquals( + assertEquals(0, clazz.getCascadeTypes( property ).length); + assertEquals( null, FileUtil.findFirstString( "cascade={}", new File( - outputDir, + srcDir, "org/hibernate/tool/hbm2x/Hbm2JavaEjb3Test/Article.java") )); } @Test public void testAnnotationBuilder() { AnnotationBuilder builder = AnnotationBuilder.createAnnotation("SingleCleared").resetAnnotation( "Single" ); - Assert.assertEquals("@Single", builder.getResult()); + assertEquals("@Single", builder.getResult()); builder = AnnotationBuilder.createAnnotation("javax.persistence.OneToMany") .addAttribute("willbecleared", (String)null) .resetAnnotation("javax.persistence.OneToMany") .addAttribute("cascade", new String[] { "val1", "val2"}) .addAttribute("fetch", "singleValue"); - Assert.assertEquals("@javax.persistence.OneToMany(cascade={val1, val2}, fetch=singleValue)", builder.getResult()); + assertEquals("@javax.persistence.OneToMany(cascade={val1, val2}, fetch=singleValue)", builder.getResult()); builder = AnnotationBuilder.createAnnotation("javax.persistence.OneToMany"); builder.addAttribute("cascade", (String[])null); builder.addAttribute("fetch", (String)null); - Assert.assertEquals("@javax.persistence.OneToMany", builder.getResult()); + assertEquals("@javax.persistence.OneToMany", builder.getResult()); builder = AnnotationBuilder.createAnnotation("abc"); ArrayList list = new ArrayList(); list.add(new Integer(42)); list.add( new String("xxx") ); builder.addQuotedAttributes( "it", list.iterator() ); - Assert.assertEquals("@abc(it={\"42\", \"xxx\"})", builder.getResult()); + assertEquals("@abc(it={\"42\", \"xxx\"})", builder.getResult()); List columns = new ArrayList(); columns.add("first"); columns.add("second"); @@ -219,8 +238,8 @@ public String transform(String object) { }); constraint.addAttribute( "single", "value" ); String attribute = constraint.getAttributeAsString("columnNames"); - Assert.assertEquals("{\"first\", \"second\"}", attribute); - Assert.assertEquals("value", constraint.getAttributeAsString( "single" )); + assertEquals("{\"first\", \"second\"}", attribute); + assertEquals("value", constraint.getAttributeAsString( "single" )); } } From 5fd7a9b0bc4df5387d89e1ad80428f01759e6e97 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 29 Jun 2021 18:15:04 +0200 Subject: [PATCH 274/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.Hbm2JavaEqualsTest.TestCase' Signed-off-by: Koen Aers --- .../hbm2x/Hbm2JavaEqualsTest/TestCase.java | 91 ++++++++++++------- 1 file changed, 56 insertions(+), 35 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaEqualsTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaEqualsTest/TestCase.java index 0b95d73318..446a96b41e 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaEqualsTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaEqualsTest/TestCase.java @@ -1,5 +1,28 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.Hbm2JavaEqualsTest; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import java.io.FileWriter; import java.lang.reflect.InvocationHandler; @@ -16,11 +39,9 @@ import org.hibernate.tool.hbm2x.POJOExporter; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JavaUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { @@ -44,18 +65,18 @@ public class TestCase { " int getId(); "+ System.lineSeparator() + "} "; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); - private File outputDir = null; + private File srcDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() throws Exception { // create output folder - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "output"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); // export class ProxiedTestEntity.java and UnProxiedTestEntity File hbmXml = new File(resourcesDir, "testEntity.hbm.xml"); @@ -69,21 +90,21 @@ public void setUp() throws Exception { .createNativeDescriptor(null, new File[] { hbmXml }, properties); Exporter exporter = new POJOExporter(); exporter.setMetadataDescriptor(metadataDescriptor); - exporter.setOutputDirectory(outputDir); + exporter.setOutputDirectory(srcDir); exporter.start(); // copy interface EntityProxy.java - File file = new File(outputDir, "org/hibernate/tool/hbm2x/Hbm2JavaEquals/TestEntityProxy.java"); + File file = new File(srcDir, "org/hibernate/tool/hbm2x/Hbm2JavaEquals/TestEntityProxy.java"); FileWriter writer = new FileWriter(file); writer.write(TEST_ENTITY_PROXY_JAVA); writer.close(); // compile the source files - JavaUtil.compile(outputDir); + JavaUtil.compile(srcDir); } @Test public void testEqualsWithoutProxy() throws Exception { // load the entity class and lookup the setId method - URL[] urls = new URL[] { outputDir.toURI().toURL() }; + URL[] urls = new URL[] { srcDir.toURI().toURL() }; ClassLoader oldLoader = Thread.currentThread().getContextClassLoader(); URLClassLoader ucl = new URLClassLoader(urls, oldLoader ); Class entityClass = ucl.loadClass("org.hibernate.tool.hbm2x.Hbm2JavaEquals.UnProxiedTestEntity"); @@ -95,20 +116,20 @@ public void testEqualsWithoutProxy() throws Exception { // - 'false' when comparing against an object of a different class Object firstEntity = entityClass.newInstance(); setId.invoke(firstEntity, new Object[] { Integer.MAX_VALUE }); - Assert.assertTrue(firstEntity.equals(firstEntity)); - Assert.assertFalse(firstEntity.equals(null)); - Assert.assertFalse(firstEntity.equals(new Object())); + assertTrue(firstEntity.equals(firstEntity)); + assertFalse(firstEntity.equals(null)); + assertFalse(firstEntity.equals(new Object())); // create a second entity and check the 'normal behavior // - 'true' if the id property is the same // - 'false' if the id property is different Object secondEntity = entityClass.newInstance(); setId.invoke(secondEntity, new Object[] { Integer.MAX_VALUE }); - Assert.assertTrue(firstEntity.equals(secondEntity)); - Assert.assertTrue(secondEntity.equals(firstEntity)); + assertTrue(firstEntity.equals(secondEntity)); + assertTrue(secondEntity.equals(firstEntity)); setId.invoke(secondEntity, new Object[] { Integer.MIN_VALUE }); - Assert.assertFalse(firstEntity.equals(secondEntity)); - Assert.assertFalse(secondEntity.equals(firstEntity)); + assertFalse(firstEntity.equals(secondEntity)); + assertFalse(secondEntity.equals(firstEntity)); ucl.close(); } @@ -117,7 +138,7 @@ public void testEqualsWithoutProxy() throws Exception { public void testEqualsWithProxy() throws Exception { // load the entity and proxy classes, lookup the setId method and create a proxy object - URL[] urls = new URL[] { outputDir.toURI().toURL() }; + URL[] urls = new URL[] { srcDir.toURI().toURL() }; ClassLoader oldLoader = Thread.currentThread().getContextClassLoader(); URLClassLoader ucl = new URLClassLoader(urls, oldLoader ); Class entityClass = ucl.loadClass("org.hibernate.tool.hbm2x.Hbm2JavaEquals.ProxiedTestEntity"); @@ -135,28 +156,28 @@ public void testEqualsWithProxy() throws Exception { // - 'false' when comparing against an object of a different class (that is not the proxy class) Object firstEntity = entityClass.newInstance(); setId.invoke(firstEntity, new Object[] { Integer.MAX_VALUE }); - Assert.assertTrue(firstEntity.equals(firstEntity)); - Assert.assertFalse(firstEntity.equals(null)); - Assert.assertFalse(firstEntity.equals(new Object())); + assertTrue(firstEntity.equals(firstEntity)); + assertFalse(firstEntity.equals(null)); + assertFalse(firstEntity.equals(new Object())); // create a second proxied entity and check the 'normal behavior // - 'true' if the id property is the same // - 'false' if the id property is different Object secondEntity = entityClass.newInstance(); setId.invoke(secondEntity, new Object[] { Integer.MAX_VALUE }); - Assert.assertTrue(firstEntity.equals(secondEntity)); - Assert.assertTrue(secondEntity.equals(firstEntity)); + assertTrue(firstEntity.equals(secondEntity)); + assertTrue(secondEntity.equals(firstEntity)); setId.invoke(secondEntity, new Object[] { Integer.MIN_VALUE }); - Assert.assertFalse(firstEntity.equals(secondEntity)); - Assert.assertFalse(secondEntity.equals(firstEntity)); + assertFalse(firstEntity.equals(secondEntity)); + assertFalse(secondEntity.equals(firstEntity)); // compare both proxied entities with the proxy handler.id = Integer.MAX_VALUE; - Assert.assertTrue(firstEntity.equals(testEntityProxy)); - Assert.assertFalse(secondEntity.equals(testEntityProxy)); + assertTrue(firstEntity.equals(testEntityProxy)); + assertFalse(secondEntity.equals(testEntityProxy)); handler.id = Integer.MIN_VALUE; - Assert.assertFalse(firstEntity.equals(testEntityProxy)); - Assert.assertTrue(secondEntity.equals(testEntityProxy)); + assertFalse(firstEntity.equals(testEntityProxy)); + assertTrue(secondEntity.equals(testEntityProxy)); ucl.close(); } From b92c29f46117e13277211d8248c39205b814fd13 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 29 Jun 2021 18:29:32 +0200 Subject: [PATCH 275/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.Hbm2JavaInitializationTest.TestCase' Signed-off-by: Koen Aers --- .../Hbm2JavaInitializationTest/TestCase.java | 108 +++++++++++------- 1 file changed, 64 insertions(+), 44 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaInitializationTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaInitializationTest/TestCase.java index 596661a580..cbca11ca2b 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaInitializationTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaInitializationTest/TestCase.java @@ -1,9 +1,31 @@ /* - * Created on 2004-12-01 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.Hbm2JavaInitializationTest; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.io.File; + import org.hibernate.boot.Metadata; import org.hibernate.mapping.PersistentClass; import org.hibernate.mapping.Property; @@ -11,11 +33,9 @@ import org.hibernate.tool.hbm2x.pojo.ImportContextImpl; import org.hibernate.tool.hbm2x.pojo.POJOClass; import org.hibernate.tools.test.util.HibernateUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author max @@ -30,18 +50,18 @@ public class TestCase { "Passenger.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); - + @TempDir + public File outputFolder = new File("output"); + private Metadata metadata = null; - @Before + @BeforeEach public void setUp() throws Exception { metadata = HibernateUtil .initializeMetadataDescriptor( this, HBM_XML_FILES, - temporaryFolder.getRoot()) + outputFolder) .createMetadata(); } @@ -51,47 +71,47 @@ public void testFieldInitializationAndTypeNames() { Cfg2JavaTool cfg2java = new Cfg2JavaTool(); POJOClass clazz = cfg2java.getPOJOClass(classMapping); Property p = classMapping.getProperty("AMap"); - Assert.assertEquals("all types should be fully qualified when no importcontext","java.util.Map",cfg2java.getJavaTypeName(p, true)); - Assert.assertEquals("Map",cfg2java.getJavaTypeName(p, true, clazz)); - Assert.assertEquals("new HashMap(0)", clazz.getFieldInitialization(p, true)); - Assert.assertEquals("new HashMap(0)", clazz.getFieldInitialization(p, false)); + assertEquals("java.util.Map",cfg2java.getJavaTypeName(p, true), "all types should be fully qualified when no importcontext"); + assertEquals("Map",cfg2java.getJavaTypeName(p, true, clazz)); + assertEquals("new HashMap(0)", clazz.getFieldInitialization(p, true)); + assertEquals("new HashMap(0)", clazz.getFieldInitialization(p, false)); p = classMapping.getProperty("aList"); - Assert.assertEquals("lists should not have the index visible in the declaration", "List
",cfg2java.getJavaTypeName(p, true, clazz)); - Assert.assertEquals("all types should be fully qualified when no importcontext","java.util.List",cfg2java.getJavaTypeName(p, true)); - Assert.assertEquals("new ArrayList
(0)", clazz.getFieldInitialization(p, true)); - Assert.assertEquals("new ArrayList(0)", clazz.getFieldInitialization(p, false)); + assertEquals("List
",cfg2java.getJavaTypeName(p, true, clazz), "lists should not have the index visible in the declaration"); + assertEquals("java.util.List",cfg2java.getJavaTypeName(p, true), "all types should be fully qualified when no importcontext"); + assertEquals("new ArrayList
(0)", clazz.getFieldInitialization(p, true)); + assertEquals("new ArrayList(0)", clazz.getFieldInitialization(p, false)); p = classMapping.getProperty("content"); - Assert.assertEquals("\"what can I say\"",clazz.getFieldInitialization(p, false)); + assertEquals("\"what can I say\"",clazz.getFieldInitialization(p, false)); p = classMapping.getProperty("bagarticles"); - Assert.assertEquals("Should be a list via property-type", "java.util.List", cfg2java.getJavaTypeName( p, false )); - Assert.assertEquals("Should be a a generic'd list when generics=true", "java.util.List", cfg2java.getJavaTypeName( p, true )); - Assert.assertEquals("List
",cfg2java.getJavaTypeName(p, true, clazz)); - Assert.assertEquals("new ArrayList
(0)", clazz.getFieldInitialization(p, true)); - Assert.assertEquals("new ArrayList(0)", clazz.getFieldInitialization(p, false)); + assertEquals("java.util.List", cfg2java.getJavaTypeName( p, false ), "Should be a list via property-type"); + assertEquals("java.util.List", cfg2java.getJavaTypeName( p, true ), "Should be a a generic'd list when generics=true"); + assertEquals("List
",cfg2java.getJavaTypeName(p, true, clazz)); + assertEquals("new ArrayList
(0)", clazz.getFieldInitialization(p, true)); + assertEquals("new ArrayList(0)", clazz.getFieldInitialization(p, false)); p = classMapping.getProperty("bagstrings"); - Assert.assertEquals("Bag's are just a collection", "java.util.Collection", cfg2java.getJavaTypeName( p, false )); - Assert.assertEquals("Should be a a generic'd collection when generics=true", "java.util.Collection", cfg2java.getJavaTypeName( p, true )); - Assert.assertEquals("Collection",cfg2java.getJavaTypeName(p, true, clazz)); - Assert.assertEquals("new ArrayList(0)", clazz.getFieldInitialization(p, true)); - Assert.assertEquals("new ArrayList(0)", clazz.getFieldInitialization(p, false)); + assertEquals("java.util.Collection", cfg2java.getJavaTypeName( p, false ), "Bag's are just a collection"); + assertEquals("java.util.Collection", cfg2java.getJavaTypeName( p, true ), "Should be a a generic'd collection when generics=true"); + assertEquals("Collection",cfg2java.getJavaTypeName(p, true, clazz)); + assertEquals("new ArrayList(0)", clazz.getFieldInitialization(p, true)); + assertEquals("new ArrayList(0)", clazz.getFieldInitialization(p, false)); p = classMapping.getProperty("bagstrings"); - Assert.assertEquals("new ArrayList(0)", clazz.getFieldInitialization(p, false)); + assertEquals("new ArrayList(0)", clazz.getFieldInitialization(p, false)); p = classMapping.getProperty("naturalSortedArticlesMap"); - Assert.assertEquals("java.util.SortedMap", cfg2java.getJavaTypeName( p, false)); - Assert.assertEquals("SortedMap", cfg2java.getJavaTypeName( p, true, new ImportContextImpl("") )); - Assert.assertEquals("new TreeMap()", clazz.getFieldInitialization(p, true)); - Assert.assertEquals("new TreeMap()", clazz.getFieldInitialization(p, false)); + assertEquals("java.util.SortedMap", cfg2java.getJavaTypeName( p, false)); + assertEquals("SortedMap", cfg2java.getJavaTypeName( p, true, new ImportContextImpl("") )); + assertEquals("new TreeMap()", clazz.getFieldInitialization(p, true)); + assertEquals("new TreeMap()", clazz.getFieldInitialization(p, false)); p = classMapping.getProperty("sortedArticlesMap"); - Assert.assertEquals("java.util.SortedMap", cfg2java.getJavaTypeName( p, false)); - Assert.assertEquals("SortedMap", cfg2java.getJavaTypeName( p, true, new ImportContextImpl("") )); - Assert.assertFalse(clazz.generateImports().contains("import comparator.NoopComparator;")); - Assert.assertEquals("new TreeMap(new NoopComparator())", clazz.getFieldInitialization(p, false)); - Assert.assertTrue(clazz.generateImports().contains("import comparator.NoopComparator;")); - Assert.assertEquals("new TreeMap(new NoopComparator())", clazz.getFieldInitialization(p, true)); + assertEquals("java.util.SortedMap", cfg2java.getJavaTypeName( p, false)); + assertEquals("SortedMap", cfg2java.getJavaTypeName( p, true, new ImportContextImpl("") )); + assertFalse(clazz.generateImports().contains("import comparator.NoopComparator;")); + assertEquals("new TreeMap(new NoopComparator())", clazz.getFieldInitialization(p, false)); + assertTrue(clazz.generateImports().contains("import comparator.NoopComparator;")); + assertEquals("new TreeMap(new NoopComparator())", clazz.getFieldInitialization(p, true)); p = classMapping.getProperty("sortedArticlesSet"); - Assert.assertEquals("java.util.SortedSet", cfg2java.getJavaTypeName( p, false)); - Assert.assertEquals("SortedSet
", cfg2java.getJavaTypeName( p, true, new ImportContextImpl("") )); - Assert.assertEquals("new TreeSet
(new NoopComparator())", clazz.getFieldInitialization(p, true)); + assertEquals("java.util.SortedSet", cfg2java.getJavaTypeName( p, false)); + assertEquals("SortedSet
", cfg2java.getJavaTypeName( p, true, new ImportContextImpl("") )); + assertEquals("new TreeSet
(new NoopComparator())", clazz.getFieldInitialization(p, true)); } } From 7ea64c07d134b773942d1930cfceaadb3533b972 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 30 Jun 2021 09:41:07 +0200 Subject: [PATCH 276/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.Hbm2JavaTest.TestCase' Signed-off-by: Koen Aers --- .../hbm2x/Hbm2JavaTest/DummyDateType.java | 20 ++ .../tool/hbm2x/Hbm2JavaTest/TestCase.java | 337 +++++++++--------- 2 files changed, 198 insertions(+), 159 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaTest/DummyDateType.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaTest/DummyDateType.java index 43fbf89ea5..3cbb1147b5 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaTest/DummyDateType.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaTest/DummyDateType.java @@ -1,3 +1,23 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.Hbm2JavaTest; import java.io.Serializable; diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaTest/TestCase.java index c8678b4a29..d77264dcab 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaTest/TestCase.java @@ -1,9 +1,30 @@ /* - * Created on 2004-12-01 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.Hbm2JavaTest; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import java.nio.file.Files; import java.util.HashMap; @@ -31,12 +52,10 @@ import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; import org.hibernate.tools.test.util.JavaUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author max @@ -54,26 +73,26 @@ public class TestCase { "Passenger.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); - + @TempDir + public File outputFolder = new File("output"); + private Metadata metadata = null; private MetadataDescriptor metadataDescriptor = null; - private File outputDir = null; + private File scDir = null; private File resourcesDir = null; private ArtifactCollector artifactCollector = null; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + scDir = new File(outputFolder, "output"); + scDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); metadata = metadataDescriptor.createMetadata(); POJOExporter exporter = new POJOExporter(); exporter.setMetadataDescriptor(metadataDescriptor); - exporter.setOutputDirectory(outputDir); + exporter.setOutputDirectory(scDir); artifactCollector = new ArtifactCollector(); exporter.setArtifactCollector(artifactCollector); exporter.start(); @@ -82,60 +101,60 @@ public void setUp() throws Exception { @Test public void testFileExistence() { JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + scDir, "org/hibernate/tool/hbm2x/Hbm2JavaTest/Customer.java")); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + scDir, "org/hibernate/tool/hbm2x/Hbm2JavaTest/LineItem.java")); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + scDir, "org/hibernate/tool/hbm2x/Hbm2JavaTest/Order.java")); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + scDir, "org/hibernate/tool/hbm2x/Hbm2JavaTest/Train.java")); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + scDir, "org/hibernate/tool/hbm2x/Hbm2JavaTest/Passenger.java")); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + scDir, "org/hibernate/tool/hbm2x/Hbm2JavaTest/Product.java")); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + scDir, "generated/BaseHelloWorld.java")); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + scDir, "HelloUniverse.java")); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + scDir, "org/hibernate/tool/hbm2x/Hbm2JavaTest/FatherComponent.java")); JUnitUtil.assertIsNonEmptyFile(new File( - outputDir, + scDir, "org/hibernate/tool/hbm2x/Hbm2JavaTest/ChildComponent.java")); - Assert.assertEquals(15, artifactCollector.getFileCount("java")); + assertEquals(15, artifactCollector.getFileCount("java")); } // TODO Re-enable this test: HBX-1248 - @Ignore + @Disabled @Test public void testCompilable() throws Exception { String helloWorldResourcePath = "/org/hibernate/tool/hbm2x/Hbm2JavaTest/HelloWorld.java_"; File helloWorldOrigin = new File(getClass().getResource(helloWorldResourcePath).toURI()); - File helloWorldDestination = new File(outputDir, "HelloWorld.java"); - File targetDir = new File(temporaryFolder.getRoot(), "compilerOutput" ); + File helloWorldDestination = new File(scDir, "HelloWorld.java"); + File targetDir = new File(outputFolder, "compilerOutput" ); targetDir.mkdir(); Files.copy(helloWorldOrigin.toPath(), helloWorldDestination.toPath()); - JavaUtil.compile(outputDir, targetDir); - Assert.assertTrue(new File(targetDir, "HelloWorld.class").exists()); + JavaUtil.compile(scDir, targetDir); + assertTrue(new File(targetDir, "HelloWorld.class").exists()); } // TODO Implement HBX-606 so that the following test succeeds - @Ignore + @Disabled @Test public void testParentComponentFailureExpected() { File file = new File( - outputDir, + scDir, "org/hibernate/tool/hbm2x/Hbm2JavaTest/FatherComponent.java"); - Assert.assertEquals( + assertEquals( "test", FileUtil.findFirstString( "testParent", @@ -144,30 +163,30 @@ public void testParentComponentFailureExpected() { @Test public void testNoFreeMarkerLeftOvers() { - Assert.assertNull(FileUtil.findFirstString( + assertNull(FileUtil.findFirstString( "$", new File( - outputDir, + scDir, "org/hibernate/tool/hbm2x/Hbm2JavaTest/Customer.java"))); - Assert.assertNull(FileUtil.findFirstString( + assertNull(FileUtil.findFirstString( "$", new File( - outputDir, + scDir, "org/hibernate/tool/hbm2x/Hbm2JavaTest/LineItem.java"))); - Assert.assertNull(FileUtil.findFirstString( + assertNull(FileUtil.findFirstString( "$", new File( - outputDir, + scDir, "org/hibernate/tool/hbm2x/Hbm2JavaTest/Order.java"))); - Assert.assertNull(FileUtil.findFirstString( + assertNull(FileUtil.findFirstString( "$", new File( - outputDir, + scDir, "org/hibernate/tool/hbm2x/Hbm2JavaTest/Product.java"))); - Assert.assertNull(FileUtil.findFirstString( + assertNull(FileUtil.findFirstString( "$", new File( - outputDir, + scDir, "org/hibernate/tool/hbm2x/Hbm2JavaTest/Address.java"))); } @@ -176,36 +195,36 @@ public void testPackageName() { Cfg2JavaTool c2j = new Cfg2JavaTool(); PersistentClass classMapping = metadata.getEntityBinding("org.hibernate.tool.hbm2x.Hbm2JavaTest.Order"); POJOClass pc = c2j.getPOJOClass(classMapping); - Assert.assertEquals( "org.hibernate.tool.hbm2x.Hbm2JavaTest", pc.getPackageName() ); - Assert.assertEquals( "package org.hibernate.tool.hbm2x.Hbm2JavaTest;", pc.getPackageDeclaration() ); - Assert.assertEquals( - "did not honor generated-class", + assertEquals( "org.hibernate.tool.hbm2x.Hbm2JavaTest", pc.getPackageName() ); + assertEquals( "package org.hibernate.tool.hbm2x.Hbm2JavaTest;", pc.getPackageDeclaration() ); + assertEquals( "package generated;", c2j.getPOJOClass(metadata.getEntityBinding("HelloWorld")) - .getPackageDeclaration()); + .getPackageDeclaration(), + "did not honor generated-class"); } // TODO Re-enable this test: HBX-1242 - @Ignore + @Disabled @Test public void testFieldNotThere() { - Assert.assertNull(FileUtil.findFirstString( - "notgenerated", + assertNull(FileUtil.findFirstString( + "notgenerated", new File( - outputDir, + scDir, "HelloUniverse.java"))); } @Test public void testJavaDoc() { Cfg2JavaTool c2j = new Cfg2JavaTool(); - Assert.assertEquals( " * test", c2j.toJavaDoc( "test", 0 ) ); - Assert.assertEquals( " * test", c2j.toJavaDoc( "test", 2 ) ); - Assert.assertEquals( " * test\n * me", c2j.toJavaDoc( "test\nme", 2 ) ); + assertEquals( " * test", c2j.toJavaDoc( "test", 0 ) ); + assertEquals( " * test", c2j.toJavaDoc( "test", 2 ) ); + assertEquals( " * test\n * me", c2j.toJavaDoc( "test\nme", 2 ) ); PersistentClass local = metadata.getEntityBinding( "HelloWorld" ); POJOClass pc = c2j.getPOJOClass(local); - Assert.assertEquals( " * Hey there", pc.getClassJavaDoc( "fallback", 0 ) ); - Assert.assertEquals( + assertEquals( " * Hey there", pc.getClassJavaDoc( "fallback", 0 ) ); + assertEquals( " * Test Field Description", pc.getFieldJavaDoc(local.getIdentifierProperty(), 0 ) ); } @@ -213,11 +232,11 @@ public void testJavaDoc() { @Test public void testExtraCode() { Cfg2JavaTool c2j = new Cfg2JavaTool(); - Assert.assertFalse(c2j.hasMetaAttribute( + assertFalse(c2j.hasMetaAttribute( metadata.getEntityBinding("HelloWorld" ), "class-code" ) ); PersistentClass classMapping = metadata.getEntityBinding( "org.hibernate.tool.hbm2x.Hbm2JavaTest.Order" ); - Assert.assertEquals( + assertEquals( "// extra code line 1\n// extra code line 2\n{ Collator.getInstance(); }", c2j.getPOJOClass(classMapping).getExtraClassCode() ); } @@ -227,8 +246,8 @@ public void testScope() { Cfg2JavaTool c2j = new Cfg2JavaTool(); PersistentClass pc = metadata.getEntityBinding( "org.hibernate.tool.hbm2x.Hbm2JavaTest.Order" ); - Assert.assertEquals( "public strictfp", c2j.getClassModifiers( pc ) ); - Assert.assertEquals("public", c2j.getClassModifiers(metadata.getEntityBinding( "HelloWorld" ) ) ); + assertEquals( "public strictfp", c2j.getClassModifiers( pc ) ); + assertEquals("public", c2j.getClassModifiers(metadata.getEntityBinding( "HelloWorld" ) ) ); } @Test @@ -236,8 +255,8 @@ public void testDeclarationType() { Cfg2JavaTool c2j = new Cfg2JavaTool(); PersistentClass pc = metadata.getEntityBinding( "org.hibernate.tool.hbm2x.Hbm2JavaTest.Order" ); - Assert.assertEquals( "class", c2j.getPOJOClass(pc).getDeclarationType() ); - Assert.assertEquals( "interface", c2j.getPOJOClass(metadata.getEntityBinding( "HelloWorld" ) ).getDeclarationType() ); + assertEquals( "class", c2j.getPOJOClass(pc).getDeclarationType() ); + assertEquals( "interface", c2j.getPOJOClass(metadata.getEntityBinding( "HelloWorld" ) ).getDeclarationType() ); } @Test @@ -246,7 +265,7 @@ public void testTypeName() { PersistentClass pc = metadata.getEntityBinding( "org.hibernate.tool.hbm2x.Hbm2JavaTest.Order" ); Property property = pc.getProperty( "lineItems" ); - Assert.assertEquals( "java.util.Collection", c2j.getJavaTypeName( property, false ) ); + assertEquals( "java.util.Collection", c2j.getJavaTypeName( property, false ) ); } @Test @@ -255,34 +274,34 @@ public void testUseRawTypeNullability() { PersistentClass pc = metadata.getEntityBinding( "org.hibernate.tool.hbm2x.Hbm2JavaTest.Product" ); Property property = pc.getProperty( "numberAvailable" ); - Assert.assertFalse( property.getValue().isNullable() ); - Assert.assertEquals( - "typename should be used when rawtypemode", + assertFalse( property.getValue().isNullable() ); + assertEquals( "int", - c2j.getJavaTypeName( property, false ) ); + c2j.getJavaTypeName( property, false ), + "typename should be used when rawtypemode"); property = pc.getProperty( "minStock" ); - Assert.assertTrue( property.getValue().isNullable() ); - Assert.assertEquals( - "typename should be used when rawtypemode", + assertTrue( property.getValue().isNullable() ); + assertEquals( "long", - c2j.getJavaTypeName( property, false ) ); + c2j.getJavaTypeName( property, false ), + "typename should be used when rawtypemode"); property = pc.getProperty( "otherStock" ); - Assert.assertFalse( property.getValue().isNullable() ); - Assert.assertEquals( - "type should still be overriden by meta attribute", + assertFalse( property.getValue().isNullable() ); + assertEquals( "java.lang.Integer", - c2j.getJavaTypeName( property, false ) ); + c2j.getJavaTypeName( property, false ), + "type should still be overriden by meta attribute"); property = pc.getIdentifierProperty(); - Assert.assertFalse( property.getValue().isNullable() ); - Assert.assertEquals( - "wrappers should be used by default", + assertFalse( property.getValue().isNullable() ); + assertEquals( "long", - c2j.getJavaTypeName( property, false ) ); + c2j.getJavaTypeName( property, false ), + "wrappers should be used by default"); pc = metadata.getEntityBinding( "org.hibernate.tool.hbm2x.Hbm2JavaTest.Customer" ); Component identifier = (Component) pc.getIdentifier(); - Assert.assertFalse(((Property) identifier.getPropertyIterator().next() ) + assertFalse(((Property) identifier.getPropertyIterator().next() ) .getValue().isNullable() ); - Assert.assertEquals( "long", c2j.getJavaTypeName( property, false ) ); + assertEquals( "long", c2j.getJavaTypeName( property, false ) ); } @Test @@ -290,22 +309,22 @@ public void testExtendsImplements() { Cfg2JavaTool c2j = new Cfg2JavaTool(); PersistentClass pc = metadata.getEntityBinding( "org.hibernate.tool.hbm2x.Hbm2JavaTest.Order" ); - Assert.assertEquals( null, c2j.getPOJOClass(pc).getExtends() ); + assertEquals( null, c2j.getPOJOClass(pc).getExtends() ); POJOClass entityPOJOClass = c2j.getPOJOClass(metadata.getEntityBinding("HelloWorld" )); - Assert.assertEquals( "Comparable", entityPOJOClass.getExtends() ); - Assert.assertNull( - "should be interface which cannot have implements", - entityPOJOClass.getImplements() ); - Assert.assertEquals( - "should be interface which cannot have implements", + assertEquals( "Comparable", entityPOJOClass.getExtends() ); + assertNull( + entityPOJOClass.getImplements(), + "should be interface which cannot have implements"); + assertEquals( "", - entityPOJOClass.getImplementsDeclaration() ); + entityPOJOClass.getImplementsDeclaration(), + "should be interface which cannot have implements"); PersistentClass base = new RootClass(null); base.setClassName( "Base" ); PersistentClass sub = new SingleTableSubclass( base, null ); sub.setClassName( "Sub" ); - Assert.assertEquals( null, c2j.getPOJOClass(base).getExtends() ); - Assert.assertEquals( "Base", c2j.getPOJOClass(sub).getExtends() ); + assertEquals( null, c2j.getPOJOClass(base).getExtends() ); + assertEquals( "Base", c2j.getPOJOClass(sub).getExtends() ); Map m = new HashMap(); MetaAttribute attribute = new MetaAttribute( "extends" ); attribute.addValue( "x" ); @@ -315,13 +334,13 @@ public void testExtendsImplements() { attribute.addValue( "true" ); m.put( attribute.getName(), attribute ); sub.setMetaAttributes( m ); - Assert.assertEquals( "Base,x,y", c2j.getPOJOClass(sub).getExtends() ); + assertEquals( "Base,x,y", c2j.getPOJOClass(sub).getExtends() ); m = new HashMap(); attribute = new MetaAttribute( "implements" ); attribute.addValue( "intf" ); m.put( attribute.getName(), attribute ); base.setMetaAttributes( m ); - Assert.assertEquals( "intf,java.io.Serializable", c2j.getPOJOClass(base).getImplements() ); + assertEquals( "intf,java.io.Serializable", c2j.getPOJOClass(base).getImplements() ); } @Test @@ -331,9 +350,9 @@ public void testDeclarationName() { "org.hibernate.tool.hbm2x.Hbm2JavaTest.Order" ); PersistentClass hw = metadata.getEntityBinding( "HelloWorld" ); POJOClass epc = c2j.getPOJOClass(pc); - Assert.assertEquals( "Order", epc.getDeclarationName() ); + assertEquals( "Order", epc.getDeclarationName() ); epc = c2j.getPOJOClass(hw); - Assert.assertEquals( "BaseHelloWorld", epc.getDeclarationName() ); + assertEquals( "BaseHelloWorld", epc.getDeclarationName() ); } @Test @@ -341,11 +360,11 @@ public void testAsArguments() { Cfg2JavaTool c2j = new Cfg2JavaTool(); PersistentClass pc = metadata.getEntityBinding( "org.hibernate.tool.hbm2x.Hbm2JavaTest.Order" ); - Assert.assertEquals( + assertEquals( "java.util.Calendar orderDate, java.math.BigDecimal total, org.hibernate.tool.hbm2x.Hbm2JavaTest.Customer customer, java.util.Collection lineItems", c2j.asParameterList( pc.getPropertyIterator(), false, new NoopImportContext() )); - Assert.assertEquals( + assertEquals( "orderDate, total, customer, lineItems", c2j.asArgumentList( pc.getPropertyIterator() ) ); } @@ -356,13 +375,13 @@ public void testPropertiesForFullConstructor() { PersistentClass pc = metadata.getEntityBinding( "HelloWorld" ); POJOClass pjc = c2j.getPOJOClass(pc); List wl = pjc.getPropertiesForFullConstructor(); - Assert.assertEquals( 3, wl.size() ); + assertEquals( 3, wl.size() ); PersistentClass uni = metadata.getEntityBinding( "HelloUniverse" ); pjc = c2j.getPOJOClass(uni); List local = pjc.getPropertyClosureForFullConstructor(); - Assert.assertEquals( 6, local.size() ); + assertEquals( 6, local.size() ); for(int i=0;i iter = pjc.getToStringPropertiesIterator(); // in HelloWorld.hbm.xml there're 2 Properties for toString - Assert.assertEquals( "id", (iter.next() ).getName() ); - Assert.assertEquals( "hello", (iter.next() ).getName() ); - Assert.assertFalse( iter.hasNext() ); + assertEquals( "id", (iter.next() ).getName() ); + assertEquals( "hello", (iter.next() ).getName() ); + assertFalse( iter.hasNext() ); pc = metadata.getEntityBinding( "org.hibernate.tool.hbm2x.Hbm2JavaTest.Order" ); pjc = c2j.getPOJOClass(pc); - Assert.assertFalse( pjc.needsToString() ); + assertFalse( pjc.needsToString() ); pc = metadata.getEntityBinding( "org.hibernate.tool.hbm2x.Hbm2JavaTest.Customer" ); Component c = (Component) pc.getProperty( "addressComponent" ) .getValue(); POJOClass cc = c2j.getPOJOClass(c); - Assert.assertTrue( cc.needsToString() ); + assertTrue( cc.needsToString() ); iter = cc.getToStringPropertiesIterator(); // in Customer.hbm.xml there's 1 Property for toString - Assert.assertEquals( "city", (iter.next() ).getName() ); - Assert.assertFalse( iter.hasNext() ); + assertEquals( "city", (iter.next() ).getName() ); + assertFalse( iter.hasNext() ); } @Test public void testImportOfSameName() { ImportContext ic = new ImportContextImpl("foobar"); - Assert.assertEquals("CascadeType", ic.importType("javax.persistence.CascadeType")); - Assert.assertEquals("org.hibernate.annotations.CascadeType", ic.importType("org.hibernate.annotations.CascadeType")); - Assert.assertTrue("The hibernate annotation should not be imported to avoid name clashes", ic.generateImports().indexOf("hibernate")<0); + assertEquals("CascadeType", ic.importType("javax.persistence.CascadeType")); + assertEquals("org.hibernate.annotations.CascadeType", ic.importType("org.hibernate.annotations.CascadeType")); + assertTrue(ic.generateImports().indexOf("hibernate")<0, "The hibernate annotation should not be imported to avoid name clashes"); } @Test public void testImporter() { ImportContext context = new ImportContextImpl( "org.hibernate" ); - Assert.assertEquals("byte", context.importType("byte")); - Assert.assertEquals("Session", context.importType("org.hibernate.Session")); - Assert.assertEquals("Long", context.importType("java.lang.Long")); - Assert.assertEquals("org.test.Session", context.importType("org.test.Session")); - Assert.assertEquals("Entity", context.importType("org.test.Entity")); - Assert.assertEquals("org.other.test.Entity", context.importType("org.other.test.Entity")); - Assert.assertEquals("Collection", context.importType("java.util.Collection")); - Assert.assertEquals("Map", context.importType("java.util.Map")); - Assert.assertEquals("Collection[]", context.importType("java.util.Collection[]")); - Assert.assertEquals("Map", context.importType("java.util.Map")); + assertEquals("byte", context.importType("byte")); + assertEquals("Session", context.importType("org.hibernate.Session")); + assertEquals("Long", context.importType("java.lang.Long")); + assertEquals("org.test.Session", context.importType("org.test.Session")); + assertEquals("Entity", context.importType("org.test.Entity")); + assertEquals("org.other.test.Entity", context.importType("org.other.test.Entity")); + assertEquals("Collection", context.importType("java.util.Collection")); + assertEquals("Map", context.importType("java.util.Map")); + assertEquals("Collection[]", context.importType("java.util.Collection[]")); + assertEquals("Map", context.importType("java.util.Map")); String string = context.generateImports(); - Assert.assertTrue(string.indexOf("import org.hibernate.Session;")<0); - Assert.assertTrue(string.indexOf("import org.test.Entity;")>0); - Assert.assertTrue("Entity can only be imported once", string.indexOf("import org.other.test.Entity;")<0); - Assert.assertFalse(string.indexOf("<")>=0); - Assert.assertEquals("Outer.Entity", context.importType("org.test.Outer$Entity")); - Assert.assertEquals("org.other.test.Outer.Entity", context.importType("org.other.test.Outer$Entity")); - Assert.assertEquals("Collection", context.importType("java.util.Collection")); - Assert.assertEquals("Map", context.importType("java.util.Map")); - Assert.assertEquals("Collection[]", context.importType("java.util.Collection[]")); - Assert.assertEquals("Map", context.importType("java.util.Map")); + assertTrue(string.indexOf("import org.hibernate.Session;")<0); + assertTrue(string.indexOf("import org.test.Entity;")>0); + assertTrue(string.indexOf("import org.other.test.Entity;")<0, "Entity can only be imported once"); + assertFalse(string.indexOf("<")>=0); + assertEquals("Outer.Entity", context.importType("org.test.Outer$Entity")); + assertEquals("org.other.test.Outer.Entity", context.importType("org.other.test.Outer$Entity")); + assertEquals("Collection", context.importType("java.util.Collection")); + assertEquals("Map", context.importType("java.util.Map")); + assertEquals("Collection[]", context.importType("java.util.Collection[]")); + assertEquals("Map", context.importType("java.util.Map")); //assertEquals("Test.Entry", context.importType("org.hibernate.Test.Entry")); what should be the behavior for this ? - Assert.assertEquals("Test.Entry", context.importType("org.hibernate.Test$Entry")); - Assert.assertEquals("Map.Entry", context.importType("java.util.Map$Entry")); - Assert.assertEquals("Entry", context.importType("java.util.Map.Entry")); // we can't detect that it is the same class here unless we try an load all strings so we fall back to default class name. - Assert.assertEquals("List", context.importType( "java.util.List" )); - Assert.assertEquals("List", context.importType( "java.util.List" )); + assertEquals("Test.Entry", context.importType("org.hibernate.Test$Entry")); + assertEquals("Map.Entry", context.importType("java.util.Map$Entry")); + assertEquals("Entry", context.importType("java.util.Map.Entry")); // we can't detect that it is the same class here unless we try an load all strings so we fall back to default class name. + assertEquals("List", context.importType( "java.util.List" )); + assertEquals("List", context.importType( "java.util.List" )); string = context.generateImports(); - Assert.assertTrue(string.indexOf("import java.util.Map")>=0); - Assert.assertTrue(string.indexOf("import java.utilMap$")<0); - Assert.assertTrue(string.indexOf("$")<0); + assertTrue(string.indexOf("import java.util.Map")>=0); + assertTrue(string.indexOf("import java.utilMap$")<0); + assertTrue(string.indexOf("$")<0); } @Test @@ -440,20 +459,20 @@ public void testEqualsHashCode() { Cfg2JavaTool c2j = new Cfg2JavaTool(); PersistentClass pc = metadata.getEntityBinding( "org.hibernate.tool.hbm2x.Hbm2JavaTest.Customer" ); POJOClass pjc = c2j.getPOJOClass((Component) pc.getProperty("addressComponent").getValue()); - Assert.assertTrue( pjc.needsEqualsHashCode() ); + assertTrue( pjc.needsEqualsHashCode() ); Iterator iter = pjc.getEqualsHashCodePropertiesIterator(); // in HelloWorld.hbm.xml there're 2 Properties for toString - Assert.assertEquals( "streetAddress1", iter.next().getName() ); - Assert.assertEquals( "city", iter.next().getName() ); - Assert.assertEquals( "verified", iter.next().getName() ); - Assert.assertFalse( iter.hasNext() ); + assertEquals( "streetAddress1", iter.next().getName() ); + assertEquals( "city", iter.next().getName() ); + assertEquals( "verified", iter.next().getName() ); + assertFalse( iter.hasNext() ); } // TODO Re-enable this test: HBX-1249 - @Ignore + @Disabled @Test public void testGenerics() throws Exception { - File genericsSource = new File(temporaryFolder.getRoot(), "genericssource"); + File genericsSource = new File(outputFolder, "genericssource"); POJOExporter exporter = new POJOExporter(); exporter.setMetadataDescriptor(metadataDescriptor); exporter.setOutputDirectory(genericsSource); @@ -461,23 +480,23 @@ public void testGenerics() throws Exception { exporter.setArtifactCollector(artifactCollector); exporter.getProperties().setProperty("jdk5", "true"); exporter.start(); - File genericsTarget = new File(temporaryFolder.getRoot(), "genericstarget" ); + File genericsTarget = new File(outputFolder, "genericstarget" ); genericsTarget.mkdir(); String helloWorldResourcePath = "/org/hibernate/tool/hbm2x/Hbm2JavaTest/HelloWorld.java_"; File helloWorldOrigin = new File(getClass().getResource(helloWorldResourcePath).toURI()); - File helloWorldDestination = new File(outputDir, "HelloWorld.java"); + File helloWorldDestination = new File(scDir, "HelloWorld.java"); Files.copy(helloWorldOrigin.toPath(), helloWorldDestination.toPath()); JavaUtil.compile(genericsSource, genericsTarget); - Assert.assertTrue(new File(genericsTarget, "HelloWorld.class").exists()); + assertTrue(new File(genericsTarget, "HelloWorld.class").exists()); } - @Ignore + @Disabled @Test public void testDynamicComponent() { PersistentClass classMapping = metadata.getEntityBinding( "org.hibernate.tool.hbm2x.Hbm2JavaTest.Customer"); - Assert.assertEquals( + assertEquals( "java.util.Map", new Cfg2JavaTool().getJavaTypeName( classMapping.getProperty("dynaMap"), false)); @@ -485,17 +504,17 @@ public void testDynamicComponent() { @Test public void testCapitializaiton() { - Assert.assertEquals("Mail", BasicPOJOClass.beanCapitalize("Mail")); - Assert.assertEquals("Mail", BasicPOJOClass.beanCapitalize("mail")); - Assert.assertEquals("eMail", BasicPOJOClass.beanCapitalize("eMail")); - Assert.assertEquals("EMail", BasicPOJOClass.beanCapitalize("EMail")); + assertEquals("Mail", BasicPOJOClass.beanCapitalize("Mail")); + assertEquals("Mail", BasicPOJOClass.beanCapitalize("mail")); + assertEquals("eMail", BasicPOJOClass.beanCapitalize("eMail")); + assertEquals("EMail", BasicPOJOClass.beanCapitalize("EMail")); } @Test public void testUserTypes() { PersistentClass classMapping = metadata.getEntityBinding("org.hibernate.tool.hbm2x.Hbm2JavaTest.Customer"); Property property = classMapping.getProperty("customDate"); - Assert.assertEquals("java.sql.Date", new Cfg2JavaTool().getJavaTypeName(property, false)); + assertEquals("java.sql.Date", new Cfg2JavaTool().getJavaTypeName(property, false)); } } From f7cade4b53adba1c9c50535bee91d2815235c8b1 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 30 Jun 2021 09:54:43 +0200 Subject: [PATCH 277/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.HibernateMappingExporterTest.TestCase' Signed-off-by: Koen Aers --- .../TestCase.java | 45 ++++++++++++++----- 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/HibernateMappingExporterTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/HibernateMappingExporterTest/TestCase.java index 2b52f3555e..89fdb1a1c0 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/HibernateMappingExporterTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/HibernateMappingExporterTest/TestCase.java @@ -1,5 +1,28 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.hibernate.tool.hbm2x.HibernateMappingExporterTest; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import java.io.FileWriter; import java.util.Properties; @@ -9,10 +32,8 @@ import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; import org.hibernate.tool.hbm2x.HibernateMappingExporter; import org.hibernate.tools.test.util.HibernateUtil; -import org.junit.Assert; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { @@ -25,12 +46,12 @@ public class TestCase { " "+ " "; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); - + @TempDir + public File outputFolder = new File("output"); + @Test public void testStart() throws Exception { - File resources = new File(temporaryFolder.getRoot(), "resources"); + File resources = new File(outputFolder, "resources"); resources.mkdir(); File fooHbmXmlOrigin = new File(resources, "origin.hbm.xml"); FileWriter writer = new FileWriter(fooHbmXmlOrigin); @@ -41,16 +62,16 @@ public void testStart() throws Exception { properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, new File[] { fooHbmXmlOrigin }, properties); - final File outputDir = new File(temporaryFolder.getRoot(), "output"); + final File outputDir = new File(outputFolder, "output"); outputDir.mkdir(); HibernateMappingExporter exporter = new HibernateMappingExporter(); exporter.setMetadataDescriptor(metadataDescriptor); exporter.setOutputDirectory(outputDir); final File fooHbmXml = new File(outputDir, "Foo.hbm.xml"); - Assert.assertFalse(fooHbmXml.exists()); + assertFalse(fooHbmXml.exists()); exporter.start(); - Assert.assertTrue(fooHbmXml.exists()); - Assert.assertTrue(fooHbmXml.delete()); + assertTrue(fooHbmXml.exists()); + assertTrue(fooHbmXml.delete()); } } From 451a82efdf099793196c98ce32943a02d58272d8 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 30 Jun 2021 10:10:12 +0200 Subject: [PATCH 278/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.OtherCfg2HbmTest.TestCase' Signed-off-by: Koen Aers --- .../tool/hbm2x/OtherCfg2HbmTest/TestCase.java | 81 +++++++++++-------- 1 file changed, 49 insertions(+), 32 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/OtherCfg2HbmTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/OtherCfg2HbmTest/TestCase.java index f7fcdbbc86..1abd0d18b1 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/OtherCfg2HbmTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/OtherCfg2HbmTest/TestCase.java @@ -1,9 +1,28 @@ /* - * Created on 2004-12-01 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.OtherCfg2HbmTest; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + import java.io.File; import java.util.Properties; @@ -22,11 +41,9 @@ import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; import org.w3c.dom.Document; import org.w3c.dom.NodeList; @@ -44,34 +61,34 @@ public class TestCase { "HelloWorld.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); - - private File outputDir = null; + @TempDir + public File outputFolder = new File("output"); + + private File srcDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() throws Exception { - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "output"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); Exporter hbmexporter = new HibernateMappingExporter(); hbmexporter.setMetadataDescriptor(metadataDescriptor); - hbmexporter.setOutputDirectory(outputDir); + hbmexporter.setOutputDirectory(srcDir); hbmexporter.start(); } @Test public void testFileExistence() { - JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "org/hibernate/tool/hbm2x/Customer.hbm.xml") ); - JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "org/hibernate/tool/hbm2x/LineItem.hbm.xml") ); - JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "org/hibernate/tool/hbm2x/Order.hbm.xml") ); - JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "org/hibernate/tool/hbm2x/Product.hbm.xml") ); - JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "HelloWorld.hbm.xml") ); - JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "HelloUniverse.hbm.xml") ); + JUnitUtil.assertIsNonEmptyFile(new File(srcDir, "org/hibernate/tool/hbm2x/Customer.hbm.xml") ); + JUnitUtil.assertIsNonEmptyFile(new File(srcDir, "org/hibernate/tool/hbm2x/LineItem.hbm.xml") ); + JUnitUtil.assertIsNonEmptyFile(new File(srcDir, "org/hibernate/tool/hbm2x/Order.hbm.xml") ); + JUnitUtil.assertIsNonEmptyFile(new File(srcDir, "org/hibernate/tool/hbm2x/Product.hbm.xml") ); + JUnitUtil.assertIsNonEmptyFile(new File(srcDir, "HelloWorld.hbm.xml") ); + JUnitUtil.assertIsNonEmptyFile(new File(srcDir, "HelloUniverse.hbm.xml") ); } @Test @@ -80,34 +97,34 @@ public void testReadable() { properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); File[] hbmFiles = new File[4]; - hbmFiles[0] = new File(outputDir, "org/hibernate/tool/hbm2x/Customer.hbm.xml"); - hbmFiles[1] = new File(outputDir, "org/hibernate/tool/hbm2x/LineItem.hbm.xml"); - hbmFiles[2] = new File(outputDir, "org/hibernate/tool/hbm2x/Order.hbm.xml"); - hbmFiles[3] = new File(outputDir, "org/hibernate/tool/hbm2x/Product.hbm.xml"); + hbmFiles[0] = new File(srcDir, "org/hibernate/tool/hbm2x/Customer.hbm.xml"); + hbmFiles[1] = new File(srcDir, "org/hibernate/tool/hbm2x/LineItem.hbm.xml"); + hbmFiles[2] = new File(srcDir, "org/hibernate/tool/hbm2x/Order.hbm.xml"); + hbmFiles[3] = new File(srcDir, "org/hibernate/tool/hbm2x/Product.hbm.xml"); Metadata metadata = MetadataDescriptorFactory .createNativeDescriptor(null, hbmFiles, properties) .createMetadata(); - Assert.assertNotNull(metadata); + assertNotNull(metadata); } @Test public void testNoVelocityLeftOvers() { - Assert.assertEquals(null, FileUtil.findFirstString("$",new File(outputDir, "org/hibernate/tool/hbm2x/Customer.hbm.xml") ) ); - Assert.assertEquals(null, FileUtil.findFirstString("$",new File(outputDir, "org/hibernate/tool/hbm2x/LineItem.hbm.xml") ) ); - Assert.assertEquals(null, FileUtil.findFirstString("$",new File(outputDir, "org/hibernate/tool/hbm2x/Order.hbm.xml") ) ); - Assert.assertEquals(null, FileUtil.findFirstString("$",new File(outputDir, "org/hibernate/tool/hbm2x/Product.hbm.xml") ) ); + assertEquals(null, FileUtil.findFirstString("$",new File(srcDir, "org/hibernate/tool/hbm2x/Customer.hbm.xml") ) ); + assertEquals(null, FileUtil.findFirstString("$",new File(srcDir, "org/hibernate/tool/hbm2x/LineItem.hbm.xml") ) ); + assertEquals(null, FileUtil.findFirstString("$",new File(srcDir, "org/hibernate/tool/hbm2x/Order.hbm.xml") ) ); + assertEquals(null, FileUtil.findFirstString("$",new File(srcDir, "org/hibernate/tool/hbm2x/Product.hbm.xml") ) ); } @Test public void testVersioning() throws Exception { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); - Document document = db.parse(new File(outputDir, "org/hibernate/tool/hbm2x/Product.hbm.xml")); + Document document = db.parse(new File(srcDir, "org/hibernate/tool/hbm2x/Product.hbm.xml")); XPath xpath = XPathFactory.newInstance().newXPath(); NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/version") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one version element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one version element"); } } From c5a9796e6cb8e1c76d58e9285047c4262376a1c2 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 30 Jun 2021 10:24:46 +0200 Subject: [PATCH 279/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.PropertiesTest.TestCase' Signed-off-by: Koen Aers --- .../tool/hbm2x/PropertiesTest/TestCase.java | 83 ++++++++++++------- 1 file changed, 51 insertions(+), 32 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/PropertiesTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/PropertiesTest/TestCase.java index 84e1c836b4..f1a3ca2ed9 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/PropertiesTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/PropertiesTest/TestCase.java @@ -1,9 +1,30 @@ /* - * Created on 2004-12-01 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbm2x.PropertiesTest; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import java.nio.file.Files; @@ -22,11 +43,9 @@ import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; import org.hibernate.tools.test.util.JavaUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; @@ -41,29 +60,29 @@ public class TestCase { "Properties.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); - + @TempDir + public File outputFolder = new File("output"); + private ArtifactCollector artifactCollector; - private File outputDir = null; + private File srcDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() throws Exception { artifactCollector = new ArtifactCollector(); - outputDir = new File(temporaryFolder.getRoot(), "output"); - outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + srcDir = new File(outputFolder, "output"); + srcDir.mkdir(); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); MetadataDescriptor metadataDescriptor = HibernateUtil .initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); Exporter exporter = new POJOExporter(); exporter.setMetadataDescriptor(metadataDescriptor); - exporter.setOutputDirectory(outputDir); + exporter.setOutputDirectory(srcDir); exporter.setArtifactCollector(artifactCollector); Exporter hbmexporter = new HibernateMappingExporter(); hbmexporter.setMetadataDescriptor(metadataDescriptor); - hbmexporter.setOutputDirectory(outputDir); + hbmexporter.setOutputDirectory(srcDir); hbmexporter.setArtifactCollector(artifactCollector); exporter.start(); hbmexporter.start(); @@ -71,13 +90,13 @@ public void setUp() throws Exception { @Test public void testNoGenerationOfEmbeddedPropertiesComponent() { - Assert.assertEquals(2, artifactCollector.getFileCount("java")); - Assert.assertEquals(2, artifactCollector.getFileCount("hbm.xml")); + assertEquals(2, artifactCollector.getFileCount("java")); + assertEquals(2, artifactCollector.getFileCount("hbm.xml")); } @Test public void testGenerationOfEmbeddedProperties() throws Exception { - File outputXml = new File(outputDir, "properties/PPerson.hbm.xml"); + File outputXml = new File(srcDir, "properties/PPerson.hbm.xml"); JUnitUtil.assertIsNonEmptyFile(outputXml); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); @@ -86,32 +105,32 @@ public void testGenerationOfEmbeddedProperties() throws Exception { NodeList nodeList = (NodeList)xpath .compile("//hibernate-mapping/class/properties") .evaluate(document, XPathConstants.NODESET); - Assert.assertEquals("Expected to get one properties element", 1, nodeList.getLength()); + assertEquals(1, nodeList.getLength(), "Expected to get one properties element"); Element element = (Element) nodeList.item(0); - Assert.assertEquals(element.getAttribute( "name" ),"emergencyContact"); - Assert.assertNotNull( + assertEquals(element.getAttribute( "name" ),"emergencyContact"); + assertNotNull( FileUtil.findFirstString( "name", - new File(outputDir, "properties/PPerson.java" ))); - Assert.assertNull( - "Embedded component/properties should not show up in .java", + new File(srcDir, "properties/PPerson.java" ))); + assertNull( FileUtil.findFirstString( "emergencyContact", - new File(outputDir, "properties/PPerson.java" ))); + new File(srcDir, "properties/PPerson.java" )), + "Embedded component/properties should not show up in .java"); } @Test public void testCompilable() throws Exception { String propertiesUsageResourcePath = "/org/hibernate/tool/hbm2x/PropertiesTest/PropertiesUsage.java_"; File propertiesUsageOrigin = new File(getClass().getResource(propertiesUsageResourcePath).toURI()); - File propertiesUsageDestination = new File(outputDir, "properties/PropertiesUsage.java"); - File targetDir = new File(temporaryFolder.getRoot(), "compilerOutput" ); + File propertiesUsageDestination = new File(srcDir, "properties/PropertiesUsage.java"); + File targetDir = new File(outputFolder, "compilerOutput" ); targetDir.mkdir(); Files.copy(propertiesUsageOrigin.toPath(), propertiesUsageDestination.toPath()); - JavaUtil.compile(outputDir, targetDir); - Assert.assertTrue(new File(targetDir, "properties/PCompany.class").exists()); - Assert.assertTrue(new File(targetDir, "properties/PPerson.class").exists()); - Assert.assertTrue(new File(targetDir, "properties/PropertiesUsage.class").exists()); + JavaUtil.compile(srcDir, targetDir); + assertTrue(new File(targetDir, "properties/PCompany.class").exists()); + assertTrue(new File(targetDir, "properties/PPerson.class").exists()); + assertTrue(new File(targetDir, "properties/PropertiesUsage.class").exists()); } } From 80116411f53ac37be7dea72e9e8520adea742802 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 30 Jun 2021 10:41:42 +0200 Subject: [PATCH 280/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ide.completion.CompletionHelperTest.TestCase' Signed-off-by: Koen Aers --- .../CompletionHelperTest/TestCase.java | 40 ++++++++++--------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/ide/completion/CompletionHelperTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/ide/completion/CompletionHelperTest/TestCase.java index bd3426938c..265e5f85fe 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/ide/completion/CompletionHelperTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/ide/completion/CompletionHelperTest/TestCase.java @@ -1,29 +1,33 @@ /* - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.ide.completion.CompletionHelperTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + import java.util.ArrayList; import java.util.List; import org.hibernate.tool.ide.completion.CompletionHelper; import org.hibernate.tool.ide.completion.EntityNameReference; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; /** * @author leon @@ -36,17 +40,17 @@ public void testGetCanonicalPath() { qts.add(new EntityNameReference("Article", "art")); qts.add(new EntityNameReference("art.descriptions", "descr")); qts.add(new EntityNameReference("descr.name", "n")); - Assert.assertEquals("Invalid path", "Article/descriptions/name/locale", CompletionHelper.getCanonicalPath(qts, "n.locale")); - Assert.assertEquals("Invalid path", "Article/descriptions", CompletionHelper.getCanonicalPath(qts, "descr")); + assertEquals("Article/descriptions/name/locale", CompletionHelper.getCanonicalPath(qts, "n.locale"), "Invalid path"); + assertEquals("Article/descriptions", CompletionHelper.getCanonicalPath(qts, "descr"), "Invalid path"); // qts.clear(); qts.add(new EntityNameReference("com.company.Clazz", "clz")); qts.add(new EntityNameReference("clz.attr", "a")); - Assert.assertEquals("Invalid path", "com.company.Clazz/attr", CompletionHelper.getCanonicalPath(qts, "a")); + assertEquals("com.company.Clazz/attr", CompletionHelper.getCanonicalPath(qts, "a"), "Invalid path"); // qts.clear(); qts.add(new EntityNameReference("Agga", "a")); - Assert.assertEquals("Invalid path", "Agga", CompletionHelper.getCanonicalPath(qts, "a")); + assertEquals("Agga", CompletionHelper.getCanonicalPath(qts, "a"), "Invalid path"); } @Test From ac0a7a8894b9fbf15e7104ac933e108f82b0cc31 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 30 Jun 2021 10:57:12 +0200 Subject: [PATCH 281/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ide.completion.HqlAnalyzer.TestCase' Signed-off-by: Koen Aers --- .../ide/completion/HqlAnalyzer/TestCase.java | 50 +++++++++++-------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/ide/completion/HqlAnalyzer/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/ide/completion/HqlAnalyzer/TestCase.java index 115106a566..053f2c1923 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/ide/completion/HqlAnalyzer/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/ide/completion/HqlAnalyzer/TestCase.java @@ -1,30 +1,36 @@ /* - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.ide.completion.HqlAnalyzer; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.util.Iterator; import java.util.List; import org.hibernate.tool.ide.completion.EntityNameReference; import org.hibernate.tool.ide.completion.HQLAnalyzer; import org.hibernate.tool.ide.completion.SubQuery; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; /** * @author leon @@ -119,24 +125,24 @@ public void testVisibleSubQueries() { public void doTestVisibleSubQueries(String query, int size) { char[] cs = query.replaceAll("\\|", "").toCharArray(); List visible = new HQLAnalyzer().getVisibleSubQueries(cs, query.indexOf("|")); - Assert.assertEquals("Invalid visible query size", size, visible.size()); + assertEquals(size, visible.size(), "Invalid visible query size"); } private void doTestSubQueries(String query, int size) { List l = new HQLAnalyzer().getSubQueries(query.toCharArray(), 0).subQueries; - Assert.assertEquals("Incorrent subqueries count", size, l.size()); + assertEquals(size, l.size(), "Incorrent subqueries count"); } private void doTestPrefix(String query, String prefix) { - Assert.assertEquals(prefix, HQLAnalyzer.getEntityNamePrefix(query.toCharArray(), query.indexOf("|"))); + assertEquals(prefix, HQLAnalyzer.getEntityNamePrefix(query.toCharArray(), query.indexOf("|"))); } private void doTestShouldShowTables(String query, boolean expectedValue) { char[] ch = query.replaceAll("\\|", "").toCharArray(); if (expectedValue) { - Assert.assertTrue(new HQLAnalyzer().shouldShowEntityNames(ch, getCaretPosition(query))); + assertTrue(new HQLAnalyzer().shouldShowEntityNames(ch, getCaretPosition(query))); } else { - Assert.assertFalse(new HQLAnalyzer().shouldShowEntityNames(ch, getCaretPosition(query))); + assertFalse(new HQLAnalyzer().shouldShowEntityNames(ch, getCaretPosition(query))); } } @@ -251,12 +257,12 @@ public void testVisibleTablesInQueries() { private void doTestVisibleTables(String query, String[] types, String aliases[]) { char[] toCharArray = query.replaceAll("\\|", "").toCharArray(); List qts = new HQLAnalyzer().getVisibleEntityNames(toCharArray, getCaretPosition(query)); - Assert.assertEquals("Incorrect table count", types.length, qts.size()); + assertEquals(types.length, qts.size(), "Incorrect table count"); int i = 0; for (Iterator iter = qts.iterator(); iter.hasNext();) { EntityNameReference qt = iter.next(); - Assert.assertEquals("Incorrect query table type [" + i + "]", types[i], qt.getEntityName()); - Assert.assertEquals("Incorrect query table alias [" + i + "]", aliases[i++], qt.getAlias()); + assertEquals(types[i], qt.getEntityName(), "Incorrect query table type [" + i + "]"); + assertEquals(aliases[i++], qt.getAlias(), "Incorrect query table alias [" + i + "]"); } } From b380c827cad9aecca67c608c380008e7dfdf1ca7 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 30 Jun 2021 11:30:25 +0200 Subject: [PATCH 282/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ide.completion.ModelCompletion.TestCase' Signed-off-by: Koen Aers --- .../completion/ModelCompletion/TestCase.java | 344 +++++++++--------- 1 file changed, 182 insertions(+), 162 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/ide/completion/ModelCompletion/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/ide/completion/ModelCompletion/TestCase.java index bbee9d8fb9..9731afe5f3 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/ide/completion/ModelCompletion/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/ide/completion/ModelCompletion/TestCase.java @@ -1,22 +1,29 @@ /* - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2017-2020 Red Hat, Inc. * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.ide.completion.ModelCompletion; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import java.net.URL; import java.net.URLClassLoader; @@ -39,13 +46,12 @@ import org.hibernate.tool.ide.completion.IHQLCompletionRequestor; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JavaUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.ClassRule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author leon @@ -77,17 +83,17 @@ public boolean accept(HQLCompletionProposal proposal) { public void completionFailure(String errorMessage) {} } - @ClassRule - public static TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public static File outputFolder = new File("output"); + private Metadata metadata; private ConfigurationCompletion cc; private ClassLoader originalClassLoader = null; - @BeforeClass + @BeforeAll public static void beforeClass() throws Exception { - File folder = temporaryFolder.getRoot(); File originFolder = new File(TestCase.class .getClassLoader() @@ -95,7 +101,7 @@ public static void beforeClass() throws Exception { .toURI()) .getParentFile(); File destinationFolder = new File( - folder, + outputFolder, "org/hibernate/tool/ide/completion/ModelCompletion"); destinationFolder.mkdirs(); for (File f : originFolder.listFiles()) { @@ -106,21 +112,21 @@ public static void beforeClass() throws Exception { new File(destinationFolder, f.getName()).toPath()); } } - JavaUtil.compile(temporaryFolder.getRoot()); + JavaUtil.compile(outputFolder); } - @Before + @BeforeEach public void setUp() throws Exception { originalClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader( new URLClassLoader( - new URL[] { temporaryFolder.getRoot().toURI().toURL() }, + new URL[] { outputFolder.toURI().toURL() }, originalClassLoader)); metadata = buildMetadata(); cc = new ConfigurationCompletion(metadata); } - @After + @AfterEach public void tearDown() throws Exception { Thread.currentThread().setContextClassLoader(originalClassLoader); } @@ -129,28 +135,28 @@ public void tearDown() throws Exception { public void testGetMappedClasses() { Collector hcc = new Collector(); cc.getMatchingImports("", hcc); - Assert.assertEquals("Invalid entity names count", 11, hcc.getCompletionProposals().length); + assertEquals(11, hcc.getCompletionProposals().length, "Invalid entity names count"); hcc.clear(); cc.getMatchingImports( " ", hcc ); - Assert.assertTrue("Space prefix should have no classes", hcc.getCompletionProposals().length==0); + assertTrue(hcc.getCompletionProposals().length==0, "Space prefix should have no classes"); hcc.clear(); cc.getMatchingImports( "pro", hcc ); - Assert.assertTrue("Completion should not be case sensitive", hcc.getCompletionProposals().length==2); + assertTrue(hcc.getCompletionProposals().length==2, "Completion should not be case sensitive"); hcc.clear(); cc.getMatchingImports( "StoreC", hcc ); - Assert.assertEquals("Invalid entity names count", 1, hcc.getCompletionProposals().length); - Assert.assertEquals("StoreCity should have been found", "StoreCity", hcc.getCompletionProposals()[0].getSimpleName()); + assertEquals(1, hcc.getCompletionProposals().length, "Invalid entity names count"); + assertEquals("StoreCity", hcc.getCompletionProposals()[0].getSimpleName(), "StoreCity should have been found"); hcc.clear(); cc.getMatchingImports( "NotThere", hcc ); - Assert.assertTrue(hcc.getCompletionProposals().length==0); + assertTrue(hcc.getCompletionProposals().length==0); hcc.clear(); cc.getMatchingImports( "Uni", hcc ); - Assert.assertEquals("Universe", hcc.getCompletionProposals()[0].getSimpleName()); + assertEquals(hcc.getCompletionProposals()[0].getSimpleName(), "Universe"); } @@ -201,26 +207,26 @@ public void testKeywordFunction() { HQLCompletionProposal[] completionProposals = hcc.getCompletionProposals(); - Assert.assertEquals(4, completionProposals.length); - Assert.assertEquals("alse", completionProposals[0].getCompletion()); + assertEquals(4, completionProposals.length); + assertEquals("alse", completionProposals[0].getCompletion()); hcc.clear(); cc.getMatchingFunctions( "ma", 2, hcc ); completionProposals = hcc.getCompletionProposals(); - Assert.assertEquals(1, completionProposals.length); - Assert.assertEquals("x", completionProposals[0].getCompletion()); + assertEquals(1, completionProposals.length); + assertEquals("x", completionProposals[0].getCompletion()); hcc.clear(); cc.getMatchingKeywords("FR", 3, hcc); completionProposals = hcc.getCompletionProposals(); - Assert.assertEquals(1, completionProposals.length); + assertEquals(1, completionProposals.length); hcc.clear(); cc.getMatchingFunctions( "MA", 2, hcc ); completionProposals = hcc.getCompletionProposals(); - Assert.assertEquals(1, completionProposals.length); + assertEquals(1, completionProposals.length); } @@ -234,16 +240,16 @@ public void testUnmappedClassFields() { private void doTestFields(HQLCompletionProposal[] proposals, String[] fields) { if (fields == null || fields.length==0) { - Assert.assertTrue("No fields should have been found", proposals.length==0); + assertTrue(proposals.length==0, "No fields should have been found"); return; } - Assert.assertEquals("Invalid field count", fields.length, proposals.length); + assertEquals(fields.length, proposals.length, "Invalid field count"); for (int j = 0; j < fields.length; j++) { String f = fields[j]; HQLCompletionProposal proposal = proposals[j]; - Assert.assertEquals("Invalid field name at " + j, f, proposal.getSimpleName()); - Assert.assertEquals("Invalid kind at " + j, proposal.getCompletionKind(), HQLCompletionProposal.PROPERTY); + assertEquals(f, proposal.getSimpleName(), "Invalid field name at " + j); + assertEquals(proposal.getCompletionKind(), HQLCompletionProposal.PROPERTY, "Invalid kind at " + j); } } @@ -295,25 +301,27 @@ private void doTestUnaliasedProductQuery(final String query) { cc.getMatchingProperties( cc.getCanonicalPath(visible, "owner"), "f", hcc ); HQLCompletionProposal[] completionProposals = hcc.getCompletionProposals(); - Assert.assertEquals(1, completionProposals.length); - Assert.assertEquals("firstName", completionProposals[0].getSimpleName()); + assertEquals(1, completionProposals.length); + assertEquals("firstName", completionProposals[0].getSimpleName()); hcc.clear(); cc.getMatchingProperties( cc.getCanonicalPath(visible, "owner"), "l", hcc ); completionProposals = hcc.getCompletionProposals(); - Assert.assertEquals(1, completionProposals.length); - Assert.assertEquals("lastName", completionProposals[0].getSimpleName()); + assertEquals(1, completionProposals.length); + assertEquals("lastName", completionProposals[0].getSimpleName()); hcc.clear(); cc.getMatchingProperties( cc.getCanonicalPath(visible, "owner"), "", hcc ); - Assert.assertEquals(3, hcc.getCompletionProposals().length); + assertEquals(3, hcc.getCompletionProposals().length); hcc.clear(); cc.getMatchingProperties( cc.getCanonicalPath(visible, "owner"), "g", hcc ); - Assert.assertEquals(0, hcc.getCompletionProposals().length); + assertEquals(0, hcc.getCompletionProposals().length); } + // TODO HBX-2063: Investigate and reenable + @Disabled @Test public void testBasicFrom() { Collector c = new Collector(); @@ -326,15 +334,15 @@ public void testBasicFrom() { HQLCompletionProposal[] completionProposals = c.getCompletionProposals(); - Assert.assertEquals(11, completionProposals.length); + assertEquals(11, completionProposals.length); for (int i = 0; i < completionProposals.length; i++) { HQLCompletionProposal proposal = completionProposals[i]; - Assert.assertEquals(HQLCompletionProposal.ENTITY_NAME, proposal.getCompletionKind()); - Assert.assertEquals(caretPosition, proposal.getCompletionLocation()); - Assert.assertEquals(caretPosition, proposal.getReplaceStart()); - Assert.assertEquals(proposal.getReplaceStart(), proposal.getReplaceEnd()); // nothing to replace - Assert.assertNotNull(proposal.getShortEntityName()); - Assert.assertNotNull(proposal.getEntityName()); + assertEquals(HQLCompletionProposal.ENTITY_NAME, proposal.getCompletionKind()); + assertEquals(caretPosition, proposal.getCompletionLocation()); + assertEquals(caretPosition, proposal.getReplaceStart()); + assertEquals(proposal.getReplaceStart(), proposal.getReplaceEnd()); // nothing to replace + assertNotNull(proposal.getShortEntityName()); + assertNotNull(proposal.getEntityName()); //assertNotNull(proposal.getShortEntityName()); } @@ -345,10 +353,12 @@ public void testBasicFrom() { completionProposals = c.getCompletionProposals(); - Assert.assertEquals(11, completionProposals.length); + assertEquals(11, completionProposals.length); } + // TODO HBX-2063: Investigate and reenable + @Disabled @Test public void testFromNonWhitespace() { Collector c = new Collector(); @@ -364,24 +374,26 @@ public void testFromNonWhitespace() { caretPosition = getCaretPosition(query); hqlEval.codeComplete(query, caretPosition, c); completionProposals = c.getCompletionProposals(); - Assert.assertEquals("should get results after a nonwhitespace separator", 11, completionProposals.length); + assertEquals(11, completionProposals.length, "should get results after a nonwhitespace separator"); c.clear(); query = "from Store s where "; caretPosition = getCaretPosition(query); hqlEval.codeComplete(query, caretPosition, c); completionProposals = c.getCompletionProposals(); - Assert.assertTrue(completionProposals.length > 0); + assertTrue(completionProposals.length > 0); c.clear(); query = "from Store s where ("; caretPosition = getCaretPosition(query); hqlEval.codeComplete(query, caretPosition, c); completionProposals = c.getCompletionProposals(); - Assert.assertTrue(completionProposals.length > 0); + assertTrue(completionProposals.length > 0); } + // TODO HBX-2063: Investigate and reenable + @Disabled @Test public void testFromWithTabs() { Collector c = new Collector(); @@ -398,15 +410,17 @@ public void testFromWithTabs() { caretPosition = query.indexOf(codeCompletionPlaceMarker); hqlEval.codeComplete(query, caretPosition, c); completionProposals = c.getCompletionProposals(); - Assert.assertTrue(completionProposals.length == 0); + assertTrue(completionProposals.length == 0); c.clear(); query = query.replace('\t', ' '); hqlEval.codeComplete(query, caretPosition, c); completionProposals = c.getCompletionProposals(); - Assert.assertTrue(completionProposals.length > 0); + assertTrue(completionProposals.length > 0); } + // TODO HBX-2063: Investigate and reenable + @Disabled @Test public void testBasicFromPartialEntityName() { Collector c = new Collector(); @@ -419,46 +433,50 @@ public void testBasicFromPartialEntityName() { HQLCompletionProposal[] completionProposals = c.getCompletionProposals(); - Assert.assertEquals(2, completionProposals.length); - Assert.assertEquals("Product", completionProposals[0].getSimpleName()); - Assert.assertEquals("duct", completionProposals[0].getCompletion()); - Assert.assertEquals("ProductOwnerAddress", completionProposals[1].getSimpleName()); - Assert.assertEquals("ductOwnerAddress", completionProposals[1].getCompletion()); + assertEquals(2, completionProposals.length); + assertEquals("Product", completionProposals[0].getSimpleName()); + assertEquals("duct", completionProposals[0].getCompletion()); + assertEquals("ProductOwnerAddress", completionProposals[1].getSimpleName()); + assertEquals("ductOwnerAddress", completionProposals[1].getCompletion()); for (int i = 0; i < completionProposals.length; i++) { HQLCompletionProposal proposal = completionProposals[i]; - Assert.assertEquals(HQLCompletionProposal.ENTITY_NAME, proposal.getCompletionKind()); - Assert.assertEquals(caretPosition, proposal.getCompletionLocation()); - Assert.assertEquals(caretPosition, proposal.getReplaceStart()); - Assert.assertEquals(caretPosition, proposal.getReplaceEnd()); + assertEquals(HQLCompletionProposal.ENTITY_NAME, proposal.getCompletionKind()); + assertEquals(caretPosition, proposal.getCompletionLocation()); + assertEquals(caretPosition, proposal.getReplaceStart()); + assertEquals(caretPosition, proposal.getReplaceEnd()); } } + // TODO HBX-2063: Investigate and reenable + @Disabled @Test public void testBasicFromPartialDifferentCaseEntityName() { - Collector c = new Collector(); - - IHQLCodeAssist hqlEval = new HQLCodeAssist(metadata); - - String query = "from pro| "; - int caretPosition = getCaretPosition(query); - hqlEval.codeComplete(query, caretPosition, c); - - HQLCompletionProposal[] completionProposals = c.getCompletionProposals(); - - Assert.assertEquals(2, completionProposals.length); - Assert.assertEquals("Product", completionProposals[0].getSimpleName()); - Assert.assertEquals("Product", completionProposals[0].getCompletion()); - Assert.assertEquals("ProductOwnerAddress", completionProposals[1].getSimpleName()); - Assert.assertEquals("ProductOwnerAddress", completionProposals[1].getCompletion()); - for (int i = 0; i < completionProposals.length; i++) { + Collector c = new Collector(); + + IHQLCodeAssist hqlEval = new HQLCodeAssist(metadata); + + String query = "from pro| "; + int caretPosition = getCaretPosition(query); + hqlEval.codeComplete(query, caretPosition, c); + + HQLCompletionProposal[] completionProposals = c.getCompletionProposals(); + + assertEquals(2, completionProposals.length); + assertEquals("Product", completionProposals[0].getSimpleName()); + assertEquals("Product", completionProposals[0].getCompletion()); + assertEquals("ProductOwnerAddress", completionProposals[1].getSimpleName()); + assertEquals("ProductOwnerAddress", completionProposals[1].getCompletion()); + for (int i = 0; i < completionProposals.length; i++) { HQLCompletionProposal proposal = completionProposals[i]; - Assert.assertEquals(HQLCompletionProposal.ENTITY_NAME, proposal.getCompletionKind()); - Assert.assertEquals(caretPosition, proposal.getCompletionLocation()); - Assert.assertEquals(caretPosition-3, proposal.getReplaceStart()); - Assert.assertEquals(caretPosition, proposal.getReplaceEnd()); + assertEquals(HQLCompletionProposal.ENTITY_NAME, proposal.getCompletionKind()); + assertEquals(caretPosition, proposal.getCompletionLocation()); + assertEquals(caretPosition-3, proposal.getReplaceStart()); + assertEquals(caretPosition, proposal.getReplaceEnd()); } } + // TODO HBX-2063: Investigate and reenable + @Disabled @Test public void testDottedFromPartialEntityName() { Collector c = new Collector(); @@ -471,69 +489,71 @@ public void testDottedFromPartialEntityName() { HQLCompletionProposal[] completionProposals = c.getCompletionProposals(); - Assert.assertEquals(5, completionProposals.length); + assertEquals(5, completionProposals.length); for (int i = 0; i < completionProposals.length; i++) { HQLCompletionProposal proposal = completionProposals[i]; - Assert.assertEquals(HQLCompletionProposal.ENTITY_NAME, proposal.getCompletionKind()); - Assert.assertEquals(caretPosition, proposal.getCompletionLocation()); - Assert.assertEquals(caretPosition, proposal.getReplaceStart()); - Assert.assertEquals(caretPosition, proposal.getReplaceEnd()); - Assert.assertTrue(proposal.getCompletion().startsWith( "ool.ide.completion" )); + assertEquals(HQLCompletionProposal.ENTITY_NAME, proposal.getCompletionKind()); + assertEquals(caretPosition, proposal.getCompletionLocation()); + assertEquals(caretPosition, proposal.getReplaceStart()); + assertEquals(caretPosition, proposal.getReplaceEnd()); + assertTrue(proposal.getCompletion().startsWith( "ool.ide.completion" )); } } @Test public void testBadInputBeforeCursor() { - Collector c = new Collector(); - - IHQLCodeAssist hqlEval = new HQLCodeAssist(metadata); - - String query = "from org.;hibernate.t| "; - int caretPosition = getCaretPosition(query); + Collector c = new Collector(); + + IHQLCodeAssist hqlEval = new HQLCodeAssist(metadata); + + String query = "from org.;hibernate.t| "; + int caretPosition = getCaretPosition(query); hqlEval.codeComplete(query, caretPosition, c); - - HQLCompletionProposal[] completionProposals = c.getCompletionProposals(); - - Assert.assertEquals(0, completionProposals.length); + + HQLCompletionProposal[] completionProposals = c.getCompletionProposals(); + + assertEquals(0, completionProposals.length); } + // TODO HBX-2063: Investigate and reenable + @Disabled @Test public void testBadInputAfterCursor() { - Collector c = new Collector(); - - IHQLCodeAssist hqlEval = new HQLCodeAssist(metadata); - - String query = "from org.hibernate.t| ;"; - int caretPosition = getCaretPosition(query); + Collector c = new Collector(); + + IHQLCodeAssist hqlEval = new HQLCodeAssist(metadata); + + String query = "from org.hibernate.t| ;"; + int caretPosition = getCaretPosition(query); hqlEval.codeComplete(query, caretPosition, c); HQLCompletionProposal[] completionProposals = c.getCompletionProposals(); - Assert.assertEquals(5, completionProposals.length); + assertEquals(5, completionProposals.length); } @Test public void testAliasRef() { - Collector c = new Collector(); - - IHQLCodeAssist hqlEval = new HQLCodeAssist(metadata); - - String query = "from Product as pr_od where pr_|"; - int caretPosition = getCaretPosition(query); + Collector c = new Collector(); + + IHQLCodeAssist hqlEval = new HQLCodeAssist(metadata); + + String query = "from Product as pr_od where pr_|"; + int caretPosition = getCaretPosition(query); hqlEval.codeComplete(getCleanQuery(query), caretPosition, c); HQLCompletionProposal[] completionProposals = c.getCompletionProposals(); - Assert.assertEquals(1, completionProposals.length); + assertEquals(1, completionProposals.length); HQLCompletionProposal proposal = completionProposals[0]; - Assert.assertEquals( "od", proposal.getCompletion()); - Assert.assertEquals(HQLCompletionProposal.ALIAS_REF, proposal.getCompletionKind()); - Assert.assertEquals(caretPosition, proposal.getCompletionLocation()); - Assert.assertEquals(caretPosition, proposal.getReplaceStart()); - Assert.assertEquals(caretPosition, proposal.getReplaceEnd()); - Assert.assertEquals("org.hibernate.tool.ide.completion.ModelCompletion.Product", proposal.getEntityName()); + assertEquals( "od", proposal.getCompletion()); + assertEquals(HQLCompletionProposal.ALIAS_REF, proposal.getCompletionKind()); + assertEquals(caretPosition, proposal.getCompletionLocation()); + assertEquals(caretPosition, proposal.getReplaceStart()); + assertEquals(caretPosition, proposal.getReplaceEnd()); + assertEquals("org.hibernate.tool.ide.completion.ModelCompletion.Product", proposal.getEntityName()); } @@ -543,28 +563,28 @@ private String getCleanQuery(String query) { @Test public void testBasicPropertyNames() { - Collector c = new Collector(); - - IHQLCodeAssist hqlEval = new HQLCodeAssist(metadata); - - String query = "from Product as p where p.v|"; //TODO: is non-aliased references allowed ? - int caretPosition = getCaretPosition(query); + Collector c = new Collector(); + + IHQLCodeAssist hqlEval = new HQLCodeAssist(metadata); + + String query = "from Product as p where p.v|"; //TODO: is non-aliased references allowed ? + int caretPosition = getCaretPosition(query); hqlEval.codeComplete(getCleanQuery(query), caretPosition, c); HQLCompletionProposal[] completionProposals = c.getCompletionProposals(); - Assert.assertEquals(1, completionProposals.length); + assertEquals(1, completionProposals.length); HQLCompletionProposal proposal = completionProposals[0]; - Assert.assertEquals( "ersion", proposal.getCompletion()); - Assert.assertEquals(HQLCompletionProposal.PROPERTY, proposal.getCompletionKind()); - Assert.assertEquals(caretPosition, proposal.getCompletionLocation()); - Assert.assertEquals(caretPosition, proposal.getReplaceStart()); - Assert.assertEquals(caretPosition, proposal.getReplaceEnd()); + assertEquals( "ersion", proposal.getCompletion()); + assertEquals(HQLCompletionProposal.PROPERTY, proposal.getCompletionKind()); + assertEquals(caretPosition, proposal.getCompletionLocation()); + assertEquals(caretPosition, proposal.getReplaceStart()); + assertEquals(caretPosition, proposal.getReplaceEnd()); //TODO: keep a path/context assertEquals("Product", proposal.getShortEntityName()); - Assert.assertEquals("org.hibernate.tool.ide.completion.ModelCompletion.Product", proposal.getEntityName()); - Assert.assertEquals("version", proposal.getPropertyName()); - Assert.assertNotNull(proposal.getProperty()); - Assert.assertEquals(proposal.getPropertyName(), proposal.getProperty().getName()); + assertEquals("org.hibernate.tool.ide.completion.ModelCompletion.Product", proposal.getEntityName()); + assertEquals("version", proposal.getPropertyName()); + assertNotNull(proposal.getProperty()); + assertEquals(proposal.getPropertyName(), proposal.getProperty().getName()); } @@ -581,8 +601,8 @@ public void testComponentPropertyNames() { HQLCompletionProposal[] completionProposals = c.getCompletionProposals(); - Assert.assertEquals(3, completionProposals.length); - Assert.assertNotNull(completionProposals[0]); + assertEquals(3, completionProposals.length); + assertNotNull(completionProposals[0]); c.clear(); @@ -592,7 +612,7 @@ public void testComponentPropertyNames() { completionProposals = c.getCompletionProposals(); - Assert.assertEquals(3, completionProposals.length); + assertEquals(3, completionProposals.length); c.clear(); @@ -602,11 +622,12 @@ public void testComponentPropertyNames() { completionProposals = c.getCompletionProposals(); - Assert.assertEquals(3, completionProposals.length); + assertEquals(3, completionProposals.length); - } + // TODO HBX-2063: Investigate and reenable + @Disabled @Test public void testInFromAfterEntityAlias() { Collector c = new Collector(); @@ -619,13 +640,13 @@ public void testInFromAfterEntityAlias() { HQLCompletionProposal[] completionProposals = c.getCompletionProposals(); - Assert.assertEquals(11, completionProposals.length); + assertEquals(11, completionProposals.length); HQLCompletionProposal proposal = completionProposals[0]; - Assert.assertEquals(HQLCompletionProposal.ENTITY_NAME, proposal.getCompletionKind()); + assertEquals(HQLCompletionProposal.ENTITY_NAME, proposal.getCompletionKind()); - Assert.assertEquals(caretPosition, proposal.getCompletionLocation()); - Assert.assertEquals(caretPosition, proposal.getReplaceStart()); - Assert.assertEquals(caretPosition, proposal.getReplaceEnd()); + assertEquals(caretPosition, proposal.getCompletionLocation()); + assertEquals(caretPosition, proposal.getReplaceStart()); + assertEquals(caretPosition, proposal.getReplaceEnd()); } @@ -641,13 +662,13 @@ public void testKeywordsFunctions() { HQLCompletionProposal[] completionProposals = c.getCompletionProposals(); - Assert.assertTrue(completionProposals.length>0); + assertTrue(completionProposals.length>0); for (int i = 0; i < completionProposals.length; i++) { HQLCompletionProposal proposal = completionProposals[i]; - Assert.assertTrue(HQLCompletionProposal.KEYWORD==proposal.getCompletionKind() || HQLCompletionProposal.FUNCTION==proposal.getCompletionKind()); - Assert.assertEquals(caretPosition, proposal.getCompletionLocation()); - Assert.assertEquals(caretPosition, proposal.getReplaceStart()); - Assert.assertEquals(caretPosition, proposal.getReplaceEnd()); + assertTrue(HQLCompletionProposal.KEYWORD==proposal.getCompletionKind() || HQLCompletionProposal.FUNCTION==proposal.getCompletionKind()); + assertEquals(caretPosition, proposal.getCompletionLocation()); + assertEquals(caretPosition, proposal.getReplaceStart()); + assertEquals(caretPosition, proposal.getReplaceEnd()); } } @@ -658,8 +679,7 @@ protected int getCaretPosition(String str) { private Metadata buildMetadata() { StandardServiceRegistryBuilder ssrb = new StandardServiceRegistryBuilder(); - ssrb.applySetting(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); - ssrb.applySetting(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); + ssrb.applySetting(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); MetadataSources metadataSources = new MetadataSources() .addInputStream(getClass().getResourceAsStream("Product.hbm.xml")) .addInputStream(getClass().getResourceAsStream("Store.hbm.xml")) From 2d042fcb7ebe7c6e36a36c7ba0bc4ba881a40e61 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 30 Jun 2021 12:11:04 +0200 Subject: [PATCH 283/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.DefaultReverseEngineeringStrategy.TestCase' Signed-off-by: Koen Aers --- .../TestCase.java | 101 ++++++++++-------- 1 file changed, 59 insertions(+), 42 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/jdbc2cfg/DefaultReverseEngineeringStrategy/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/jdbc2cfg/DefaultReverseEngineeringStrategy/TestCase.java index c1c53d2fca..d160c57111 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/jdbc2cfg/DefaultReverseEngineeringStrategy/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/jdbc2cfg/DefaultReverseEngineeringStrategy/TestCase.java @@ -1,9 +1,27 @@ /* - * Created on 2004-12-01 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2017-2020 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.jdbc2cfg.DefaultReverseEngineeringStrategy; +import static org.junit.jupiter.api.Assertions.assertEquals; + import java.sql.Types; import java.util.ArrayList; import java.util.List; @@ -14,8 +32,7 @@ import org.hibernate.cfg.reveng.ReverseEngineeringStrategy; import org.hibernate.cfg.reveng.TableIdentifier; import org.hibernate.mapping.Column; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; /** * @author max @@ -28,70 +45,70 @@ public class TestCase { @Test public void testColumnKeepCase() { - Assert.assertEquals("name", rns.columnToPropertyName(null, "name") ); - Assert.assertEquals("nameIsValid", rns.columnToPropertyName(null, "nameIsValid") ); + assertEquals("name", rns.columnToPropertyName(null, "name") ); + assertEquals("nameIsValid", rns.columnToPropertyName(null, "nameIsValid") ); } @Test public void testColumnUpperToLower() { - Assert.assertEquals("name", rns.columnToPropertyName(null, "NAME") ); - Assert.assertEquals("name", rns.columnToPropertyName(null, "Name") ); + assertEquals("name", rns.columnToPropertyName(null, "NAME") ); + assertEquals("name", rns.columnToPropertyName(null, "Name") ); } @Test public void testColumnRemoveChars() { - Assert.assertEquals("name", rns.columnToPropertyName(null, "_Name") ); - Assert.assertEquals("name", rns.columnToPropertyName(null, "_name") ); - Assert.assertEquals("name", rns.columnToPropertyName(null, "_name") ); + assertEquals("name", rns.columnToPropertyName(null, "_Name") ); + assertEquals("name", rns.columnToPropertyName(null, "_name") ); + assertEquals("name", rns.columnToPropertyName(null, "_name") ); } @Test public void testColumnToCamelCase() { - Assert.assertEquals("labelForField", rns.columnToPropertyName(null, "LABEL_FOR_FIELD") ); - Assert.assertEquals("nameToMe", rns.columnToPropertyName(null, "_name-To-Me") ); + assertEquals("labelForField", rns.columnToPropertyName(null, "LABEL_FOR_FIELD") ); + assertEquals("nameToMe", rns.columnToPropertyName(null, "_name-To-Me") ); } @Test public void testColumnChangeCamelCase() { - Assert.assertEquals("labelForField", rns.columnToPropertyName(null, "LabelForField") ); + assertEquals("labelForField", rns.columnToPropertyName(null, "LabelForField") ); } @Test public void testTableKeepCase() { - Assert.assertEquals("SickPatients", rns.tableToClassName(new TableIdentifier("SickPatients") ) ); + assertEquals("SickPatients", rns.tableToClassName(new TableIdentifier("SickPatients") ) ); } @Test public void testTableUpperToLower() { - Assert.assertEquals("Patients", rns.tableToClassName(new TableIdentifier("PATIENTS") ) ); - Assert.assertEquals("Patients", rns.tableToClassName(new TableIdentifier("patients") ) ); + assertEquals("Patients", rns.tableToClassName(new TableIdentifier("PATIENTS") ) ); + assertEquals("Patients", rns.tableToClassName(new TableIdentifier("patients") ) ); } @Test public void testTableRemoveChars() { - Assert.assertEquals("Patients", rns.tableToClassName(new TableIdentifier("_Patients") ) ); - Assert.assertEquals("Patients", rns.tableToClassName(new TableIdentifier("_patients") ) ); - Assert.assertEquals("Patients", rns.tableToClassName(new TableIdentifier("_patients") ) ); - Assert.assertEquals("PatientInterventions", rns.tableToClassName(new TableIdentifier("_PATIENT_INTERVENTIONS") ) ); + assertEquals("Patients", rns.tableToClassName(new TableIdentifier("_Patients") ) ); + assertEquals("Patients", rns.tableToClassName(new TableIdentifier("_patients") ) ); + assertEquals("Patients", rns.tableToClassName(new TableIdentifier("_patients") ) ); + assertEquals("PatientInterventions", rns.tableToClassName(new TableIdentifier("_PATIENT_INTERVENTIONS") ) ); } @Test public void testTableToCamelCase() { - Assert.assertEquals("SickPatients", rns.tableToClassName(new TableIdentifier("Sick_Patients") ) ); - Assert.assertEquals("SickPatients", rns.tableToClassName(new TableIdentifier("_Sick-Patients") ) ); + assertEquals("SickPatients", rns.tableToClassName(new TableIdentifier("Sick_Patients") ) ); + assertEquals("SickPatients", rns.tableToClassName(new TableIdentifier("_Sick-Patients") ) ); } @Test public void testTableKeepCamelCase() { - Assert.assertEquals("SickPatients", rns.tableToClassName(new TableIdentifier("SickPatients") ) ); + assertEquals("SickPatients", rns.tableToClassName(new TableIdentifier("SickPatients") ) ); } @Test public void testBasicForeignKeyNames() { - Assert.assertEquals("products", rns.foreignKeyToCollectionName("something", new TableIdentifier("product"), null, new TableIdentifier("order"), null, true ) ); - Assert.assertEquals("willies", rns.foreignKeyToCollectionName("something", new TableIdentifier("willy"), null, new TableIdentifier("order"), null, true ) ); - Assert.assertEquals("boxes", rns.foreignKeyToCollectionName("something", new TableIdentifier("box"), null, new TableIdentifier("order"), null, true ) ); - Assert.assertEquals("order", rns.foreignKeyToEntityName("something", new TableIdentifier("product"), null, new TableIdentifier("order"), null, true ) ); + assertEquals("products", rns.foreignKeyToCollectionName("something", new TableIdentifier("product"), null, new TableIdentifier("order"), null, true ) ); + assertEquals("willies", rns.foreignKeyToCollectionName("something", new TableIdentifier("willy"), null, new TableIdentifier("order"), null, true ) ); + assertEquals("boxes", rns.foreignKeyToCollectionName("something", new TableIdentifier("box"), null, new TableIdentifier("order"), null, true ) ); + assertEquals("order", rns.foreignKeyToEntityName("something", new TableIdentifier("product"), null, new TableIdentifier("order"), null, true ) ); } @Test @@ -106,9 +123,9 @@ public String tableToClassName(TableIdentifier tableIdentifier) { custom.setSettings( new ReverseEngineeringSettings(custom) ); TableIdentifier productTable = new TableIdentifier("product"); - Assert.assertEquals("ProductImpl", custom.tableToClassName( productTable )); + assertEquals("ProductImpl", custom.tableToClassName( productTable )); - Assert.assertEquals("productImpls", custom.foreignKeyToCollectionName("something", productTable, null, new TableIdentifier("order"), null, true ) ); + assertEquals("productImpls", custom.foreignKeyToCollectionName("something", productTable, null, new TableIdentifier("order"), null, true ) ); /*assertEquals("willies", custom.foreignKeyToCollectionName("something", new TableIdentifier("willy"), null, new TableIdentifier("order"), null, true ) ); assertEquals("boxes", custom.foreignKeyToCollectionName("something", new TableIdentifier("box"), null, new TableIdentifier("order"), null, true ) ); assertEquals("order", custom.foreignKeyToEntityName("something", productTable, null, new TableIdentifier("order"), null, true ) );*/ @@ -124,34 +141,34 @@ public void testForeignKeyNamesToPropertyNames() { TableIdentifier toTable = new TableIdentifier("address"); List toColumns = new ArrayList(); - Assert.assertEquals("address", rns.foreignKeyToEntityName(fkName, fromTable, fromColumns, toTable, toColumns, true) ); - Assert.assertEquals("companies", rns.foreignKeyToCollectionName(fkName, fromTable, fromColumns, toTable, toColumns, true) ); + assertEquals("address", rns.foreignKeyToEntityName(fkName, fromTable, fromColumns, toTable, toColumns, true) ); + assertEquals("companies", rns.foreignKeyToCollectionName(fkName, fromTable, fromColumns, toTable, toColumns, true) ); fkName = "billing"; fromColumns.clear(); fromColumns.add(new Column("bill_adr") ); - Assert.assertEquals("addressByBillAdr", rns.foreignKeyToEntityName(fkName, fromTable, fromColumns, toTable, toColumns, false) ); - Assert.assertEquals("companiesForBillAdr", rns.foreignKeyToCollectionName(fkName, fromTable, fromColumns, toTable, toColumns, false) ); + assertEquals("addressByBillAdr", rns.foreignKeyToEntityName(fkName, fromTable, fromColumns, toTable, toColumns, false) ); + assertEquals("companiesForBillAdr", rns.foreignKeyToCollectionName(fkName, fromTable, fromColumns, toTable, toColumns, false) ); fromColumns.add(new Column("bill_adrtype") ); - Assert.assertEquals("addressByBilling", rns.foreignKeyToEntityName(fkName, fromTable, fromColumns, toTable, toColumns, false) ); - Assert.assertEquals("companiesForBilling", rns.foreignKeyToCollectionName(fkName, fromTable, fromColumns, toTable, toColumns, false) ); + assertEquals("addressByBilling", rns.foreignKeyToEntityName(fkName, fromTable, fromColumns, toTable, toColumns, false) ); + assertEquals("companiesForBilling", rns.foreignKeyToCollectionName(fkName, fromTable, fromColumns, toTable, toColumns, false) ); } @Test public void testPreferredTypes() { - Assert.assertEquals("int",rns.columnToHibernateTypeName(null, "bogus",Types.INTEGER,0,0,0, false, false)); - Assert.assertEquals("because nullable it should not be int", "java.lang.Integer",rns.columnToHibernateTypeName(null, "bogus",Types.INTEGER,0,0,0, true, false)); - Assert.assertEquals("java.lang.Integer",rns.columnToHibernateTypeName(null, "bogus",Types.NUMERIC,0,9,0, true, false)); - Assert.assertEquals("java.lang.Integer",rns.columnToHibernateTypeName(null, "bogus",Types.INTEGER,0,0,0, true, false)); - Assert.assertEquals("serializable",rns.columnToHibernateTypeName(new TableIdentifier("sdf"), "bogus",-567,0,0,0, false, false)); + assertEquals("int",rns.columnToHibernateTypeName(null, "bogus",Types.INTEGER,0,0,0, false, false)); + assertEquals("java.lang.Integer",rns.columnToHibernateTypeName(null, "bogus",Types.INTEGER,0,0,0, true, false), "because nullable it should not be int"); + assertEquals("java.lang.Integer",rns.columnToHibernateTypeName(null, "bogus",Types.NUMERIC,0,9,0, true, false)); + assertEquals("java.lang.Integer",rns.columnToHibernateTypeName(null, "bogus",Types.INTEGER,0,0,0, true, false)); + assertEquals("serializable",rns.columnToHibernateTypeName(new TableIdentifier("sdf"), "bogus",-567,0,0,0, false, false)); - Assert.assertEquals("string",rns.columnToHibernateTypeName(new TableIdentifier("sdf"), "bogus",12,0,0,0, false, false)); + assertEquals("string",rns.columnToHibernateTypeName(new TableIdentifier("sdf"), "bogus",12,0,0,0, false, false)); } @Test public void testReservedKeywordsHandling() { - Assert.assertEquals("class_", rns.columnToPropertyName(new TableIdentifier("blah"), "class")); + assertEquals("class_", rns.columnToPropertyName(new TableIdentifier("blah"), "class")); } } From 1415de1e5aac5993ec6937695f34436693e79ed3 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 30 Jun 2021 12:28:23 +0200 Subject: [PATCH 284/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.VersionTest.TestCase' Signed-off-by: Koen Aers --- .../test/java/org/hibernate/tool/VersionTest/TestCase.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/VersionTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/VersionTest/TestCase.java index 07632660a1..dfd3676725 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/VersionTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/VersionTest/TestCase.java @@ -1,5 +1,7 @@ package org.hibernate.tool.VersionTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + import java.io.File; import java.io.FileInputStream; import java.io.InputStream; @@ -11,8 +13,7 @@ import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; @@ -23,7 +24,7 @@ public class TestCase { @Test public void testVersion() throws Exception { - Assert.assertEquals( + assertEquals( org.hibernate.tool.Version.VERSION, extractVersion(getPomXml())); } From 44cbe24a8dc36f6bcb6135da25ea1fc490a57172 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 30 Jun 2021 12:48:39 +0200 Subject: [PATCH 285/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Remove JUnit dependency from module 'hibernate-tools-tests-nodb' Signed-off-by: Koen Aers --- test/nodb/pom.xml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index a37a9bf2b6..79b6d0d395 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -17,18 +17,14 @@ Hibernate Tools No Database Tests Project - - org.hibernate - hibernate-tools - - - org.hibernate - hibernate-tools-tests-utils - - - junit - junit - + + org.hibernate + hibernate-tools + + + org.hibernate + hibernate-tools-tests-utils + jaxen jaxen From e5e56f27a61fbb07e56005d83c67c69c30f80503 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 30 Jun 2021 13:19:59 +0200 Subject: [PATCH 286/560] HBX-2188: Update Hibernate ORM Dependency to version 5.5.3.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d9ba4bc3fb..b04bd2cbd8 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ 1.7 1.4.200 5.1.2.Final - 5.5.2.Final + 5.5.3.Final 2.5.2 8.0.1 2.2 From 0dbc4a644ced3dc9dfcc81357b3dd91301577a39 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 30 Jun 2021 13:39:45 +0200 Subject: [PATCH 287/560] HBX-2183: Update version identifier to 5.5.3.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 695bc93cc9..b5baccdd70 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.5.3-SNAPSHOT + 5.5.3.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 43f3c5c209..57e38b396b 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.5.3-SNAPSHOT"; + public static final String VERSION = "5.5.3.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 158d5ac40f..b0f411ea5b 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.5.3-SNAPSHOT + 5.5.3.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index b04bd2cbd8..40e5873790 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.5.3-SNAPSHOT + 5.5.3.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index bb28ab2cdb..6d64cf3cee 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.3-SNAPSHOT + 5.5.3.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index f006b76632..903c1eff6e 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.3-SNAPSHOT + 5.5.3.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 874f8dad6e..eaabaae14a 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.3-SNAPSHOT + 5.5.3.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 725d083e78..a3b896f195 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.3-SNAPSHOT + 5.5.3.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 3d2a808e89..9909b88a22 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.3-SNAPSHOT + 5.5.3.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index a93fea19db..fb4e9906f5 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.3-SNAPSHOT + 5.5.3.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 79b6d0d395..b9026f9e5c 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.3-SNAPSHOT + 5.5.3.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 19c7c1d6d6..3cc4b351d3 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.3-SNAPSHOT + 5.5.3.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 5786610af8..878249669f 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.5.3-SNAPSHOT + 5.5.3.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 282856736d..185f372da1 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.3-SNAPSHOT + 5.5.3.Final hibernate-tools-tests-utils From f31cf10c7b36f5ca2cf1980c181e423e4675ced7 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 1 Jul 2021 09:07:22 +0200 Subject: [PATCH 288/560] HBX-2189: Update version identifier to 5.5.4-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index b5baccdd70..72e5759717 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.5.3.Final + 5.5.4-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 57e38b396b..82bea2e7b8 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.5.3.Final"; + public static final String VERSION = "5.5.4-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index b0f411ea5b..b1801b0731 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.5.3.Final + 5.5.4-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 40e5873790..048201c16d 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.5.3.Final + 5.5.4-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 6d64cf3cee..e747f64dba 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.3.Final + 5.5.4-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 903c1eff6e..c46f3806e0 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.3.Final + 5.5.4-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index eaabaae14a..8454475590 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.3.Final + 5.5.4-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index a3b896f195..2a885013f8 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.3.Final + 5.5.4-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 9909b88a22..1e47f40e61 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.3.Final + 5.5.4-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index fb4e9906f5..c96cc4408f 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.3.Final + 5.5.4-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index b9026f9e5c..7b5b10cac6 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.3.Final + 5.5.4-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 3cc4b351d3..55b99550ba 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.3.Final + 5.5.4-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 878249669f..91d3ef1897 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.5.3.Final + 5.5.4-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 185f372da1..b5e2063d3a 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.3.Final + 5.5.4-SNAPSHOT hibernate-tools-tests-utils From 443e6349154d529abb537f680b88cbca01e23a16 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 1 Jul 2021 09:45:28 +0200 Subject: [PATCH 289/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Remove dependency on 'junit-vintage-engine' from module 'hibernate-tools-tests-nodb' Signed-off-by: Koen Aers --- test/nodb/pom.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 7b5b10cac6..6a2f034c60 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -37,10 +37,6 @@ org.junit.jupiter junit-jupiter-engine - - org.junit.vintage - junit-vintage-engine - From ff1351b255271f8047ab7f77a476af8b09832b9e Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 1 Jul 2021 10:07:00 +0200 Subject: [PATCH 290/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Add 'junit-jupiter-engine' and 'junit-vintage-engine' dependencies to module 'hibernate-tools-tests-h2' Signed-off-by: Koen Aers --- test/h2/pom.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/h2/pom.xml b/test/h2/pom.xml index c46f3806e0..c6499f2509 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -28,6 +28,14 @@ org.hibernate hibernate-tools-tests-common + + org.junit.jupiter + junit-jupiter-engine + + + org.junit.vintage + junit-vintage-engine + From 1cede2dbc2c097653b01fd448a86b423beee526b Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 1 Jul 2021 10:40:34 +0200 Subject: [PATCH 291/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbx1093.TestCase' Signed-off-by: Koen Aers --- .../org/hibernate/tool/hbx1093/TestCase.java | 44 ++++++++++++------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/test/h2/src/test/java/org/hibernate/tool/hbx1093/TestCase.java b/test/h2/src/test/java/org/hibernate/tool/hbx1093/TestCase.java index 420eec7d59..59acd9179e 100644 --- a/test/h2/src/test/java/org/hibernate/tool/hbx1093/TestCase.java +++ b/test/h2/src/test/java/org/hibernate/tool/hbx1093/TestCase.java @@ -1,9 +1,27 @@ /* - * Created on 07-Dec-2004 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package org.hibernate.tool.hbx1093; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import java.io.IOException; import java.nio.file.Files; @@ -14,35 +32,31 @@ import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; import org.hibernate.tool.hbm2x.POJOExporter; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author koen */ public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputDir = new File("output"); private MetadataDescriptor metadataDescriptor = null; - private File outputDir = null; - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); - outputDir = temporaryFolder.getRoot(); DefaultReverseEngineeringStrategy c = new DefaultReverseEngineeringStrategy(); c.setSettings(new ReverseEngineeringSettings(c).setDetectManyToMany(true)); metadataDescriptor = MetadataDescriptorFactory .createJdbcDescriptor(c, null, true); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -56,10 +70,10 @@ public void testGenerateJava() throws IOException { exporter.start(); File etManyToManyComp1 = new File(outputDir, "EtManyToManyComp1.java"); String str = new String(Files.readAllBytes(etManyToManyComp1.toPath())); - Assert.assertTrue(str.contains("@JoinColumn(name=\"FK_ET_MANY_TO_MANY_COMP22_ID\"")); + assertTrue(str.contains("@JoinColumn(name=\"FK_ET_MANY_TO_MANY_COMP22_ID\"")); File etManyToManyComp2 = new File(outputDir, "EtManyToManyComp2.java"); str = new String(Files.readAllBytes(etManyToManyComp2.toPath())); - Assert.assertTrue(str.contains("@JoinColumn(name=\"FK_ET_MANY_TO_MANY_COMP11_ID\"")); + assertTrue(str.contains("@JoinColumn(name=\"FK_ET_MANY_TO_MANY_COMP11_ID\"")); } } From e913e6eda7a86ae8bc69581e5965ae7cb1f02d64 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 2 Jul 2021 09:34:04 +0200 Subject: [PATCH 292/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Add 'junit-jupiter-engine' and 'junit-vintage-engine' dependencies to module 'hibernate-tools-tests-common' Signed-off-by: Koen Aers --- test/common/pom.xml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/test/common/pom.xml b/test/common/pom.xml index e747f64dba..133a2e49c9 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -16,6 +16,14 @@ Hibernate Tools Common Database Tests Project + + junit + junit + + + jaxen + jaxen + org.hibernate hibernate-tools @@ -24,13 +32,13 @@ org.hibernate hibernate-tools-tests-utils - - junit - junit - - jaxen - jaxen + org.junit.jupiter + junit-jupiter-engine + + + org.junit.vintage + junit-vintage-engine From 84853ce5354c3073014dd4fb5322175db4a3f94c Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 2 Jul 2021 11:06:55 +0200 Subject: [PATCH 293/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Add 'junit-jupiter-engine' and 'junit-vintage-engine' dependencies to module 'hibernate-tools-tests-utils' Signed-off-by: Koen Aers --- test/utils/pom.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/utils/pom.xml b/test/utils/pom.xml index b5e2063d3a..88b6ab72b3 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -34,6 +34,14 @@ org.hibernate hibernate-tools + + org.junit.jupiter + junit-jupiter-engine + + + org.junit.vintage + junit-vintage-engine + From b6b0b0c43f4e8c01a207498fc29a6335f79a47cd Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 2 Jul 2021 11:23:44 +0200 Subject: [PATCH 294/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tools.test.util.ResourceUtilTest' Signed-off-by: Koen Aers --- .../tools/test/util/ResourceUtilTest.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/test/utils/src/test/java/org/hibernate/tools/test/util/ResourceUtilTest.java b/test/utils/src/test/java/org/hibernate/tools/test/util/ResourceUtilTest.java index 9c2c50ff47..23407f4876 100644 --- a/test/utils/src/test/java/org/hibernate/tools/test/util/ResourceUtilTest.java +++ b/test/utils/src/test/java/org/hibernate/tools/test/util/ResourceUtilTest.java @@ -1,20 +1,22 @@ package org.hibernate.tools.test.util; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; -import org.junit.Assert; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class ResourceUtilTest { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); @Test public void testGetResourcesLocation() { - Assert.assertEquals( + assertEquals( "/org/hibernate/tools/test/util/", ResourceUtil.getResourcesLocation(this)); } @@ -22,12 +24,11 @@ public void testGetResourcesLocation() { @Test public void testCreateResources() { String[] resources = new String[] { "HelloWorld.hbm.xml" }; - File outputFolder = temporaryFolder.getRoot(); File helloWorldFile = new File(outputFolder, "HelloWorld.hbm.xml"); - Assert.assertFalse(helloWorldFile.exists()); + assertFalse(helloWorldFile.exists()); ResourceUtil.createResources(this, resources, outputFolder); - Assert.assertTrue(helloWorldFile.exists()); - Assert.assertTrue(FileUtil + assertTrue(helloWorldFile.exists()); + assertTrue(FileUtil .findFirstString("class", helloWorldFile) .contains("HelloWorld")); } From 8e1ca61ec3dc2e2993c2843f9ad2abf57d06a3cc Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 2 Jul 2021 15:46:04 +0200 Subject: [PATCH 295/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor class 'org.hibernate.tools.test.util.JUnitUtil' and test class 'org.hibernate.tools.test.util.JUnitUtilTest.java' Signed-off-by: Koen Aers --- test/utils/pom.xml | 1 + .../hibernate/tools/test/util/JUnitUtil.java | 37 ++++++++++---- .../tools/test/util/JUnitUtilTest.java | 51 +++++++++++++------ 3 files changed, 64 insertions(+), 25 deletions(-) diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 88b6ab72b3..927f2045a8 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -37,6 +37,7 @@ org.junit.jupiter junit-jupiter-engine + compile org.junit.vintage diff --git a/test/utils/src/main/java/org/hibernate/tools/test/util/JUnitUtil.java b/test/utils/src/main/java/org/hibernate/tools/test/util/JUnitUtil.java index 9dd13f5118..a3a63ad226 100644 --- a/test/utils/src/main/java/org/hibernate/tools/test/util/JUnitUtil.java +++ b/test/utils/src/main/java/org/hibernate/tools/test/util/JUnitUtil.java @@ -1,10 +1,30 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2017-2020 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tools.test.util; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import java.util.Iterator; -import org.junit.Assert; -import org.junit.ComparisonFailure; +import org.opentest4j.AssertionFailedError; public class JUnitUtil { @@ -18,18 +38,15 @@ public static void assertIteratorContainsExactly( actualAmountOfElements++; iterator.next(); } - if (actualAmountOfElements != expectedAmountOfElements) { - throw new ComparisonFailure( - reason, - Integer.toString(expectedAmountOfElements), - Integer.toString(actualAmountOfElements)); + if (expectedAmountOfElements != actualAmountOfElements) { + throw new AssertionFailedError(reason, expectedAmountOfElements, actualAmountOfElements); } } public static void assertIsNonEmptyFile(File file) { - Assert.assertTrue(file + " does not exist", file.exists() ); - Assert.assertTrue(file + " not a file", file.isFile() ); - Assert.assertTrue(file + " does not have any contents", file.length()>0); + assertTrue(file.exists(), file + " does not exist"); + assertTrue(file.isFile(), file + " not a file"); + assertTrue(file.length()>0, file + " does not have any contents"); } } diff --git a/test/utils/src/test/java/org/hibernate/tools/test/util/JUnitUtilTest.java b/test/utils/src/test/java/org/hibernate/tools/test/util/JUnitUtilTest.java index 74da50ec16..acb8b20800 100644 --- a/test/utils/src/test/java/org/hibernate/tools/test/util/JUnitUtilTest.java +++ b/test/utils/src/test/java/org/hibernate/tools/test/util/JUnitUtilTest.java @@ -1,11 +1,32 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2017-2020 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tools.test.util; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + import java.io.File; import java.util.ArrayList; -import org.junit.Assert; -import org.junit.ComparisonFailure; -import org.junit.Test; +import org.junit.jupiter.api.Test; +import org.opentest4j.AssertionFailedError; public class JUnitUtilTest { @@ -16,21 +37,21 @@ public void testAssertIteratorContainsExactly() { list.add("bar"); try { JUnitUtil.assertIteratorContainsExactly("less", list.iterator(), 1); - Assert.fail(); - } catch (ComparisonFailure e) { - Assert.assertTrue(e.getMessage().contains("less")); + fail(); + } catch (AssertionFailedError e) { + assertTrue(e.getMessage().contains("less")); } try { JUnitUtil.assertIteratorContainsExactly("more", list.iterator(), 3); - Assert.fail(); - } catch (ComparisonFailure e) { - Assert.assertTrue(e.getMessage().contains("more")); + fail(); + } catch (AssertionFailedError e) { + assertTrue(e.getMessage().contains("more")); } try { JUnitUtil.assertIteratorContainsExactly("exact", list.iterator(), 2); - Assert.assertTrue(true); - } catch (ComparisonFailure e) { - Assert.fail(); + assertTrue(true); + } catch (AssertionFailedError e) { + fail(); } } @@ -41,14 +62,14 @@ public void testAssertIsNonEmptyFile() throws Exception { try { JUnitUtil.assertIsNonEmptyFile(exists); } catch (Exception e) { - Assert.fail(); + fail(); } File doesNotExist = new File(exists.getAbsolutePath() + '_'); try { JUnitUtil.assertIsNonEmptyFile(doesNotExist); - Assert.fail(); + fail(); } catch (AssertionError e) { - Assert.assertTrue(e.getMessage().contains("does not exist")); + assertTrue(e.getMessage().contains("does not exist")); } } From 74ec638697fbe3c06d8a42db34d87bb5a0fc25a7 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 2 Jul 2021 16:31:17 +0200 Subject: [PATCH 296/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tools.test.util.JdbcUtilTest' Signed-off-by: Koen Aers --- .../tools/test/util/JdbcUtilTest.java | 80 ++++++++++++------- 1 file changed, 51 insertions(+), 29 deletions(-) diff --git a/test/utils/src/test/java/org/hibernate/tools/test/util/JdbcUtilTest.java b/test/utils/src/test/java/org/hibernate/tools/test/util/JdbcUtilTest.java index 997a9c7d19..4acf7162ee 100644 --- a/test/utils/src/test/java/org/hibernate/tools/test/util/JdbcUtilTest.java +++ b/test/utils/src/test/java/org/hibernate/tools/test/util/JdbcUtilTest.java @@ -1,5 +1,30 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2017-2020 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tools.test.util; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import java.io.FileWriter; import java.lang.reflect.InvocationHandler; @@ -13,26 +38,24 @@ import java.sql.ResultSet; import java.util.Properties; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class JdbcUtilTest { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); - @Before + @BeforeEach public void setUp() throws Exception { clearConnectionTable(); createHibernateProperties("sa", "", "jdbc:h2:mem:test"); setUpClassLoader(); } - @After + @AfterEach public void tearDown() throws Exception { clearConnectionTable(); restoreClassLoader(); @@ -41,17 +64,17 @@ public void tearDown() throws Exception { @Test public void testGetConnectionProperties() throws Exception { Properties properties = JdbcUtil.getConnectionProperties(); - Assert.assertEquals("jdbc:h2:mem:test", properties.get("url")); - Assert.assertEquals("sa", properties.get("user")); - Assert.assertEquals("", properties.get("password")); + assertEquals("jdbc:h2:mem:test", properties.get("url")); + assertEquals("sa", properties.get("user")); + assertEquals("", properties.get("password")); } @Test public void testEstablishJdbcConnection() throws Exception { - Assert.assertNull(JdbcUtil.CONNECTION_TABLE.get(this)); + assertNull(JdbcUtil.CONNECTION_TABLE.get(this)); JdbcUtil.establishJdbcConnection(this); Connection connection = JdbcUtil.CONNECTION_TABLE.get(this); - Assert.assertFalse(connection.isClosed()); + assertFalse(connection.isClosed()); } @Test @@ -59,11 +82,11 @@ public void testReleaseJdbcConnection() throws Exception { Connection connection = DriverManager.getConnection("jdbc:h2:mem:test;USER=sa"); JdbcUtil.CONNECTION_TABLE.put(this, connection); - Assert.assertNotNull(JdbcUtil.CONNECTION_TABLE.get(this)); - Assert.assertFalse(connection.isClosed()); + assertNotNull(JdbcUtil.CONNECTION_TABLE.get(this)); + assertFalse(connection.isClosed()); JdbcUtil.releaseJdbcConnection(this); - Assert.assertNull(JdbcUtil.CONNECTION_TABLE.get(this)); - Assert.assertTrue(connection.isClosed()); + assertNull(JdbcUtil.CONNECTION_TABLE.get(this)); + assertTrue(connection.isClosed()); } @Test @@ -74,7 +97,7 @@ public void testExecuteDDL() throws Exception { ResultSet resultSet = connection .getMetaData() .getTables(null, null, "FOO", null); - Assert.assertFalse(resultSet.next()); + assertFalse(resultSet.next()); String[] sqls = new String[] { "CREATE TABLE FOO (BAR INT)" }; @@ -82,7 +105,7 @@ public void testExecuteDDL() throws Exception { resultSet = connection .getMetaData() .getTables(null, null, "FOO", null); - Assert.assertTrue(resultSet.next()); + assertTrue(resultSet.next()); } @Test @@ -96,19 +119,19 @@ public void testToIdentifier() throws Exception { connectionInvocationHandler ); JdbcUtil.CONNECTION_TABLE.put(this, connection); metaDataInvocationHandler.whichCase = "MIXED"; - Assert.assertEquals("Foo", JdbcUtil.toIdentifier(this, "Foo")); + assertEquals("Foo", JdbcUtil.toIdentifier(this, "Foo")); metaDataInvocationHandler.whichCase = "UPPER"; - Assert.assertEquals("FOO", JdbcUtil.toIdentifier(this, "Foo")); + assertEquals("FOO", JdbcUtil.toIdentifier(this, "Foo")); metaDataInvocationHandler.whichCase = "LOWER"; - Assert.assertEquals("foo", JdbcUtil.toIdentifier(this, "Foo")); + assertEquals("foo", JdbcUtil.toIdentifier(this, "Foo")); } @Test public void testIsDatabaseOnline() throws Exception { - Assert.assertTrue(JdbcUtil.isDatabaseOnline()); - new File(temporaryFolder.getRoot(), "hibernate.properties").delete(); + assertTrue(JdbcUtil.isDatabaseOnline()); + new File(outputFolder, "hibernate.properties").delete(); createHibernateProperties("foo", "bar", "jdbc:sqlserver://org.foo.bar:1433"); - Assert.assertFalse(JdbcUtil.isDatabaseOnline()); + assertFalse(JdbcUtil.isDatabaseOnline()); } private void clearConnectionTable() throws Exception { @@ -127,7 +150,6 @@ private void createHibernateProperties( properties.put("hibernate.connection.username", user); properties.put("hibernate.connection.password", password); properties.put("hibernate.connection.url", url); - File outputFolder = temporaryFolder.getRoot(); File propertiesFile = new File(outputFolder, "hibernate.properties"); FileWriter writer = new FileWriter(propertiesFile); properties.store(writer, null); @@ -138,7 +160,7 @@ private void setUpClassLoader() throws Exception { ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader( new URLClassLoader( - new URL[] { temporaryFolder.getRoot().toURI().toURL() }, + new URL[] { outputFolder.toURI().toURL() }, currentClassLoader)); } From 63e8df3f24efaede4c1785bf0ca2116ba155f5b5 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 2 Jul 2021 17:38:43 +0200 Subject: [PATCH 297/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tools.test.util.HibernateUtilTest' Signed-off-by: Koen Aers --- .../tools/test/util/HibernateUtilTest.java | 59 +++++++++++++------ 1 file changed, 40 insertions(+), 19 deletions(-) diff --git a/test/utils/src/test/java/org/hibernate/tools/test/util/HibernateUtilTest.java b/test/utils/src/test/java/org/hibernate/tools/test/util/HibernateUtilTest.java index d609ea609b..c93d8d3fa9 100644 --- a/test/utils/src/test/java/org/hibernate/tools/test/util/HibernateUtilTest.java +++ b/test/utils/src/test/java/org/hibernate/tools/test/util/HibernateUtilTest.java @@ -1,5 +1,29 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2017-2020 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tools.test.util; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertSame; + +import java.io.File; import java.util.Collections; import java.util.Properties; @@ -11,29 +35,27 @@ import org.hibernate.mapping.Table; import org.hibernate.tool.api.metadata.MetadataDescriptor; import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; -import org.junit.Assert; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class HibernateUtilTest { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); - + @TempDir + public File outputFolder = new File("output"); + @Test public void testGetForeignKey() { Table table = new Table(); - Assert.assertNull(HibernateUtil.getForeignKey(table, "foo")); - Assert.assertNull(HibernateUtil.getForeignKey(table, "bar")); - table.createForeignKey("foo", Collections.emptyList(), "fooClass", null); - Assert.assertNotNull(HibernateUtil.getForeignKey(table, "foo")); - Assert.assertNull(HibernateUtil.getForeignKey(table, "bar")); + assertNull(HibernateUtil.getForeignKey(table, "foo")); + assertNull(HibernateUtil.getForeignKey(table, "bar")); + table.createForeignKey("foo", Collections.emptyList(), "Bar", null); + assertNotNull(HibernateUtil.getForeignKey(table, "foo")); + assertNull(HibernateUtil.getForeignKey(table, "bar")); } @Test public void testDialectInstantiation() { - Assert.assertNotNull(new HibernateUtil.Dialect()); + assertNotNull(new HibernateUtil.Dialect()); } @Test @@ -42,27 +64,26 @@ public void testInitializeConfiguration() { .initializeMetadataDescriptor( this, new String[] { "HelloWorld.hbm.xml" }, - temporaryFolder.getRoot()) + outputFolder) .createMetadata(); - Assert.assertSame( + assertSame( HibernateUtil.Dialect.class, metadata.getDatabase().getDialect().getClass()); - Assert.assertNotNull(metadata.getEntityBinding("HelloWorld")); + assertNotNull(metadata.getEntityBinding("HelloWorld")); } @Test public void testAddAnnotatedClass() { Properties properties = new Properties(); properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); - properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, null, properties); - Assert.assertNull(metadataDescriptor + assertNull(metadataDescriptor .createMetadata() .getEntityBinding( "org.hibernate.tools.test.util.HibernateUtilTest$Dummy")); HibernateUtil.addAnnotatedClass(metadataDescriptor, Dummy.class); - Assert.assertNotNull(metadataDescriptor + assertNotNull(metadataDescriptor .createMetadata() .getEntityBinding( "org.hibernate.tools.test.util.HibernateUtilTest$Dummy")); From 8e3cc8604e4a5efaf50ad581d95cc98d8f9654b1 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 2 Jul 2021 17:51:45 +0200 Subject: [PATCH 298/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tools.test.util.JavaUtilTest' Signed-off-by: Koen Aers --- .../tools/test/util/JavaUtilTest.java | 45 +++++++++++++------ 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/test/utils/src/test/java/org/hibernate/tools/test/util/JavaUtilTest.java b/test/utils/src/test/java/org/hibernate/tools/test/util/JavaUtilTest.java index 828302fc09..b07c1974f5 100644 --- a/test/utils/src/test/java/org/hibernate/tools/test/util/JavaUtilTest.java +++ b/test/utils/src/test/java/org/hibernate/tools/test/util/JavaUtilTest.java @@ -1,12 +1,32 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2017-2020 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tools.test.util; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import java.io.FileWriter; -import org.junit.Assert; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class JavaUtilTest { @@ -22,13 +42,12 @@ public class JavaUtilTest { " public Foo foo; "+ "} "; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); @Test public void testCompile() throws Exception { - File testFolder = temporaryFolder.getRoot(); - File packageFolder = new File(testFolder, "org/hibernate/tool/test"); + File packageFolder = new File(outputFolder, "org/hibernate/tool/test"); packageFolder.mkdirs(); File fooFile = new File(packageFolder, "Foo.java"); FileWriter fileWriter = new FileWriter(fooFile); @@ -38,11 +57,11 @@ public void testCompile() throws Exception { fileWriter = new FileWriter(barFile); fileWriter.write(BAR_STRING); fileWriter.close(); - Assert.assertFalse(new File(packageFolder, "Foo.class").exists()); - Assert.assertFalse(new File(packageFolder, "Bar.class").exists()); - JavaUtil.compile(testFolder); - Assert.assertTrue(new File(packageFolder, "Foo.class").exists()); - Assert.assertTrue(new File(packageFolder, "Bar.class").exists()); + assertFalse(new File(packageFolder, "Foo.class").exists()); + assertFalse(new File(packageFolder, "Bar.class").exists()); + JavaUtil.compile(outputFolder); + assertTrue(new File(packageFolder, "Foo.class").exists()); + assertTrue(new File(packageFolder, "Bar.class").exists()); } } From 48d68474c93ed8ecb4b1037bb88add16ba90e061 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 2 Jul 2021 18:06:00 +0200 Subject: [PATCH 299/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tools.test.util.FileUtilTest' Signed-off-by: Koen Aers --- .../tools/test/util/FileUtilTest.java | 51 +++++++++++++------ 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/test/utils/src/test/java/org/hibernate/tools/test/util/FileUtilTest.java b/test/utils/src/test/java/org/hibernate/tools/test/util/FileUtilTest.java index e10e3b6f19..86bd1605cf 100644 --- a/test/utils/src/test/java/org/hibernate/tools/test/util/FileUtilTest.java +++ b/test/utils/src/test/java/org/hibernate/tools/test/util/FileUtilTest.java @@ -1,35 +1,56 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2017-2020 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tools.test.util; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; -import org.junit.Assert; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class FileUtilTest { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); @Test public void testFindFirstString() throws Exception { String resource = "/org/hibernate/tools/test/util/FileUtilTest.resource"; File file = new File(getClass().getResource(resource).toURI()); - Assert.assertEquals("or would it be a bar test?", FileUtil.findFirstString("bar", file)); - Assert.assertNull(FileUtil.findFirstString("foobar", file)); - Assert.assertEquals("This is a foo test", FileUtil.findFirstString("test", file)); - Assert.assertEquals("And a third line...", FileUtil.findFirstString("third", file)); + assertEquals("or would it be a bar test?", FileUtil.findFirstString("bar", file)); + assertNull(FileUtil.findFirstString("foobar", file)); + assertEquals("This is a foo test", FileUtil.findFirstString("test", file)); + assertEquals("And a third line...", FileUtil.findFirstString("third", file)); } @Test public void testGenerateNoopComparator() throws Exception { - FileUtil.generateNoopComparator(temporaryFolder.getRoot()); - File pkg = new File(temporaryFolder.getRoot(), "comparator"); - Assert.assertTrue(pkg.isDirectory() && pkg.exists()); + FileUtil.generateNoopComparator(outputFolder); + File pkg = new File(outputFolder, "comparator"); + assertTrue(pkg.isDirectory() && pkg.exists()); File comp = new File(pkg, "NoopComparator.java"); - Assert.assertTrue(comp.isFile() && comp.exists()); - Assert.assertEquals( + assertTrue(comp.isFile() && comp.exists()); + assertEquals( "public class NoopComparator implements Comparator {", FileUtil.findFirstString("NoopComparator", comp)); } From 71ab6617c8106595fb4cae3fe885fd43915a4801 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sat, 3 Jul 2021 14:24:23 +0200 Subject: [PATCH 300/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tools.test.util.ConnectionLeakUtilTest' Signed-off-by: Koen Aers --- .../test/util/ConnectionLeakUtilTest.java | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/test/utils/src/test/java/org/hibernate/tools/test/util/ConnectionLeakUtilTest.java b/test/utils/src/test/java/org/hibernate/tools/test/util/ConnectionLeakUtilTest.java index 262ef0430b..da6c09daec 100644 --- a/test/utils/src/test/java/org/hibernate/tools/test/util/ConnectionLeakUtilTest.java +++ b/test/utils/src/test/java/org/hibernate/tools/test/util/ConnectionLeakUtilTest.java @@ -1,17 +1,37 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2018-2020 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tools.test.util; +import static org.junit.jupiter.api.Assertions.assertEquals; + import java.sql.Connection; import java.sql.DriverManager; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class ConnectionLeakUtilTest { private ConnectionLeakUtil connectionLeakUtil = null; - @Before + @BeforeEach public void before() { connectionLeakUtil = ConnectionLeakUtil.forH2(); connectionLeakUtil.initialize(); @@ -24,7 +44,7 @@ public void testLeaks() throws Exception { connectionLeakUtil.assertNoLeaks(); throw new RuntimeException("should not happen"); } catch (AssertionError e) { - Assert.assertEquals("1 connections are leaked.", e.getMessage()); + assertEquals("1 connections are leaked.", e.getMessage()); } } From 7cba9c590ba1be653bad0bae1003b24a048c9b62 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sun, 4 Jul 2021 15:05:10 +0200 Subject: [PATCH 301/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tools.test.util.AntUtilTest' Signed-off-by: Koen Aers --- .../tools/test/util/AntUtilTest.java | 43 ++++++++++++++----- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/test/utils/src/test/java/org/hibernate/tools/test/util/AntUtilTest.java b/test/utils/src/test/java/org/hibernate/tools/test/util/AntUtilTest.java index 9bd9ead03a..c5cf8a6cbe 100644 --- a/test/utils/src/test/java/org/hibernate/tools/test/util/AntUtilTest.java +++ b/test/utils/src/test/java/org/hibernate/tools/test/util/AntUtilTest.java @@ -1,15 +1,36 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2017-2020 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tools.test.util; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.ByteArrayInputStream; import java.io.File; import java.nio.file.Files; import org.apache.tools.ant.Target; import org.apache.tools.ant.taskdefs.Echo; -import org.junit.Assert; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class AntUtilTest { @@ -18,21 +39,21 @@ public class AntUtilTest { " \n" + " \n"; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); - + @TempDir + public File outputFolder = new File("output"); + @Test public void testCreateProject() throws Exception { - File buildFile = new File(temporaryFolder.getRoot(), "build.xml"); + File buildFile = new File(outputFolder, "build.xml"); Files.copy(new ByteArrayInputStream(BUILD_XML.getBytes()), buildFile.toPath()); AntUtil.Project project = AntUtil.createProject(buildFile); - Assert.assertEquals("AntUtilTest", project.getName()); + assertEquals("AntUtilTest", project.getName()); } @Test public void testGetLog() { AntUtil.Project project = new AntUtil.Project(); - Assert.assertNull(project.logBuffer); + assertNull(project.logBuffer); Target target = new Target(); target.setName("foobar"); Echo echo = new Echo(); @@ -41,7 +62,7 @@ public void testGetLog() { target.addTask(echo); project.addTarget(target); project.executeTarget("foobar"); - Assert.assertTrue(AntUtil.getLog(project).contains("Executing foobar")); + assertTrue(AntUtil.getLog(project).contains("Executing foobar")); } } From 5ad592e7668e1558739474d6fe9f1b7f648c4938 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 5 Jul 2021 09:29:27 +0200 Subject: [PATCH 302/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Rename class 'org.hibernate.tool.test.db.h2.TestSuite' to 'org.hibernate.tool.test.db.h2.JUnit4TestSuite' Signed-off-by: Koen Aers --- .../tool/test/db/h2/{TestSuite.java => JUnit4TestSuite.java} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename test/h2/src/test/java/org/hibernate/tool/test/db/h2/{TestSuite.java => JUnit4TestSuite.java} (89%) diff --git a/test/h2/src/test/java/org/hibernate/tool/test/db/h2/TestSuite.java b/test/h2/src/test/java/org/hibernate/tool/test/db/h2/JUnit4TestSuite.java similarity index 89% rename from test/h2/src/test/java/org/hibernate/tool/test/db/h2/TestSuite.java rename to test/h2/src/test/java/org/hibernate/tool/test/db/h2/JUnit4TestSuite.java index 32cd7ea86b..9127facc0d 100644 --- a/test/h2/src/test/java/org/hibernate/tool/test/db/h2/TestSuite.java +++ b/test/h2/src/test/java/org/hibernate/tool/test/db/h2/JUnit4TestSuite.java @@ -8,4 +8,4 @@ @SuiteClasses({ org.hibernate.tool.test.db.CommonTestSuite.class }) -public class TestSuite {} +public class JUnit4TestSuite {} From bc1a7fc27d880f086e9c4cf2d6af012f95e6a3a5 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 5 Jul 2021 10:41:05 +0200 Subject: [PATCH 303/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Rename class 'org.hibernate.tool.test.db.h2.JUnit4TestSuite' to 'org.hibernate.tool.test.db.h2.TestSuiteJUnit4' Signed-off-by: Koen Aers --- .../test/db/h2/{JUnit4TestSuite.java => TestSuiteJUnit4.java} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename test/h2/src/test/java/org/hibernate/tool/test/db/h2/{JUnit4TestSuite.java => TestSuiteJUnit4.java} (89%) diff --git a/test/h2/src/test/java/org/hibernate/tool/test/db/h2/JUnit4TestSuite.java b/test/h2/src/test/java/org/hibernate/tool/test/db/h2/TestSuiteJUnit4.java similarity index 89% rename from test/h2/src/test/java/org/hibernate/tool/test/db/h2/JUnit4TestSuite.java rename to test/h2/src/test/java/org/hibernate/tool/test/db/h2/TestSuiteJUnit4.java index 9127facc0d..b9b86c3598 100644 --- a/test/h2/src/test/java/org/hibernate/tool/test/db/h2/JUnit4TestSuite.java +++ b/test/h2/src/test/java/org/hibernate/tool/test/db/h2/TestSuiteJUnit4.java @@ -8,4 +8,4 @@ @SuiteClasses({ org.hibernate.tool.test.db.CommonTestSuite.class }) -public class JUnit4TestSuite {} +public class TestSuiteJUnit4 {} From b0bc3b605c7694fe80353102eae2f4a6e3e008d4 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 5 Jul 2021 11:37:35 +0200 Subject: [PATCH 304/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor class 'org.hibernate.tools.test.util.ResourceUtil' and test class 'org.hibernate.tools.test.util.ResourceUtilTest' Signed-off-by: Koen Aers --- .../hibernate/tools/test/util/JdbcUtil.java | 3 +- .../tools/test/util/ResourceUtil.java | 53 +++++++++++++++---- .../tools/test/util/ResourceUtilTest.java | 35 ++++++++++-- .../test/resources/ResourceUtilTest.resource | 0 .../tools/test/util/JUnitUtilTest.resource | 1 - .../tools/test/util/hibernate.properties | 1 - 6 files changed, 73 insertions(+), 20 deletions(-) create mode 100644 test/utils/src/test/resources/ResourceUtilTest.resource delete mode 100644 test/utils/src/test/resources/org/hibernate/tools/test/util/JUnitUtilTest.resource delete mode 100644 test/utils/src/test/resources/org/hibernate/tools/test/util/hibernate.properties diff --git a/test/utils/src/main/java/org/hibernate/tools/test/util/JdbcUtil.java b/test/utils/src/main/java/org/hibernate/tools/test/util/JdbcUtil.java index 68a920f462..283b280da9 100644 --- a/test/utils/src/main/java/org/hibernate/tools/test/util/JdbcUtil.java +++ b/test/utils/src/main/java/org/hibernate/tools/test/util/JdbcUtil.java @@ -112,8 +112,7 @@ public static void dropDatabase(Object test) { private static String[] getSqls(Object test, String scriptName) { String[] result = new String[] {}; - String location = ResourceUtil.getResourcesLocation(test) + scriptName; - InputStream inputStream = test.getClass().getResourceAsStream(location); + InputStream inputStream = ResourceUtil.resolveResourceLocation(test.getClass(), scriptName); if (inputStream != null) { BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream)); diff --git a/test/utils/src/main/java/org/hibernate/tools/test/util/ResourceUtil.java b/test/utils/src/main/java/org/hibernate/tools/test/util/ResourceUtil.java index 8feb6d8768..6e5ff068e8 100644 --- a/test/utils/src/main/java/org/hibernate/tools/test/util/ResourceUtil.java +++ b/test/utils/src/main/java/org/hibernate/tools/test/util/ResourceUtil.java @@ -1,3 +1,22 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2017-2020 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tools.test.util; import java.io.File; @@ -7,20 +26,10 @@ public class ResourceUtil { - public static String getResourcesLocation(Object test) { - return '/' + test.getClass().getPackage().getName().replace('.', '/') + '/'; - } - public static void createResources(Object test, String[] resources, File resourcesDir) { try { - String defaultResourceLocation = getResourcesLocation(test); for (String resource : resources) { - String resourceLocation = - (resource.startsWith("/")) - ? resource : defaultResourceLocation + resource; - InputStream inputStream = test - .getClass() - .getResourceAsStream(resourceLocation); + InputStream inputStream = resolveResourceLocation(test.getClass(), resource); File resourceFile = new File(resourcesDir, resource); File parent = resourceFile.getParentFile(); if (!parent.exists()) { @@ -33,4 +42,26 @@ public static void createResources(Object test, String[] resources, File resourc } } + public static InputStream resolveResourceLocation(Class testClass, String resourceName) { + InputStream result = null; + if (resourceName.startsWith("/")) { + result = testClass.getResourceAsStream(resourceName); + } else { + result = resolveRelativeResourceLocation(testClass, resourceName); + } + return result; + } + + private static String getRelativeResourcesRoot(Class testClass) { + return '/' + testClass.getPackage().getName().replace('.', '/') + '/'; + } + + private static InputStream resolveRelativeResourceLocation(Class testClass, String resourceName) { + InputStream result = testClass.getResourceAsStream(getRelativeResourcesRoot(testClass) + resourceName); + if (result == null && testClass.getSuperclass() != Object.class) { + result = resolveRelativeResourceLocation(testClass.getSuperclass(), resourceName); + } + return result; + } + } diff --git a/test/utils/src/test/java/org/hibernate/tools/test/util/ResourceUtilTest.java b/test/utils/src/test/java/org/hibernate/tools/test/util/ResourceUtilTest.java index 23407f4876..5a72c059f3 100644 --- a/test/utils/src/test/java/org/hibernate/tools/test/util/ResourceUtilTest.java +++ b/test/utils/src/test/java/org/hibernate/tools/test/util/ResourceUtilTest.java @@ -1,10 +1,31 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2017-2020 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tools.test.util; -import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; import java.io.File; +import java.io.InputStream; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; @@ -15,10 +36,14 @@ public class ResourceUtilTest { public File outputFolder = new File("output"); @Test - public void testGetResourcesLocation() { - assertEquals( - "/org/hibernate/tools/test/util/", - ResourceUtil.getResourcesLocation(this)); + public void testResolveResourceLocation() { + InputStream is = ResourceUtil.resolveResourceLocation(getClass(), "/foo"); + assertNull(is); + is = ResourceUtil.resolveResourceLocation(getClass(), "/ResourceUtilTest.resource"); + assertNotNull(is); + is = ResourceUtil.resolveResourceLocation(getClass(), "HelloWorld.foo.bar"); + assertNull(is); + is = ResourceUtil.resolveResourceLocation(getClass(), "HelloWorld.hbm.xml"); } @Test diff --git a/test/utils/src/test/resources/ResourceUtilTest.resource b/test/utils/src/test/resources/ResourceUtilTest.resource new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/utils/src/test/resources/org/hibernate/tools/test/util/JUnitUtilTest.resource b/test/utils/src/test/resources/org/hibernate/tools/test/util/JUnitUtilTest.resource deleted file mode 100644 index 52f9fc2b35..0000000000 --- a/test/utils/src/test/resources/org/hibernate/tools/test/util/JUnitUtilTest.resource +++ /dev/null @@ -1 +0,0 @@ -the file is not empty \ No newline at end of file diff --git a/test/utils/src/test/resources/org/hibernate/tools/test/util/hibernate.properties b/test/utils/src/test/resources/org/hibernate/tools/test/util/hibernate.properties deleted file mode 100644 index da21574937..0000000000 --- a/test/utils/src/test/resources/org/hibernate/tools/test/util/hibernate.properties +++ /dev/null @@ -1 +0,0 @@ -hibernate.dialect org.hibernate.tools.test.util.HibernateUtil$Dialect \ No newline at end of file From b17487a6b19a5aabd7b1eceb88fac28c094cf9dc Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 5 Jul 2021 11:59:08 +0200 Subject: [PATCH 305/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Add test suite 'org.hibernate.tool.test.db.DbTestSuite' assembling the JUnit Jupiter database tests Signed-off-by: Koen Aers --- test/common/pom.xml | 1 + .../hibernate/tool/test/db/DbTestSuite.java | 79 +++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 test/common/src/main/java/org/hibernate/tool/test/db/DbTestSuite.java diff --git a/test/common/pom.xml b/test/common/pom.xml index 133a2e49c9..5845044191 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -35,6 +35,7 @@ org.junit.jupiter junit-jupiter-engine + compile org.junit.vintage diff --git a/test/common/src/main/java/org/hibernate/tool/test/db/DbTestSuite.java b/test/common/src/main/java/org/hibernate/tool/test/db/DbTestSuite.java new file mode 100644 index 0000000000..cd3dd17c13 --- /dev/null +++ b/test/common/src/main/java/org/hibernate/tool/test/db/DbTestSuite.java @@ -0,0 +1,79 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.hibernate.tool.test.db; + +import org.junit.jupiter.api.Nested; + +public class DbTestSuite { + + @Nested public class AntHibernateToolTests extends org.hibernate.tool.ant.AntHibernateTool.TestCase {} + @Nested public class Cfg2HbmNoError extends org.hibernate.tool.ant.Cfg2HbmNoError.TestCase {} + @Nested public class Cfg2HbmWithCustomReverseNamingStrategy extends org.hibernate.tool.ant.Cfg2HbmWithCustomReverseNamingStrategy.TestCase {} + @Nested public class Cfg2HbmWithInvalidReverseNamingStrategy extends org.hibernate.tool.ant.Cfg2HbmWithInvalidReverseNamingStrategy.TestCase {} + @Nested public class Cfg2HbmWithPackageName extends org.hibernate.tool.ant.Cfg2HbmWithPackageName.TestCase {} + @Nested public class Cfg2HbmWithPackageNameAndReverseNamingStrategy extends org.hibernate.tool.ant.Cfg2HbmWithPackageNameAndReverseNamingStrategy.TestCase {} + @Nested public class EJB3Configuration extends org.hibernate.tool.ant.EJB3Configuration.TestCase {} + @Nested public class GenericExport extends org.hibernate.tool.ant.GenericExport.TestCase {} + @Nested public class Hbm2JavaConfiguration extends org.hibernate.tool.ant.Hbm2JavaConfiguration.TestCase {} + @Nested public class Hbm2JavaEJB3Configuration extends org.hibernate.tool.ant.Hbm2JavaEJB3Configuration.TestCase {} + @Nested public class HbmLint extends org.hibernate.tool.ant.HbmLint.TestCase {} + @Nested public class JDBCConfiguration extends org.hibernate.tool.ant.JDBCConfiguration.TestCase {} + @Nested public class JDBCConfigWithRevEngXml extends org.hibernate.tool.ant.JDBCConfigWithRevEngXml.TestCase {} + @Nested public class JPABogusPUnit extends org.hibernate.tool.ant.JPABogusPUnit.TestCase {} + @Nested public class JPAPropertyOverridesPUnit extends org.hibernate.tool.ant.JPAPropertyOverridesPUnit.TestCase {} + @Nested public class JPAPUnit extends org.hibernate.tool.ant.JPAPUnit.TestCase {} + @Nested public class Properties extends org.hibernate.tool.ant.Properties.TestCase {} + @Nested public class Query extends org.hibernate.tool.ant.Query.TestCase {} + @Nested public class SchemaExportWarning extends org.hibernate.tool.ant.SchemaExportWarning.TestCase {} + @Nested public class SchemaUpdateWarning extends org.hibernate.tool.ant.SchemaUpdateWarning.TestCase {} + @Nested public class DriverMetaData extends org.hibernate.tool.cfg.DriverMetaData.TestCase {} + @Nested public class JDBCMetaDataConfiguration extends org.hibernate.tool.cfg.JDBCMetaDataConfiguration.TestCase {} + @Nested public class CachedMetaData extends org.hibernate.tool.hbm2x.CachedMetaData.TestCase {} + @Nested public class DefaultDatabaseCollector extends org.hibernate.tool.hbm2x.DefaultDatabaseCollector.TestCase {} + @Nested public class DefaultSchemaCatalog extends org.hibernate.tool.hbm2x.DefaultSchemaCatalog.TestCase {} + @Nested public class GenerateFromJDBC extends org.hibernate.tool.hbm2x.GenerateFromJDBC.TestCase {} + @Nested public class GenerateFromJDBCWithJavaKeyword extends org.hibernate.tool.hbm2x.GenerateFromJDBCWithJavaKeyword.TestCase {} + @Nested public class IncrementalSchemaReading extends org.hibernate.tool.hbm2x.IncrementalSchemaReading.TestCase {} + @Nested public class JdbcHbm2JavaEjb3 extends org.hibernate.tool.hbm2x.JdbcHbm2JavaEjb3.TestCase {} + @Nested public class QueryExporterTest extends org.hibernate.tool.hbm2x.query.QueryExporterTest.TestCase {} + @Nested public class HbmLintTest extends org.hibernate.tool.hbmlint.HbmLintTest.TestCase {} + @Nested public class SchemaAnalyzer extends org.hibernate.tool.hbmlint.SchemaAnalyzer.TestCase {} + @Nested public class AutoQuote extends org.hibernate.tool.jdbc2cfg.AutoQuote.TestCase {} + @Nested public class Basic extends org.hibernate.tool.jdbc2cfg.Basic.TestCase {} + @Nested public class BasicMultiSchema extends org.hibernate.tool.jdbc2cfg.BasicMultiSchema.TestCase {} + @Nested public class CompositeId extends org.hibernate.tool.jdbc2cfg.CompositeId.TestCase {} + @Nested public class ForeignKeys extends org.hibernate.tool.jdbc2cfg.ForeignKeys.TestCase {} + @Nested public class Identity extends org.hibernate.tool.jdbc2cfg.Identity.TestCase {} + @Nested public class Index extends org.hibernate.tool.jdbc2cfg.Index.TestCase {} + @Nested public class KeyPropertyCompositeId extends org.hibernate.tool.jdbc2cfg.KeyPropertyCompositeId.TestCase {} + @Nested public class ManyToMany extends org.hibernate.tool.jdbc2cfg.ManyToMany.TestCase {} + @Nested public class MetaData extends org.hibernate.tool.jdbc2cfg.MetaData.TestCase {} + @Nested public class NoPrimaryKey extends org.hibernate.tool.jdbc2cfg.NoPrimaryKey.TestCase {} + @Nested public class OneToOne extends org.hibernate.tool.jdbc2cfg.OneToOne.TestCase {} + @Nested public class OverrideBinder extends org.hibernate.tool.jdbc2cfg.OverrideBinder.TestCase {} + @Nested public class Performance extends org.hibernate.tool.jdbc2cfg.Performance.TestCase {} + @Nested public class PersistentClasses extends org.hibernate.tool.jdbc2cfg.PersistentClasses.TestCase {} + @Nested public class RevEngForeignKey extends org.hibernate.tool.jdbc2cfg.RevEngForeignKey.TestCase {} + @Nested public class SearchEscapeString extends org.hibernate.tool.jdbc2cfg.SearchEscapeString.TestCase {} + @Nested public class TernarySchema extends org.hibernate.tool.jdbc2cfg.TernarySchema.TestCase {} + @Nested public class Versioning extends org.hibernate.tool.jdbc2cfg.Versioning.TestCase {} + @Nested public class Statistics extends org.hibernate.tool.stat.Statistics.TestCase {} + +} From 4f9191603901d145ea04b3622a9e1aa14cfa285f Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 5 Jul 2021 13:28:38 +0200 Subject: [PATCH 306/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Add 'org.hibernate.tool.test.db.h2.TestSuiteJupiter' assembling the JUnit Jupiter tests for H2 Signed-off-by: Koen Aers --- .../tool/test/db/h2/TestSuiteJupiter.java | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 test/h2/src/test/java/org/hibernate/tool/test/db/h2/TestSuiteJupiter.java diff --git a/test/h2/src/test/java/org/hibernate/tool/test/db/h2/TestSuiteJupiter.java b/test/h2/src/test/java/org/hibernate/tool/test/db/h2/TestSuiteJupiter.java new file mode 100644 index 0000000000..21b632d197 --- /dev/null +++ b/test/h2/src/test/java/org/hibernate/tool/test/db/h2/TestSuiteJupiter.java @@ -0,0 +1,30 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.hibernate.tool.test.db.h2; + +import org.hibernate.tool.test.db.DbTestSuite; +import org.junit.jupiter.api.Nested; + +public class TestSuiteJupiter { + + @Nested + public class H2TestSuite extends DbTestSuite {} + +} From 85e2ed5895c330c2192095a685e9c2de1763bc16 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 5 Jul 2021 13:50:53 +0200 Subject: [PATCH 307/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.AntHibernateTool.TestCase' Signed-off-by: Koen Aers --- .../AntHibernateTool/AnyKindOfUserType.java | 19 +++ .../tool/ant/AntHibernateTool/TestCase.java | 127 +++++++++++------- 2 files changed, 94 insertions(+), 52 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/ant/AntHibernateTool/AnyKindOfUserType.java b/test/common/src/main/java/org/hibernate/tool/ant/AntHibernateTool/AnyKindOfUserType.java index 13095b4851..7c6e906642 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/AntHibernateTool/AnyKindOfUserType.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/AntHibernateTool/AnyKindOfUserType.java @@ -1,3 +1,22 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.AntHibernateTool; import java.io.Serializable; import java.sql.PreparedStatement; diff --git a/test/common/src/main/java/org/hibernate/tool/ant/AntHibernateTool/TestCase.java b/test/common/src/main/java/org/hibernate/tool/ant/AntHibernateTool/TestCase.java index d850663cf7..48ab99e46b 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/AntHibernateTool/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/AntHibernateTool/TestCase.java @@ -1,36 +1,59 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.AntHibernateTool; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.JdbcUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -51,36 +74,36 @@ public void testHbm2DDLLogic() throws Exception { File dropAndCreate = new File(destinationDir, "dropandcreate.sql"); File update = new File(destinationDir, "update.sql"); - Assert.assertFalse(topDown.exists()); - Assert.assertFalse(onlyDrop.exists()); - Assert.assertFalse(onlyCreate.exists()); - Assert.assertFalse(dropAndCreate.exists()); - Assert.assertFalse(update.exists()); + assertFalse(topDown.exists()); + assertFalse(onlyDrop.exists()); + assertFalse(onlyCreate.exists()); + assertFalse(dropAndCreate.exists()); + assertFalse(update.exists()); project.executeTarget("testHbm2DDLLogic"); String log = AntUtil.getLog(project); - Assert.assertTrue(log, !log.contains("Exception")); + assertTrue(!log.contains("Exception"), log); - Assert.assertTrue(topDown.exists()); + assertTrue(topDown.exists()); - Assert.assertTrue(onlyDrop.exists()); - Assert.assertNull(FileUtil.findFirstString("create", onlyDrop)); - Assert.assertNotNull(FileUtil.findFirstString("drop", onlyDrop)); + assertTrue(onlyDrop.exists()); + assertNull(FileUtil.findFirstString("create", onlyDrop)); + assertNotNull(FileUtil.findFirstString("drop", onlyDrop)); - Assert.assertTrue(onlyCreate.exists()); - Assert.assertNull(FileUtil.findFirstString("drop", onlyCreate)); - Assert.assertNotNull(FileUtil.findFirstString("create", onlyCreate)); - Assert.assertNotNull(FileUtil.findFirstString("---", onlyCreate)); + assertTrue(onlyCreate.exists()); + assertNull(FileUtil.findFirstString("drop", onlyCreate)); + assertNotNull(FileUtil.findFirstString("create", onlyCreate)); + assertNotNull(FileUtil.findFirstString("---", onlyCreate)); - Assert.assertTrue(dropAndCreate.exists()); - Assert.assertNotNull(FileUtil.findFirstString("drop", dropAndCreate)); - Assert.assertNotNull(FileUtil.findFirstString("create", dropAndCreate)); - Assert.assertNotNull(FileUtil.findFirstString("---", dropAndCreate)); + assertTrue(dropAndCreate.exists()); + assertNotNull(FileUtil.findFirstString("drop", dropAndCreate)); + assertNotNull(FileUtil.findFirstString("create", dropAndCreate)); + assertNotNull(FileUtil.findFirstString("---", dropAndCreate)); - Assert.assertTrue(update.exists()); - Assert.assertNotNull(FileUtil.findFirstString("create", update)); - Assert.assertNotNull(FileUtil.findFirstString("---", update)); + assertTrue(update.exists()); + assertNotNull(FileUtil.findFirstString("create", update)); + assertNotNull(FileUtil.findFirstString("---", update)); } @@ -99,22 +122,22 @@ public void testHbm2DDLUpdateExecution() { File update1 = new File(destinationDir, "update1.sql"); File update2 = new File(destinationDir, "update2.sql"); - Assert.assertFalse(topDown.exists()); - Assert.assertFalse(onlyDrop.exists()); - Assert.assertFalse(update1.exists()); - Assert.assertFalse(update2.exists()); + assertFalse(topDown.exists()); + assertFalse(onlyDrop.exists()); + assertFalse(update1.exists()); + assertFalse(update2.exists()); project.executeTarget("testantcfgUpdateExecuted"); String log = AntUtil.getLog(project); - Assert.assertTrue(log, !log.contains("Exception")); + assertTrue(!log.contains("Exception"), log); - Assert.assertTrue(topDown.exists()); - Assert.assertTrue(onlyDrop.exists()); - Assert.assertTrue(update1.exists()); - Assert.assertNotNull(FileUtil.findFirstString("create", update1)); - Assert.assertTrue(update2.exists()); - Assert.assertEquals(0, update2.length()); + assertTrue(topDown.exists()); + assertTrue(onlyDrop.exists()); + assertTrue(update1.exists()); + assertNotNull(FileUtil.findFirstString("create", update1)); + assertTrue(update2.exists()); + assertEquals(0, update2.length()); } @@ -132,20 +155,20 @@ public void testHbm2DDLExportExecution() throws Exception { File update = new File(destinationDir, "update.sql"); File onlydrop = new File(destinationDir, "onlydrop.sql"); - Assert.assertFalse(export.exists()); - Assert.assertFalse(update.exists()); - Assert.assertFalse(onlydrop.exists()); + assertFalse(export.exists()); + assertFalse(update.exists()); + assertFalse(onlydrop.exists()); project.executeTarget("testantcfgExportExecuted"); String log = AntUtil.getLog(project); - Assert.assertTrue(log, !log.contains("Exception")); + assertTrue(!log.contains("Exception"), log); - Assert.assertTrue(export.exists()); - Assert.assertTrue(update.exists()); - Assert.assertNotNull(FileUtil.findFirstString("create", export)); + assertTrue(export.exists()); + assertTrue(update.exists()); + assertNotNull(FileUtil.findFirstString("create", export)); // if export is executed, update should be empty - Assert.assertEquals(0, update.length()); + assertEquals(0, update.length()); } From b8f6a3023be3d1f5f43a64b00dbcfec50d7f7126 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 5 Jul 2021 14:12:56 +0200 Subject: [PATCH 308/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.Cfg2HbmNoError.TestCase' Signed-off-by: Koen Aers --- .../tool/ant/Cfg2HbmNoError/TestCase.java | 50 +++++++++++++------ 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmNoError/TestCase.java b/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmNoError/TestCase.java index 538874672f..58e0b2bbd9 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmNoError/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmNoError/TestCase.java @@ -1,36 +1,56 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.Cfg2HbmNoError; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.JdbcUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -48,12 +68,12 @@ public void testCfg2HbmNoError() { project.setProperty("resourcesDir", resourcesDir.getAbsolutePath()); File hbmxml = new File(destinationDir, "VerySimpleTable.hbm.xml"); - Assert.assertFalse(hbmxml.exists()); + assertFalse(hbmxml.exists()); project.executeTarget("testCfg2HbmNoError"); - Assert.assertTrue(hbmxml.exists()); - Assert.assertTrue(FileUtil + assertTrue(hbmxml.exists()); + assertTrue(FileUtil .findFirstString("class", hbmxml) .contains("VerySimpleTable")); From 2dfe1744a6b984670c33f320fca688aa2469c7b4 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 5 Jul 2021 14:27:33 +0200 Subject: [PATCH 309/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.Cfg2HbmWithCustomReverseNamingStrategy.TestCase' Signed-off-by: Koen Aers --- .../Strategy.java | 19 +++++++ .../TestCase.java | 50 +++++++++++++------ 2 files changed, 54 insertions(+), 15 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithCustomReverseNamingStrategy/Strategy.java b/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithCustomReverseNamingStrategy/Strategy.java index 65210dc5dd..3e60a7c301 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithCustomReverseNamingStrategy/Strategy.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithCustomReverseNamingStrategy/Strategy.java @@ -1,3 +1,22 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.Cfg2HbmWithCustomReverseNamingStrategy; import org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy; diff --git a/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithCustomReverseNamingStrategy/TestCase.java b/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithCustomReverseNamingStrategy/TestCase.java index 64bb5901ae..a3996ed461 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithCustomReverseNamingStrategy/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithCustomReverseNamingStrategy/TestCase.java @@ -1,36 +1,56 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.Cfg2HbmWithCustomReverseNamingStrategy; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.JdbcUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -48,12 +68,12 @@ public void testCfg2HbmWithCustomReverseNamingStrategy() { project.setProperty("resourcesDir", resourcesDir.getAbsolutePath()); File hbmxml = new File(destinationDir, "foo/Bar.hbm.xml"); - Assert.assertFalse(hbmxml.exists()); + assertFalse(hbmxml.exists()); project.executeTarget("testCfg2HbmWithCustomReverseNamingStrategy"); - Assert.assertTrue(hbmxml.exists()); - Assert.assertTrue(FileUtil + assertTrue(hbmxml.exists()); + assertTrue(FileUtil .findFirstString("class", hbmxml) .contains("foo.Bar")); From e340bf9b7f2aee197645bc59585b3c3d732d5702 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 5 Jul 2021 14:42:33 +0200 Subject: [PATCH 310/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.Cfg2HbmWithInvalidReverseNamingStrategy.TestCase' Signed-off-by: Koen Aers --- .../TestCase.java | 48 +++++++++++++------ 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithInvalidReverseNamingStrategy/TestCase.java b/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithInvalidReverseNamingStrategy/TestCase.java index 40e84739a2..94ae1e8749 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithInvalidReverseNamingStrategy/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithInvalidReverseNamingStrategy/TestCase.java @@ -1,36 +1,56 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.Cfg2HbmWithInvalidReverseNamingStrategy; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + import java.io.File; import org.apache.tools.ant.BuildException; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.JdbcUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -50,11 +70,11 @@ public void testCfg2HbmWithInvalidReverseNamingStrategy() { try { project.executeTarget("testCfg2HbmWithInvalidReverseNamingStrategy"); - Assert.fail("A BuildException should happen!"); + fail("A BuildException should happen!"); } catch (BuildException e) { - Assert.assertTrue(e + assertTrue(e .getMessage() .contains("Could not create or find invalid.Strategy")); From f85998c471e30d9180da6cb5071f9598c6ac18e1 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 5 Jul 2021 15:15:32 +0200 Subject: [PATCH 311/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.Cfg2HbmWithPackageName.TestCase' Signed-off-by: Koen Aers --- .../ant/Cfg2HbmWithPackageName/TestCase.java | 50 +++++++++++++------ 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithPackageName/TestCase.java b/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithPackageName/TestCase.java index f70f6fa191..eaab0018dd 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithPackageName/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithPackageName/TestCase.java @@ -1,36 +1,56 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.Cfg2HbmWithPackageName; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.JdbcUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -48,12 +68,12 @@ public void testCfg2HbmWithPackageName() { project.setProperty("resourcesDir", resourcesDir.getAbsolutePath()); File hbmxml = new File(destinationDir, "foo/bar/VerySimpleTable.hbm.xml"); - Assert.assertFalse(hbmxml.exists()); + assertFalse(hbmxml.exists()); project.executeTarget("testCfg2HbmWithPackageName"); - Assert.assertTrue(hbmxml.exists()); - Assert.assertTrue(FileUtil + assertTrue(hbmxml.exists()); + assertTrue(FileUtil .findFirstString("class", hbmxml) .contains("foo.bar.VerySimpleTable")); From a65fc1d9491542876fe6b09ce8c87e75eacee0c3 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 5 Jul 2021 15:36:20 +0200 Subject: [PATCH 312/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.Cfg2HbmWithPackageNameAndReverseNamingStrategy.TestCase' Signed-off-by: Koen Aers --- .../Strategy.java | 19 ++++++++ .../TestCase.java | 45 +++++++++++++------ 2 files changed, 51 insertions(+), 13 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithPackageNameAndReverseNamingStrategy/Strategy.java b/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithPackageNameAndReverseNamingStrategy/Strategy.java index 8b0ec9f45e..fef4ea8386 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithPackageNameAndReverseNamingStrategy/Strategy.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithPackageNameAndReverseNamingStrategy/Strategy.java @@ -1,3 +1,22 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.Cfg2HbmWithPackageNameAndReverseNamingStrategy; import org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy; diff --git a/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithPackageNameAndReverseNamingStrategy/TestCase.java b/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithPackageNameAndReverseNamingStrategy/TestCase.java index 49ae729b08..4a561f39cf 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithPackageNameAndReverseNamingStrategy/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/Cfg2HbmWithPackageNameAndReverseNamingStrategy/TestCase.java @@ -1,35 +1,54 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.Cfg2HbmWithPackageNameAndReverseNamingStrategy; +import static org.junit.jupiter.api.Assertions.assertFalse; + import java.io.File; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.JdbcUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -47,7 +66,7 @@ public void testCfg2HbmWithPackageNameAndReverseNamingStrategy() { project.setProperty("resourcesDir", resourcesDir.getAbsolutePath()); File hbmxml = new File(destinationDir, "foo/Bar.hbm.xml"); - Assert.assertFalse(hbmxml.exists()); + assertFalse(hbmxml.exists()); project.executeTarget("testCfg2HbmWithPackageNameAndReverseNamingStrategy"); From defddc048108362d82f7611693ef9a59c41f76c9 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 5 Jul 2021 15:53:32 +0200 Subject: [PATCH 313/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.EJB3Configuration.TestCase' Signed-off-by: Koen Aers --- .../tool/ant/EJB3Configuration/TestCase.java | 51 +++++++++++++------ 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/ant/EJB3Configuration/TestCase.java b/test/common/src/main/java/org/hibernate/tool/ant/EJB3Configuration/TestCase.java index 2944b7b434..c315f68ee7 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/EJB3Configuration/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/EJB3Configuration/TestCase.java @@ -1,36 +1,57 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.EJB3Configuration; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.JdbcUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -48,12 +69,12 @@ public void testEJB3ConfigurationFailureExpected() { project.setProperty("resourcesDir", resourcesDir.getAbsolutePath()); File ejb3 = new File(destinationDir, "ejb3.sql"); - Assert.assertFalse(ejb3.exists()); + assertFalse(ejb3.exists()); project.executeTarget("testEJB3Configuration"); - Assert.assertTrue(ejb3.exists()); - Assert.assertNotNull(FileUtil.findFirstString("create", ejb3)); + assertTrue(ejb3.exists()); + assertNotNull(FileUtil.findFirstString("create", ejb3)); } From 934f6f5fa9253cf9dcc5475733bb2af02c1fe032 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 5 Jul 2021 16:38:41 +0200 Subject: [PATCH 314/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.GenericExport.TestCase' Signed-off-by: Koen Aers --- .../tool/ant/GenericExport/TestCase.java | 68 ++++++++++++------- 1 file changed, 44 insertions(+), 24 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/ant/GenericExport/TestCase.java b/test/common/src/main/java/org/hibernate/tool/ant/GenericExport/TestCase.java index 83b37c2f2a..b860a3685d 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/GenericExport/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/GenericExport/TestCase.java @@ -1,36 +1,56 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.GenericExport; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.JdbcUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -48,36 +68,36 @@ public void testGenericExport() { project.setProperty("resourcesDir", resourcesDir.getAbsolutePath()); File xTopDownJava = new File(destinationDir, "Xorg/hibernate/tool/hbm2x/ant/TopDown.java"); - Assert.assertFalse(xTopDownJava.exists()); + assertFalse(xTopDownJava.exists()); File topDownJava = new File(destinationDir, "org/hibernate/tool/hbm2x/ant/TopDown.java"); - Assert.assertFalse(topDownJava.exists()); + assertFalse(topDownJava.exists()); File topDownQuote = new File(destinationDir, "org/hibernate/tool/hbm2x/ant/TopDown.quote"); - Assert.assertFalse(topDownQuote.exists()); + assertFalse(topDownQuote.exists()); File topDownPojo = new File(destinationDir, "org/hibernate/tool/hbm2x/ant/TopDown.pojo"); - Assert.assertFalse(topDownPojo.exists()); + assertFalse(topDownPojo.exists()); project.executeTarget("testGenericExport"); - Assert.assertTrue(xTopDownJava.exists()); - Assert.assertTrue(FileUtil + assertTrue(xTopDownJava.exists()); + assertTrue(FileUtil .findFirstString("TopDown", xTopDownJava) .contains("TopDown generated by hbm2java")); - Assert.assertTrue(topDownJava.exists()); - Assert.assertTrue(FileUtil + assertTrue(topDownJava.exists()); + assertTrue(FileUtil .findFirstString("TopDown", topDownJava) .contains("TopDown generated by hbm2java")); - Assert.assertTrue(topDownQuote.exists()); - Assert.assertTrue(FileUtil + assertTrue(topDownQuote.exists()); + assertTrue(FileUtil .findFirstString("TopDown", topDownQuote) .contains("pojo=TopDown")); - Assert.assertTrue(topDownPojo.exists()); - Assert.assertTrue(FileUtil + assertTrue(topDownPojo.exists()); + assertTrue(FileUtil .findFirstString("TopDown", topDownPojo) .contains("TopDown generated by hbm2java")); From 9b47d20e5c290916bdf9be71f725e545f3fe486d Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 5 Jul 2021 17:11:31 +0200 Subject: [PATCH 315/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.Hbm2JavaConfiguration.TestCase' Signed-off-by: Koen Aers --- .../ant/Hbm2JavaConfiguration/TestCase.java | 53 +++++++++++++------ 1 file changed, 37 insertions(+), 16 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/ant/Hbm2JavaConfiguration/TestCase.java b/test/common/src/main/java/org/hibernate/tool/ant/Hbm2JavaConfiguration/TestCase.java index 5782a6f696..f1875d6276 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/Hbm2JavaConfiguration/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/Hbm2JavaConfiguration/TestCase.java @@ -1,36 +1,57 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.Hbm2JavaConfiguration; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.JdbcUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -48,15 +69,15 @@ public void testHbm2JavaConfiguration() { project.setProperty("resourcesDir", resourcesDir.getAbsolutePath()); File someClass = new File(destinationDir, "SomeClass.java"); - Assert.assertFalse(someClass.exists()); + assertFalse(someClass.exists()); project.executeTarget("testHbm2JavaConfiguration"); - Assert.assertTrue(someClass.exists()); - Assert.assertTrue(FileUtil + assertTrue(someClass.exists()); + assertTrue(FileUtil .findFirstString("SomeClass", someClass) .contains("SomeClass generated by hbm2java")); - Assert.assertNull(FileUtil.findFirstString("@Entity", someClass)); + assertNull(FileUtil.findFirstString("@Entity", someClass)); } From 1221e2d709b384897582db57d54309c7c7c221ec Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 5 Jul 2021 20:37:49 +0200 Subject: [PATCH 316/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.Hbm2JavaEJB3Configuration.TestCase' Signed-off-by: Koen Aers --- .../Hbm2JavaEJB3Configuration/TestCase.java | 53 +++++++++++++------ 1 file changed, 37 insertions(+), 16 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/ant/Hbm2JavaEJB3Configuration/TestCase.java b/test/common/src/main/java/org/hibernate/tool/ant/Hbm2JavaEJB3Configuration/TestCase.java index 26aab4c1b5..f82798fa86 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/Hbm2JavaEJB3Configuration/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/Hbm2JavaEJB3Configuration/TestCase.java @@ -1,36 +1,57 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.Hbm2JavaEJB3Configuration; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.JdbcUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -48,15 +69,15 @@ public void testHbm2JavaConfiguration() { project.setProperty("resourcesDir", resourcesDir.getAbsolutePath()); File someClass = new File(destinationDir, "SomeClass.java"); - Assert.assertFalse(someClass.exists()); + assertFalse(someClass.exists()); project.executeTarget("testHbm2JavaEJB3Configuration"); - Assert.assertTrue(someClass.exists()); - Assert.assertTrue(FileUtil + assertTrue(someClass.exists()); + assertTrue(FileUtil .findFirstString("SomeClass", someClass) .contains("SomeClass generated by hbm2java")); - Assert.assertNotNull(FileUtil.findFirstString("@Entity", someClass)); + assertNotNull(FileUtil.findFirstString("@Entity", someClass)); } From 5d3e08a8fcd21b65741667832eeb772abcf65655 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 5 Jul 2021 20:52:17 +0200 Subject: [PATCH 317/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.HbmLint.TestCase' Signed-off-by: Koen Aers --- .../hibernate/tool/ant/HbmLint/TestCase.java | 62 ++++++++++++------- 1 file changed, 41 insertions(+), 21 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/ant/HbmLint/TestCase.java b/test/common/src/main/java/org/hibernate/tool/ant/HbmLint/TestCase.java index d9479d51a6..68548877e8 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/HbmLint/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/HbmLint/TestCase.java @@ -1,36 +1,56 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.HbmLint; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.JdbcUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -48,37 +68,37 @@ public void testHbmLint() { project.setProperty("resourcesDir", resourcesDir.getAbsolutePath()); File hbmLintResult = new File(destinationDir, "hbmlint-result.txt"); - Assert.assertFalse(hbmLintResult.exists()); + assertFalse(hbmLintResult.exists()); project.executeTarget("testHbmLint"); - Assert.assertTrue(hbmLintResult.exists()); + assertTrue(hbmLintResult.exists()); - Assert.assertTrue(FileUtil + assertTrue(FileUtil .findFirstString("BadType", hbmLintResult) .contains("SCHEMA_TABLE_MISSING")); - Assert.assertTrue(FileUtil + assertTrue(FileUtil .findFirstString("Category", hbmLintResult) .contains("SCHEMA_TABLE_MISSING")); - Assert.assertTrue(FileUtil + assertTrue(FileUtil .findFirstString("Column", hbmLintResult) .contains("SCHEMA_TABLE_MISSING")); - Assert.assertTrue(FileUtil + assertTrue(FileUtil .findFirstString("does_not_exist", hbmLintResult) .contains("SCHEMA_TABLE_MISSING")); - Assert.assertTrue(FileUtil + assertTrue(FileUtil .findFirstString("hilo_table", hbmLintResult) .contains("SCHEMA_TABLE_MISSING")); - Assert.assertTrue(FileUtil + assertTrue(FileUtil .findFirstString("MissingTable", hbmLintResult) .contains("SCHEMA_TABLE_MISSING")); - Assert.assertTrue(FileUtil + assertTrue(FileUtil .findFirstString("MISSING_ID_GENERATOR", hbmLintResult) .contains("does_not_exist")); From 29d92793b7901fe166428a3b58bb112efa0f3940 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 5 Jul 2021 22:09:34 +0200 Subject: [PATCH 318/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.JDBCConfiguration.TestCase' Signed-off-by: Koen Aers --- .../tool/ant/JDBCConfiguration/TestCase.java | 64 ++++++++++++------- 1 file changed, 42 insertions(+), 22 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/ant/JDBCConfiguration/TestCase.java b/test/common/src/main/java/org/hibernate/tool/ant/JDBCConfiguration/TestCase.java index 339aeba7e4..237cc35e73 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/JDBCConfiguration/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/JDBCConfiguration/TestCase.java @@ -1,36 +1,56 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.JDBCConfiguration; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.JdbcUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -56,27 +76,27 @@ public void testJDBCConfiguration() { File withTemplate = new File(destinationDir, "with-template/BottomUp.java"); File cfgxml = new File(destinationDir, "cfgxml/hibernate.cfg.xml"); - Assert.assertFalse(noTemplate.exists()); - Assert.assertFalse(withTemplate.exists()); - Assert.assertFalse(cfgxml.exists()); + assertFalse(noTemplate.exists()); + assertFalse(withTemplate.exists()); + assertFalse(cfgxml.exists()); project.executeTarget("testJDBCConfiguration"); String log = AntUtil.getLog(project); - Assert.assertTrue(log, !log.contains("Exception")); + assertTrue(!log.contains("Exception"), log); - Assert.assertTrue(noTemplate.exists()); - Assert.assertTrue(FileUtil + assertTrue(noTemplate.exists()); + assertTrue(FileUtil .findFirstString("public", noTemplate) .contains("BottomUp")); - Assert.assertTrue(withTemplate.exists()); - Assert.assertTrue(FileUtil + assertTrue(withTemplate.exists()); + assertTrue(FileUtil .findFirstString("template", withTemplate) .contains("/** Made by a template in your neighborhood */")); - Assert.assertTrue(cfgxml.exists()); - Assert.assertTrue(FileUtil + assertTrue(cfgxml.exists()); + assertTrue(FileUtil .findFirstString("mapping", cfgxml) .contains("BottomUp.hbm.xml")); From 59a8d10c7eef6e533300507522284c6875c68c6d Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 5 Jul 2021 22:28:31 +0200 Subject: [PATCH 319/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.JDBCConfigWithRevEngXml.TestCase' Signed-off-by: Koen Aers --- .../ant/JDBCConfigWithRevEngXml/TestCase.java | 54 +++++++++++++------ 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/ant/JDBCConfigWithRevEngXml/TestCase.java b/test/common/src/main/java/org/hibernate/tool/ant/JDBCConfigWithRevEngXml/TestCase.java index 8cdba6814d..3eb3f71ed0 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/JDBCConfigWithRevEngXml/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/JDBCConfigWithRevEngXml/TestCase.java @@ -1,36 +1,56 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.JDBCConfigWithRevEngXml; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.JdbcUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -48,18 +68,18 @@ public void testJDBCConfigWithRevEngXml() { project.setProperty("resourcesDir", resourcesDir.getAbsolutePath()); File bottomUp = new File(destinationDir, "foo/BottomUp.java"); - Assert.assertFalse(bottomUp.exists()); + assertFalse(bottomUp.exists()); project.executeTarget("testJDBCConfigWithRevEngXml"); String log = AntUtil.getLog(project); - Assert.assertTrue(log, !log.contains("Exception")); + assertTrue(!log.contains("Exception"), log); - Assert.assertTrue(bottomUp.exists()); - Assert.assertTrue(FileUtil + assertTrue(bottomUp.exists()); + assertTrue(FileUtil .findFirstString("good", bottomUp) .contains("Boolean")); - Assert.assertTrue(FileUtil + assertTrue(FileUtil .findFirstString("something", bottomUp) .contains("SomeUserType")); From 9e8ec803a9511d22482b4921efcf09020986fb5d Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 5 Jul 2021 22:45:39 +0200 Subject: [PATCH 320/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.JPABogusPUnit.TestCase' Signed-off-by: Koen Aers --- .../tool/ant/JPABogusPUnit/TestCase.java | 53 +++++++++++++------ 1 file changed, 37 insertions(+), 16 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/ant/JPABogusPUnit/TestCase.java b/test/common/src/main/java/org/hibernate/tool/ant/JPABogusPUnit/TestCase.java index 88308fdcce..325f68e068 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/JPABogusPUnit/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/JPABogusPUnit/TestCase.java @@ -1,36 +1,57 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.JPABogusPUnit; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + import java.io.File; import org.apache.tools.ant.BuildException; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.JdbcUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -48,17 +69,17 @@ public void testJPABogusPUnit() { project.setProperty("resourcesDir", resourcesDir.getAbsolutePath()); File ejb3 = new File(destinationDir, "ejb3.sql"); - Assert.assertFalse(ejb3.exists()); + assertFalse(ejb3.exists()); try { project.executeTarget("testJPABogusPUnit"); - Assert.fail("The Bogus unit was accepted"); + fail("The Bogus unit was accepted"); } catch (BuildException e) { String log = AntUtil.getLog(project); - Assert.assertTrue(log, log.contains("Persistence unit not found: 'shouldnotbethere'")); + assertTrue(log.contains("Persistence unit not found: 'shouldnotbethere'"), log); } - Assert.assertFalse(ejb3.exists()); + assertFalse(ejb3.exists()); } From a160ed112eac5eed7aced5caa9b21fea79a13300 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 5 Jul 2021 23:02:43 +0200 Subject: [PATCH 321/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.JPAPropertyOverridesPUnit.TestCase' Signed-off-by: Koen Aers --- .../JPAPropertyOverridesPUnit/TestCase.java | 53 +++++++++++++------ 1 file changed, 37 insertions(+), 16 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/ant/JPAPropertyOverridesPUnit/TestCase.java b/test/common/src/main/java/org/hibernate/tool/ant/JPAPropertyOverridesPUnit/TestCase.java index 6053a3466b..c12d81b2ae 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/JPAPropertyOverridesPUnit/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/JPAPropertyOverridesPUnit/TestCase.java @@ -1,36 +1,57 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.JPAPropertyOverridesPUnit; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + import java.io.File; import org.apache.tools.ant.BuildException; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.JdbcUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -48,17 +69,17 @@ public void testJPAPUnit() { project.setProperty("resourcesDir", resourcesDir.getAbsolutePath()); File ejb3 = new File(destinationDir, "ejb3.sql"); - Assert.assertFalse(ejb3.exists()); + assertFalse(ejb3.exists()); try { project.executeTarget("testJPAPropertyOverridesPUnit"); - Assert.fail("property overrides not accepted"); + fail("property overrides not accepted"); } catch (BuildException e) { // should happen - Assert.assertTrue(e.getMessage().contains("FAKEDialect")); + assertTrue(e.getMessage().contains("FAKEDialect")); } - Assert.assertFalse(ejb3.exists()); + assertFalse(ejb3.exists()); } From 48e9ba071d9cbbc3e76146557bf91a9f0b903e1b Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 5 Jul 2021 23:25:43 +0200 Subject: [PATCH 322/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.JPAPUnit.TestCase' Signed-off-by: Koen Aers --- .../hibernate/tool/ant/JPAPUnit/TestCase.java | 51 +++++++++++++------ 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/ant/JPAPUnit/TestCase.java b/test/common/src/main/java/org/hibernate/tool/ant/JPAPUnit/TestCase.java index eab81f2871..0efbf88c22 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/JPAPUnit/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/JPAPUnit/TestCase.java @@ -1,36 +1,57 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.JPAPUnit; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.JdbcUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -48,12 +69,12 @@ public void testJPAPUnit() { project.setProperty("resourcesDir", resourcesDir.getAbsolutePath()); File ejb3 = new File(destinationDir, "ejb3.sql"); - Assert.assertFalse(ejb3.exists()); + assertFalse(ejb3.exists()); project.executeTarget("testJPAPUnit"); - Assert.assertTrue(ejb3.exists()); - Assert.assertNotNull(FileUtil.findFirstString("create", ejb3)); + assertTrue(ejb3.exists()); + assertNotNull(FileUtil.findFirstString("create", ejb3)); } From c1e3b1e3b456791bdf3f33c191a565c1a5953d81 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 6 Jul 2021 02:15:32 +0200 Subject: [PATCH 323/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.Properties.TestCase' Signed-off-by: Koen Aers --- .../tool/ant/Properties/TestCase.java | 62 ++++++++++++------- 1 file changed, 41 insertions(+), 21 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/ant/Properties/TestCase.java b/test/common/src/main/java/org/hibernate/tool/ant/Properties/TestCase.java index 90a0aa38aa..d737b0557c 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/Properties/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/Properties/TestCase.java @@ -1,36 +1,56 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.Properties; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.JdbcUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -53,31 +73,31 @@ public void testProperties() { project.setProperty("resourcesDir", resourcesDir.getAbsolutePath()); File file = new File(destinationDir, "SomeClass.java"); - Assert.assertFalse(file.exists()); + assertFalse(file.exists()); project.executeTarget("testProperties"); String log = AntUtil.getLog(project); - Assert.assertTrue(log, !log.contains("Exception")); + assertTrue(!log.contains("Exception"), log); - Assert.assertTrue(file.exists()); + assertTrue(file.exists()); - Assert.assertTrue(FileUtil + assertTrue(FileUtil .findFirstString("hbm2java.weirdAl", file) .contains("foo3")); - Assert.assertTrue(FileUtil + assertTrue(FileUtil .findFirstString("ant.project.name", file) .contains("PropertiesTest")); - Assert.assertTrue(FileUtil + assertTrue(FileUtil .findFirstString("foo.weirdAl", file) .contains("does not exist")); - Assert.assertTrue(FileUtil + assertTrue(FileUtil .findFirstString("bar", file) .contains("foo2")); - Assert.assertTrue(FileUtil + assertTrue(FileUtil .findFirstString("file", file) .contains("some.file")); - Assert.assertTrue(FileUtil + assertTrue(FileUtil .findFirstString("value", file) .contains("some value")); From 4a0ad9b513b44fb5ccf162b388ba26e16c417003 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 6 Jul 2021 02:30:40 +0200 Subject: [PATCH 324/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.Query.TestCase' Signed-off-by: Koen Aers --- .../tool/ant/Query/ObjectResult.java | 19 ++++++ .../tool/ant/Query/SerializableResult.java | 19 ++++++ .../hibernate/tool/ant/Query/TestCase.java | 62 +++++++++++++------ 3 files changed, 80 insertions(+), 20 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/ant/Query/ObjectResult.java b/test/common/src/main/java/org/hibernate/tool/ant/Query/ObjectResult.java index b0e04ed065..08bdf143fd 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/Query/ObjectResult.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/Query/ObjectResult.java @@ -1,3 +1,22 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.Query; public class ObjectResult { diff --git a/test/common/src/main/java/org/hibernate/tool/ant/Query/SerializableResult.java b/test/common/src/main/java/org/hibernate/tool/ant/Query/SerializableResult.java index 171e7b2fab..e5c1b2a15f 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/Query/SerializableResult.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/Query/SerializableResult.java @@ -1,3 +1,22 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.Query; import java.io.Serializable; diff --git a/test/common/src/main/java/org/hibernate/tool/ant/Query/TestCase.java b/test/common/src/main/java/org/hibernate/tool/ant/Query/TestCase.java index bf09e3e9d1..527d0548da 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/Query/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/Query/TestCase.java @@ -1,36 +1,58 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.Query; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.JdbcUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -48,25 +70,25 @@ public void testQuery() { project.setProperty("resourcesDir", resourcesDir.getAbsolutePath()); File hqlQuery = new File(destinationDir, "hqlQuery.txt"); - Assert.assertFalse(hqlQuery.exists()); + assertFalse(hqlQuery.exists()); File textQuery = new File(destinationDir, "textQuery.txt"); - Assert.assertFalse(textQuery.exists()); + assertFalse(textQuery.exists()); project.executeTarget("testQuery"); - Assert.assertTrue(hqlQuery.exists()); - Assert.assertTrue(FileUtil + assertTrue(hqlQuery.exists()); + assertTrue(FileUtil .findFirstString("First", hqlQuery) .contains("SerializableResult(id:First,length:1023)")); - Assert.assertTrue(FileUtil + assertTrue(FileUtil .findFirstString("Third", hqlQuery) .contains("ObjectResult(id:Third,length:4095)")); - Assert.assertTrue(textQuery.exists()); - Assert.assertTrue(FileUtil + assertTrue(textQuery.exists()); + assertTrue(FileUtil .findFirstString("First", textQuery) .contains("SerializableResult(id:First,length:1023)")); - Assert.assertNull(FileUtil.findFirstString("Third", textQuery)); + assertNull(FileUtil.findFirstString("Third", textQuery)); } From d12e1c7af38b544460443206b671a489effe6ce2 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 6 Jul 2021 16:03:51 +0200 Subject: [PATCH 325/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.SchemaExportWarning.TestCase' Signed-off-by: Koen Aers --- .../ant/SchemaExportWarning/TestCase.java | 52 +++++++++++++------ 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/ant/SchemaExportWarning/TestCase.java b/test/common/src/main/java/org/hibernate/tool/ant/SchemaExportWarning/TestCase.java index a3abfd42e8..caa54354f0 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/SchemaExportWarning/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/SchemaExportWarning/TestCase.java @@ -1,36 +1,56 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.SchemaExportWarning; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.JdbcUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -47,17 +67,17 @@ public void testSchemaExport() { project.setProperty("resourcesDir", resourcesDir.getAbsolutePath()); File schemaExport = new File(destinationDir, "schemaexport.sql"); - Assert.assertFalse(schemaExport.exists()); + assertFalse(schemaExport.exists()); project.executeTarget("testSchemaExportWarning"); - Assert.assertTrue(schemaExport.exists()); - Assert.assertTrue(FileUtil + assertTrue(schemaExport.exists()); + assertTrue(FileUtil .findFirstString("drop", schemaExport) .contains("TopDown")); String log = AntUtil.getLog(project); - Assert.assertFalse(log.contains("Exception")); + assertFalse(log.contains("Exception")); } From f55caee765f4bc01641764f351b72eb488c8ec46 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 6 Jul 2021 16:30:39 +0200 Subject: [PATCH 326/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.ant.SchemaUpdateWarning.TestCase' Signed-off-by: Koen Aers --- .../ant/SchemaUpdateWarning/TestCase.java | 56 +++++++++++++------ 1 file changed, 38 insertions(+), 18 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/ant/SchemaUpdateWarning/TestCase.java b/test/common/src/main/java/org/hibernate/tool/ant/SchemaUpdateWarning/TestCase.java index f2e1c021ac..e88bac6cbe 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/SchemaUpdateWarning/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/SchemaUpdateWarning/TestCase.java @@ -1,36 +1,56 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.ant.SchemaUpdateWarning; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import org.hibernate.tools.test.util.AntUtil; import org.hibernate.tools.test.util.FileUtil; import org.hibernate.tools.test.util.JdbcUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("output"); private File destinationDir = null; private File resourcesDir = null; - @Before + @BeforeEach public void setUp() { - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(outputFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(outputFolder, "resources"); resourcesDir.mkdir(); JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -47,19 +67,19 @@ public void testSchemaUpdateWarning() { project.setProperty("resourcesDir", resourcesDir.getAbsolutePath()); File schemaUpdate = new File(destinationDir, "schemaupdate.sql"); - Assert.assertFalse(schemaUpdate.exists()); + assertFalse(schemaUpdate.exists()); project.executeTarget("testSchemaUpdateWarning"); - Assert.assertTrue(schemaUpdate.exists()); - Assert.assertTrue(FileUtil + assertTrue(schemaUpdate.exists()); + assertTrue(FileUtil .findFirstString("create", schemaUpdate) .contains("TopDown")); String log = AntUtil.getLog(project); - Assert.assertFalse(log.contains("Exception")); - Assert.assertTrue(log.contains("Hibernate Core SchemaUpdate")); - Assert.assertTrue(log.contains("tools.hibernate.org")); + assertFalse(log.contains("Exception")); + assertTrue(log.contains("Hibernate Core SchemaUpdate")); + assertTrue(log.contains("tools.hibernate.org")); } From 55db7051da9be71a8c3df19f5baa65867079d5f5 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 6 Jul 2021 17:04:24 +0200 Subject: [PATCH 327/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.cfg.DriverMetaData.TestCase' Signed-off-by: Koen Aers --- .../tool/cfg/DriverMetaData/TestCase.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/cfg/DriverMetaData/TestCase.java b/test/common/src/main/java/org/hibernate/tool/cfg/DriverMetaData/TestCase.java index 648c276d26..32715ccc47 100644 --- a/test/common/src/main/java/org/hibernate/tool/cfg/DriverMetaData/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/cfg/DriverMetaData/TestCase.java @@ -4,6 +4,9 @@ */ package org.hibernate.tool.cfg.DriverMetaData; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.util.Iterator; import java.util.Map; import java.util.Properties; @@ -21,10 +24,9 @@ import org.hibernate.service.ServiceRegistry; import org.hibernate.tools.test.util.JUnitUtil; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; /** * @author max @@ -35,7 +37,7 @@ public class TestCase { private Properties properties = null; private ServiceRegistry serviceRegistry; - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); properties = Environment.getProperties(); @@ -43,7 +45,7 @@ public void setUp() { serviceRegistry = ssrb.build(); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -86,10 +88,10 @@ public void testExportedKeys() { exportedKeys.next(); cnt++; } - Assert.assertEquals(1,cnt); + assertEquals(1,cnt); } } - Assert.assertTrue(foundMaster); + assertTrue(foundMaster); } @Test From cd33e4a7a6e03b786c2d9a234e013a1b189b18a8 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 6 Jul 2021 17:20:34 +0200 Subject: [PATCH 328/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.cfg.JDBCMetaDataConfiguration.TestCase' Signed-off-by: Koen Aers --- .../JDBCMetaDataConfiguration/TestCase.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/cfg/JDBCMetaDataConfiguration/TestCase.java b/test/common/src/main/java/org/hibernate/tool/cfg/JDBCMetaDataConfiguration/TestCase.java index 403d490328..623b182a7d 100644 --- a/test/common/src/main/java/org/hibernate/tool/cfg/JDBCMetaDataConfiguration/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/cfg/JDBCMetaDataConfiguration/TestCase.java @@ -1,13 +1,14 @@ package org.hibernate.tool.cfg.JDBCMetaDataConfiguration; +import static org.junit.jupiter.api.Assertions.assertNotNull; + import org.hibernate.boot.Metadata; import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; /** * @author max @@ -15,12 +16,12 @@ */ public class TestCase { - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -30,15 +31,15 @@ public void testReadFromJDBC() throws Exception { Metadata metadata = MetadataDescriptorFactory .createJdbcDescriptor(null, null, true) .createMetadata(); - Assert.assertNotNull("WithRealTimestamp", metadata.getEntityBinding("WithRealTimestamp")); - Assert.assertNotNull("NoVersion", metadata.getEntityBinding("NoVersion")); - Assert.assertNotNull("WithFakeTimestamp", metadata.getEntityBinding("WithFakeTimestamp")); - Assert.assertNotNull("WithVersion", metadata.getEntityBinding("WithVersion")); + assertNotNull(metadata.getEntityBinding("WithRealTimestamp"), "WithRealTimestamp"); + assertNotNull(metadata.getEntityBinding("NoVersion"), "NoVersion"); + assertNotNull(metadata.getEntityBinding("WithFakeTimestamp"), "WithFakeTimestamp"); + assertNotNull(metadata.getEntityBinding("WithVersion"), "WithVersion"); } @Test public void testGetTable() throws Exception { - Assert.assertNotNull( + assertNotNull( HibernateUtil.getTable( MetadataDescriptorFactory .createJdbcDescriptor(null, null, true) From 2899cd8a2a3094735075efff0e071012e71000e3 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 6 Jul 2021 17:38:07 +0200 Subject: [PATCH 329/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.CachedMetaData.TestCase' Signed-off-by: Koen Aers --- .../JDBCMetaDataConfiguration/TestCase.java | 19 ++++++++ .../tool/hbm2x/CachedMetaData/TestCase.java | 46 +++++++++++++------ 2 files changed, 50 insertions(+), 15 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/cfg/JDBCMetaDataConfiguration/TestCase.java b/test/common/src/main/java/org/hibernate/tool/cfg/JDBCMetaDataConfiguration/TestCase.java index 623b182a7d..cd6bd1d892 100644 --- a/test/common/src/main/java/org/hibernate/tool/cfg/JDBCMetaDataConfiguration/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/cfg/JDBCMetaDataConfiguration/TestCase.java @@ -1,3 +1,22 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.cfg.JDBCMetaDataConfiguration; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/test/common/src/main/java/org/hibernate/tool/hbm2x/CachedMetaData/TestCase.java b/test/common/src/main/java/org/hibernate/tool/hbm2x/CachedMetaData/TestCase.java index 1e67ca4f62..effef1004f 100644 --- a/test/common/src/main/java/org/hibernate/tool/hbm2x/CachedMetaData/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/hbm2x/CachedMetaData/TestCase.java @@ -1,9 +1,28 @@ /* - * Created on 2004-12-01 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.hbm2x.CachedMetaData; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.fail; + import java.util.Iterator; import java.util.Map; import java.util.Properties; @@ -25,12 +44,9 @@ import org.hibernate.service.ServiceRegistry; import org.hibernate.tools.test.util.JUnitUtil; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - - +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; /** * @author max @@ -121,12 +137,12 @@ public Iterator> getSuggestedPrimaryKeyStrategyName(String c } - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -178,15 +194,15 @@ private void validate(DatabaseCollector dc) { child = table; master = iterator.next(); } else { - Assert.fail("Only tables named 'MASTER' and 'CHILD' should exist"); + fail("Only tables named 'MASTER' and 'CHILD' should exist"); } - Assert.assertNotNull(child); - Assert.assertNotNull(master); + assertNotNull(child); + assertNotNull(master); iterator = dc.iterateTables(); - Assert.assertNotNull(iterator.next()); - Assert.assertNotNull(iterator.next()); - Assert.assertFalse(iterator.hasNext()); + assertNotNull(iterator.next()); + assertNotNull(iterator.next()); + assertFalse(iterator.hasNext()); JUnitUtil.assertIteratorContainsExactly( "should have recorded one foreignkey to child table", From 5d4313472e097e21528cc44bb2bbbdee92dd6b5c Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 6 Jul 2021 17:56:51 +0200 Subject: [PATCH 330/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.DefaultDatabaseCollector.TestCase' Signed-off-by: Koen Aers --- .../DefaultDatabaseCollector/TestCase.java | 65 +++++++++++-------- 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/TestCase.java b/test/common/src/main/java/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/TestCase.java index 64bbf918f0..b227e1858b 100644 --- a/test/common/src/main/java/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/TestCase.java @@ -1,15 +1,29 @@ -/******************************************************************************* - * Copyright (c) 2010 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * - * Contributor: - * Red Hat, Inc. - initial API and implementation - ******************************************************************************/ + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.hbm2x.DefaultDatabaseCollector; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -35,10 +49,9 @@ import org.hibernate.service.ServiceRegistry; import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; /** * @author Dmitry Geraskov @@ -46,12 +59,12 @@ */ public class TestCase { - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -64,7 +77,7 @@ public void testReadOnlySpecificSchema() { List

tables = getTables(MetadataDescriptorFactory .createJdbcDescriptor(res, null, true) .createMetadata()); - Assert.assertEquals(2,tables.size()); + assertEquals(2,tables.size()); Table catchild = (Table) tables.get(0); Table catmaster = (Table) tables.get(1); if(catchild.getName().equals("cat.master")) { @@ -73,8 +86,8 @@ public void testReadOnlySpecificSchema() { } TableIdentifier masterid = TableIdentifier.create(catmaster); TableIdentifier childid = TableIdentifier.create(catchild); - Assert.assertEquals(new TableIdentifier(null, "cat.cat", "cat.child"), childid); - Assert.assertEquals(new TableIdentifier(null, "cat.cat", "cat.master"), masterid); + assertEquals(new TableIdentifier(null, "cat.cat", "cat.child"), childid); + assertEquals(new TableIdentifier(null, "cat.cat", "cat.master"), masterid); } @Test @@ -84,9 +97,9 @@ public void testNeedQuote() { ssrb.applySettings(properties); ServiceRegistry serviceRegistry = ssrb.build(); MetaDataDialect realMetaData = MetaDataDialectFactory.createMetaDataDialect( serviceRegistry.getService(JdbcServices.class).getDialect(), properties ); - Assert.assertTrue("The name must be quoted!", realMetaData.needQuote("cat.cat")); - Assert.assertTrue("The name must be quoted!", realMetaData.needQuote("cat.child")); - Assert.assertTrue("The name must be quoted!", realMetaData.needQuote("cat.master")); + assertTrue(realMetaData.needQuote("cat.cat"), "The name must be quoted!"); + assertTrue(realMetaData.needQuote("cat.child"), "The name must be quoted!"); + assertTrue(realMetaData.needQuote("cat.master"), "The name must be quoted!"); } /** @@ -111,11 +124,11 @@ properties, new DefaultReverseEngineeringStrategy(), DatabaseCollector dc = new DefaultDatabaseCollector(reader.getMetaDataDialect()); reader.readDatabaseSchema( dc, null, "cat.cat" ); String defaultCatalog = properties.getProperty(AvailableSettings.DEFAULT_CATALOG); - Assert.assertNotNull("The table should be found", dc.getTable("cat.cat", defaultCatalog, "cat.child")); - Assert.assertNotNull("The table should be found", dc.getTable("cat.cat", defaultCatalog, "cat.master")); - Assert.assertNull("Quoted names should not return the table", dc.getTable(quote("cat.cat"), defaultCatalog, quote("cat.child"))); - Assert.assertNull("Quoted names should not return the table", dc.getTable(quote("cat.cat"), defaultCatalog, quote("cat.master"))); - Assert.assertEquals("Foreign key 'masterref' was filtered!", 1, dc.getOneToManyCandidates().size()); + assertNotNull(dc.getTable("cat.cat", defaultCatalog, "cat.child"), "The table should be found"); + assertNotNull(dc.getTable("cat.cat", defaultCatalog, "cat.master"), "The table should be found"); + assertNull(dc.getTable(quote("cat.cat"), defaultCatalog, quote("cat.child")), "Quoted names should not return the table"); + assertNull(dc.getTable(quote("cat.cat"), defaultCatalog, quote("cat.master")), "Quoted names should not return the table"); + assertEquals(1, dc.getOneToManyCandidates().size(), "Foreign key 'masterref' was filtered!"); } private static String quote(String name) { From 62d2f13a74eab205a0fe3f29eba128380d830074 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 6 Jul 2021 18:11:39 +0200 Subject: [PATCH 331/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.DefaultSchemaCatalog.TestCase' Signed-off-by: Koen Aers --- .../hbm2x/DefaultSchemaCatalog/TestCase.java | 49 ++++++++++++------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/TestCase.java b/test/common/src/main/java/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/TestCase.java index d7a019d80c..0c351227d8 100644 --- a/test/common/src/main/java/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/TestCase.java @@ -1,9 +1,27 @@ /* - * Created on 2004-12-01 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.hbm2x.DefaultSchemaCatalog; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; + import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; @@ -21,12 +39,9 @@ import org.hibernate.mapping.Table; import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - - +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; /** * @author max @@ -34,12 +49,12 @@ */ public class TestCase { - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -52,7 +67,7 @@ public void testReadOnlySpecificSchema() { List
tables = getTables(MetadataDescriptorFactory .createJdbcDescriptor(res, null, true) .createMetadata()); - Assert.assertEquals(2,tables.size()); + assertEquals(2,tables.size()); Table catchild = (Table) tables.get(0); Table catmaster = (Table) tables.get(1); if(catchild.getName().equals("CATMASTER")) { @@ -61,8 +76,8 @@ public void testReadOnlySpecificSchema() { } TableIdentifier masterid = TableIdentifier.create(catmaster); TableIdentifier childid = TableIdentifier.create(catchild); - Assert.assertEquals(new TableIdentifier(null, "OVRTEST", "CATMASTER"), masterid); - Assert.assertEquals(new TableIdentifier(null, "OVRTEST", "CATCHILD"), childid); + assertEquals(new TableIdentifier(null, "OVRTEST", "CATMASTER"), masterid); + assertEquals(new TableIdentifier(null, "OVRTEST", "CATCHILD"), childid); } @Test @@ -82,9 +97,9 @@ public void testOverlapping() { Table element = iter.next(); boolean added = tables.add(TableIdentifier.create(element)); if(!added) - Assert.fail("duplicate table found for " + element); + fail("duplicate table found for " + element); } - Assert.assertEquals(4,tables.size()); + assertEquals(4,tables.size()); } @Test @@ -95,7 +110,7 @@ public void testUseDefault() { List
tables = getTables(MetadataDescriptorFactory .createJdbcDescriptor(null, properties, true) .createMetadata()); - Assert.assertEquals(2,tables.size()); + assertEquals(2,tables.size()); Table catchild = (Table) tables.get(0); Table catmaster = (Table) tables.get(1); if(catchild.getName().equals("CATMASTER")) { @@ -104,8 +119,8 @@ public void testUseDefault() { } TableIdentifier masterid = TableIdentifier.create(catmaster); TableIdentifier childid = TableIdentifier.create(catchild); - Assert.assertEquals("jdbcreader has not nulled out according to default schema", new TableIdentifier(null, null, "CATMASTER"), masterid); - Assert.assertEquals("jdbcreader has not nulled out according to default schema", new TableIdentifier(null, null, "CATCHILD"), childid); + assertEquals(new TableIdentifier(null, null, "CATMASTER"), masterid, "jdbcreader has not nulled out according to default schema"); + assertEquals(new TableIdentifier(null, null, "CATCHILD"), childid, "jdbcreader has not nulled out according to default schema"); } private List
getTables(Metadata metadata) { From 80143437ce06260dd4798260df31441fce1f94d0 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 6 Jul 2021 18:37:44 +0200 Subject: [PATCH 332/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.GenerateFromJDBC.TestCase' Signed-off-by: Koen Aers --- .../tool/hbm2x/GenerateFromJDBC/TestCase.java | 62 ++++++++++++------- 1 file changed, 39 insertions(+), 23 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/hbm2x/GenerateFromJDBC/TestCase.java b/test/common/src/main/java/org/hibernate/tool/hbm2x/GenerateFromJDBC/TestCase.java index 1670d8eeb6..cf563534d2 100644 --- a/test/common/src/main/java/org/hibernate/tool/hbm2x/GenerateFromJDBC/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/hbm2x/GenerateFromJDBC/TestCase.java @@ -1,9 +1,29 @@ /* - * Created on 07-Dec-2004 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.hbm2x.GenerateFromJDBC; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import java.sql.SQLException; import java.util.Iterator; @@ -28,12 +48,10 @@ import org.hibernate.tool.hbm2x.POJOExporter; import org.hibernate.tools.test.util.JUnitUtil; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; @@ -44,23 +62,21 @@ */ public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputDir = new File("output"); private MetadataDescriptor metadataDescriptor = null; - private File outputDir = null; - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); - outputDir = temporaryFolder.getRoot(); DefaultReverseEngineeringStrategy configurableNamingStrategy = new DefaultReverseEngineeringStrategy(); configurableNamingStrategy.setSettings(new ReverseEngineeringSettings(configurableNamingStrategy).setDefaultPackageName("org.reveng").setCreateCollectionForForeignKey(false)); metadataDescriptor = MetadataDescriptorFactory .createJdbcDescriptor(configurableNamingStrategy, null, true); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -86,15 +102,15 @@ public void testGenerateMappings() { exporter.start(); JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "org/reveng/Child.hbm.xml")); File file = new File(outputDir, "GeneralHbmSettings.hbm.xml"); - Assert.assertTrue(file + " should not exist", !file.exists() ); + assertTrue(!file.exists(), file + " should not exist" ); File[] files = new File[2]; files[0] = new File(outputDir, "org/reveng/Child.hbm.xml"); files[1] = new File(outputDir, "org/reveng/Master.hbm.xml"); Metadata metadata = MetadataDescriptorFactory .createNativeDescriptor(null, files, null) .createMetadata(); - Assert.assertNotNull(metadata.getEntityBinding("org.reveng.Child") ); - Assert.assertNotNull(metadata.getEntityBinding("org.reveng.Master") ); + assertNotNull(metadata.getEntityBinding("org.reveng.Child") ); + assertNotNull(metadata.getEntityBinding("org.reveng.Master") ); } @Test @@ -116,11 +132,11 @@ public void testGenerateCfgXml() throws Exception { for (int i = 0; i < nodeList.getLength(); i++) { elements[i] = (Node)nodeList.item(i); } - Assert.assertEquals(2, elements.length); + assertEquals(2, elements.length); for (int i = 0; i < elements.length; i++) { Node element = elements[i]; - Assert.assertNotNull(element.getAttributes().getNamedItem("resource")); - Assert.assertNull(element.getAttributes().getNamedItem("class")); + assertNotNull(element.getAttributes().getNamedItem("resource")); + assertNull(element.getAttributes().getNamedItem("class")); } } @@ -145,11 +161,11 @@ public void testGenerateAnnotationCfgXml() throws Exception { for (int i = 0; i < nodeList.getLength(); i++) { elements[i] = (Node)nodeList.item(i); } - Assert.assertEquals(2, elements.length); + assertEquals(2, elements.length); for (int i = 0; i < elements.length; i++) { Node element = elements[i]; - Assert.assertNull(element.getAttributes().getNamedItem("resource")); - Assert.assertNotNull(element.getAttributes().getNamedItem("class")); + assertNull(element.getAttributes().getNamedItem("resource")); + assertNotNull(element.getAttributes().getNamedItem("class")); } } @@ -170,7 +186,7 @@ public void testPackageNames() { .iterator(); while (iter.hasNext() ) { PersistentClass element = iter.next(); - Assert.assertEquals("org.reveng", StringHelper.qualifier(element.getClassName() ) ); + assertEquals("org.reveng", StringHelper.qualifier(element.getClassName() ) ); } } } From 6e6640c17559292750866e48e0966b80f0084a92 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 6 Jul 2021 19:26:09 +0200 Subject: [PATCH 333/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.GenerateFromJDBCWithJavaKeyword.TestCase' Signed-off-by: Koen Aers --- .../TestCase.java | 55 ++++++++++++------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/hbm2x/GenerateFromJDBCWithJavaKeyword/TestCase.java b/test/common/src/main/java/org/hibernate/tool/hbm2x/GenerateFromJDBCWithJavaKeyword/TestCase.java index 4b735ce9f5..6cce22bbf7 100644 --- a/test/common/src/main/java/org/hibernate/tool/hbm2x/GenerateFromJDBCWithJavaKeyword/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/hbm2x/GenerateFromJDBCWithJavaKeyword/TestCase.java @@ -1,5 +1,27 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.hbm2x.GenerateFromJDBCWithJavaKeyword; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.ByteArrayInputStream; import java.io.File; import java.io.InputStream; @@ -17,12 +39,10 @@ import org.hibernate.tool.hbm2x.POJOExporter; import org.hibernate.tools.test.util.JavaUtil; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author koen@hibernate.org @@ -44,18 +64,15 @@ public class TestCase { "
\n"+ " "; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); - - private File outputDir = null; + @TempDir + public File outputDir = new File("output"); - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); - outputDir = temporaryFolder.getRoot(); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -67,19 +84,19 @@ public void testGenerateJava() throws Exception { exporter.setOutputDirectory(outputDir); exporter.start(); File myReturn = new File(outputDir, "org/reveng/MyReturn.java"); - Assert.assertTrue(myReturn.exists()); + assertTrue(myReturn.exists()); File myReturnHistory = new File(outputDir, "org/reveng/MyReturnHistory.java"); - Assert.assertTrue(myReturnHistory.exists()); + assertTrue(myReturnHistory.exists()); JavaUtil.compile(outputDir); URLClassLoader loader = new URLClassLoader(new URL[] { outputDir.toURI().toURL() } ); Class returnClass = loader.loadClass("org.reveng.MyReturn"); - Assert.assertNotNull(returnClass); + assertNotNull(returnClass); Class returnHistoryClass = loader.loadClass("org.reveng.MyReturnHistory"); - Assert.assertNotNull(returnHistoryClass); + assertNotNull(returnHistoryClass); Field returnField = returnHistoryClass.getDeclaredField("return_"); - Assert.assertNotNull(returnField); + assertNotNull(returnField); Method returnSetter = returnHistoryClass.getMethod("setReturn", new Class[] { returnClass }); - Assert.assertNotNull(returnSetter); + assertNotNull(returnSetter); loader.close(); } From 76eaa507c1506b8f701761f47f1731f2287f4c46 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 6 Jul 2021 19:40:54 +0200 Subject: [PATCH 334/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.IncrementalSchemaReading.TestCase' Signed-off-by: Koen Aers --- .../IncrementalSchemaReading/TestCase.java | 58 ++++++++++++------- 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/hbm2x/IncrementalSchemaReading/TestCase.java b/test/common/src/main/java/org/hibernate/tool/hbm2x/IncrementalSchemaReading/TestCase.java index 936fb95e2b..52bd3a0420 100644 --- a/test/common/src/main/java/org/hibernate/tool/hbm2x/IncrementalSchemaReading/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/hbm2x/IncrementalSchemaReading/TestCase.java @@ -1,9 +1,29 @@ /* - * Created on 2004-12-01 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.hbm2x.IncrementalSchemaReading; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertSame; + import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -25,11 +45,9 @@ import org.hibernate.tool.hbmlint.detector.TableSelectorStrategy; import org.hibernate.tools.test.util.JUnitUtil; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; /** * @author max @@ -52,7 +70,7 @@ public Iterator> getColumns(String catalog, String schema, S } } - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); properties = Environment.getProperties(); @@ -60,7 +78,7 @@ public void setUp() { defaultCatalog = properties.getProperty(AvailableSettings.DEFAULT_CATALOG); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -79,15 +97,15 @@ public void testReadSchemaIncremental() { DatabaseCollector dc = new DefaultDatabaseCollector(reader.getMetaDataDialect()); reader.readDatabaseSchema( dc, null, null ); - Assert.assertEquals(mockedMetaDataDialect.gottenTables.size(),1); - Assert.assertEquals(mockedMetaDataDialect.gottenTables.get(0),"CHILD"); + assertEquals(mockedMetaDataDialect.gottenTables.size(),1); + assertEquals(mockedMetaDataDialect.gottenTables.get(0),"CHILD"); Iterator iterator = dc.iterateTables(); Table firstChild = iterator.next(); - Assert.assertEquals(firstChild.getName(), "CHILD"); - Assert.assertFalse(iterator.hasNext()); + assertEquals(firstChild.getName(), "CHILD"); + assertFalse(iterator.hasNext()); - Assert.assertFalse("should not record foreignkey to table it doesn't know about yet",firstChild.getForeignKeyIterator().hasNext()); + assertFalse(firstChild.getForeignKeyIterator().hasNext(), "should not record foreignkey to table it doesn't know about yet"); tss.clearSchemaSelections(); tss.addSchemaSelection( new SchemaSelection(null, null, "MASTER") ); @@ -95,17 +113,17 @@ public void testReadSchemaIncremental() { mockedMetaDataDialect.gottenTables.clear(); reader.readDatabaseSchema( dc, null, null ); - Assert.assertEquals(mockedMetaDataDialect.gottenTables.size(),1); - Assert.assertEquals(mockedMetaDataDialect.gottenTables.get(0),"MASTER"); + assertEquals(mockedMetaDataDialect.gottenTables.size(),1); + assertEquals(mockedMetaDataDialect.gottenTables.get(0),"MASTER"); iterator = dc.iterateTables(); - Assert.assertNotNull(iterator.next()); - Assert.assertNotNull(iterator.next()); - Assert.assertFalse(iterator.hasNext()); + assertNotNull(iterator.next()); + assertNotNull(iterator.next()); + assertFalse(iterator.hasNext()); Table table = dc.getTable( defaultSchema, defaultCatalog, "CHILD" ); - Assert.assertSame( firstChild, table ); + assertSame( firstChild, table ); JUnitUtil.assertIteratorContainsExactly( "should have recorded one foreignkey to child table", @@ -118,7 +136,7 @@ public void testReadSchemaIncremental() { Table finalMaster = dc.getTable( defaultSchema, defaultCatalog, "MASTER" ); - Assert.assertSame(firstChild, dc.getTable( defaultSchema, defaultCatalog, "CHILD" )); + assertSame(firstChild, dc.getTable( defaultSchema, defaultCatalog, "CHILD" )); JUnitUtil.assertIteratorContainsExactly( null, firstChild.getForeignKeyIterator(), From 38642a945962b4293d317734de1fdbaac7a0dc89 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 6 Jul 2021 19:55:12 +0200 Subject: [PATCH 335/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.JdbcHbm2JavaEjb3.TestCase' Signed-off-by: Koen Aers --- .../tool/hbm2x/JdbcHbm2JavaEjb3/TestCase.java | 47 ++++++++++++------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/hbm2x/JdbcHbm2JavaEjb3/TestCase.java b/test/common/src/main/java/org/hibernate/tool/hbm2x/JdbcHbm2JavaEjb3/TestCase.java index 342a328420..bf832ab16a 100644 --- a/test/common/src/main/java/org/hibernate/tool/hbm2x/JdbcHbm2JavaEjb3/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/hbm2x/JdbcHbm2JavaEjb3/TestCase.java @@ -1,9 +1,27 @@ /* - * Created on 2004-12-01 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.hbm2x.JdbcHbm2JavaEjb3; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + import java.io.File; import java.util.ArrayList; import java.util.List; @@ -16,12 +34,10 @@ import org.hibernate.tools.test.util.JUnitUtil; import org.hibernate.tools.test.util.JavaUtil; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author max @@ -30,15 +46,12 @@ */ public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputDir = new File("output"); - private File outputDir = null; - - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); - outputDir = temporaryFolder.getRoot(); POJOExporter exporter = new POJOExporter(); exporter.setMetadataDescriptor(MetadataDescriptorFactory .createJdbcDescriptor(null, null, true)); @@ -49,7 +62,7 @@ public void setUp() { exporter.start(); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -61,13 +74,13 @@ public void testFileExistence() { @Test public void testUniqueConstraints() { - Assert.assertEquals(null, FileUtil.findFirstString( "uniqueConstraints", new File(outputDir,"Master.java") )); - Assert.assertNotNull(FileUtil.findFirstString( "uniqueConstraints", new File(outputDir,"Uniquemaster.java") )); + assertEquals(null, FileUtil.findFirstString( "uniqueConstraints", new File(outputDir,"Master.java") )); + assertNotNull(FileUtil.findFirstString( "uniqueConstraints", new File(outputDir,"Uniquemaster.java") )); } @Test public void testCompile() { - File destination = new File(temporaryFolder.getRoot(), "destination"); + File destination = new File(outputDir, "destination"); destination.mkdir(); List jars = new ArrayList(); jars.add(JavaUtil.resolvePathToJarFileFor(Persistence.class)); // for jpa api From 8ce357c8b4769c78857ccd31c95527662938cc4c Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 6 Jul 2021 20:15:39 +0200 Subject: [PATCH 336/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbm2x.query.QueryExporterTest.TestCase' Signed-off-by: Koen Aers --- .../hbm2x/query/QueryExporterTest/Group.java | 20 ++++++++- .../query/QueryExporterTest/TestCase.java | 45 +++++++++++++------ .../hbm2x/query/QueryExporterTest/User.java | 20 ++++++++- 3 files changed, 70 insertions(+), 15 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/hbm2x/query/QueryExporterTest/Group.java b/test/common/src/main/java/org/hibernate/tool/hbm2x/query/QueryExporterTest/Group.java index 3c2159210f..073ff271c1 100644 --- a/test/common/src/main/java/org/hibernate/tool/hbm2x/query/QueryExporterTest/Group.java +++ b/test/common/src/main/java/org/hibernate/tool/hbm2x/query/QueryExporterTest/Group.java @@ -1,4 +1,22 @@ -//$Id: Group.java 7085 2005-06-08 17:59:47Z oneovthafew $ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.hbm2x.query.QueryExporterTest; import java.io.ObjectStreamClass; diff --git a/test/common/src/main/java/org/hibernate/tool/hbm2x/query/QueryExporterTest/TestCase.java b/test/common/src/main/java/org/hibernate/tool/hbm2x/query/QueryExporterTest/TestCase.java index b026a29e54..c64b1a6f76 100644 --- a/test/common/src/main/java/org/hibernate/tool/hbm2x/query/QueryExporterTest/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/hbm2x/query/QueryExporterTest/TestCase.java @@ -1,5 +1,26 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.hbm2x.query.QueryExporterTest; +import static org.junit.jupiter.api.Assertions.fail; + import java.io.File; import java.util.ArrayList; import java.util.EnumSet; @@ -19,28 +40,26 @@ import org.hibernate.tools.test.util.JUnitUtil; import org.hibernate.tools.test.util.JdbcUtil; import org.hibernate.tools.test.util.ResourceUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File temporaryFolder = new File("temp"); private File destinationDir = null; private File resourcesDir = null; private File userGroupHbmXmlFile = null; - @Before + @BeforeEach public void setUp() throws Exception { JdbcUtil.createDatabase(this); - destinationDir = new File(temporaryFolder.getRoot(), "destination"); + destinationDir = new File(temporaryFolder, "destination"); destinationDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(temporaryFolder, "resources"); resourcesDir.mkdir(); String[] resources = { "UserGroup.hbm.xml" }; ResourceUtil.createResources(this, resources, resourcesDir); @@ -77,14 +96,14 @@ public void testQueryExporter() throws Exception { JUnitUtil.assertIsNonEmptyFile(new File(destinationDir, "queryresult.txt")); } - @After + @AfterEach public void tearDown() throws Exception { SchemaExport export = new SchemaExport(); final EnumSet targetTypes = EnumSet.noneOf( TargetType.class ); targetTypes.add( TargetType.DATABASE ); export.drop(targetTypes, createMetadata()); if (export.getExceptions() != null && export.getExceptions().size() > 0){ - Assert.fail("Schema export failed"); + fail("Schema export failed"); } JdbcUtil.dropDatabase(this); } diff --git a/test/common/src/main/java/org/hibernate/tool/hbm2x/query/QueryExporterTest/User.java b/test/common/src/main/java/org/hibernate/tool/hbm2x/query/QueryExporterTest/User.java index 0aa90c4996..41e98986dd 100644 --- a/test/common/src/main/java/org/hibernate/tool/hbm2x/query/QueryExporterTest/User.java +++ b/test/common/src/main/java/org/hibernate/tool/hbm2x/query/QueryExporterTest/User.java @@ -1,4 +1,22 @@ -//$Id: User.java 7085 2005-06-08 17:59:47Z oneovthafew $ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.hbm2x.query.QueryExporterTest; import java.io.ObjectStreamClass; From ab092e598ba6691f1c9036d91f7377d49564f51c Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 6 Jul 2021 21:07:43 +0200 Subject: [PATCH 337/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbmlint.HbmLintTest.TestCase' Signed-off-by: Koen Aers --- .../tool/hbmlint/HbmLintTest/BrokenLazy.java | 19 ++++++++ .../hbmlint/HbmLintTest/BrokenNonLazy.java | 19 ++++++++ .../tool/hbmlint/HbmLintTest/TestCase.java | 45 +++++++++++++------ 3 files changed, 70 insertions(+), 13 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/hbmlint/HbmLintTest/BrokenLazy.java b/test/common/src/main/java/org/hibernate/tool/hbmlint/HbmLintTest/BrokenLazy.java index 50f29a821d..f0a6f4dd07 100644 --- a/test/common/src/main/java/org/hibernate/tool/hbmlint/HbmLintTest/BrokenLazy.java +++ b/test/common/src/main/java/org/hibernate/tool/hbmlint/HbmLintTest/BrokenLazy.java @@ -1,3 +1,22 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.hbmlint.HbmLintTest; public class BrokenLazy { diff --git a/test/common/src/main/java/org/hibernate/tool/hbmlint/HbmLintTest/BrokenNonLazy.java b/test/common/src/main/java/org/hibernate/tool/hbmlint/HbmLintTest/BrokenNonLazy.java index 4dcf47dcdc..c918bc510e 100644 --- a/test/common/src/main/java/org/hibernate/tool/hbmlint/HbmLintTest/BrokenNonLazy.java +++ b/test/common/src/main/java/org/hibernate/tool/hbmlint/HbmLintTest/BrokenNonLazy.java @@ -1,3 +1,22 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.hbmlint.HbmLintTest; public class BrokenNonLazy { diff --git a/test/common/src/main/java/org/hibernate/tool/hbmlint/HbmLintTest/TestCase.java b/test/common/src/main/java/org/hibernate/tool/hbmlint/HbmLintTest/TestCase.java index 508b38fe52..643d5f5cb1 100644 --- a/test/common/src/main/java/org/hibernate/tool/hbmlint/HbmLintTest/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/hbmlint/HbmLintTest/TestCase.java @@ -1,5 +1,26 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.hbmlint.HbmLintTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + import java.io.File; import org.hibernate.tool.api.metadata.MetadataDescriptor; @@ -10,11 +31,9 @@ import org.hibernate.tool.hbmlint.detector.InstrumentationDetector; import org.hibernate.tool.hbmlint.detector.ShadowedIdentifierDetector; import org.hibernate.tools.test.util.HibernateUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; public class TestCase { @@ -24,19 +43,19 @@ public class TestCase { "BrokenLazy.hbm.xml" }; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File temporaryFolder = new File("temp"); private File outputDir = null; private File resourcesDir = null; private MetadataDescriptor metadataDescriptor = null; - @Before + @BeforeEach public void setUp() { - outputDir = new File(temporaryFolder.getRoot(), "output"); + outputDir = new File(temporaryFolder, "output"); outputDir.mkdir(); - resourcesDir = new File(temporaryFolder.getRoot(), "resources"); + resourcesDir = new File(temporaryFolder, "resources"); resourcesDir.mkdir(); metadataDescriptor = HibernateUtil.initializeMetadataDescriptor(this, HBM_XML_FILES, resourcesDir); } @@ -53,21 +72,21 @@ public void testExporter() { public void testValidateCache() { HbmLint analyzer = new HbmLint(new Detector[] { new BadCachingDetector() }); analyzer.analyze(metadataDescriptor.createMetadata()); - Assert.assertEquals(1,analyzer.getResults().size()); + assertEquals(1,analyzer.getResults().size()); } @Test public void testValidateIdentifier() { HbmLint analyzer = new HbmLint(new Detector[] { new ShadowedIdentifierDetector() }); analyzer.analyze(metadataDescriptor.createMetadata()); - Assert.assertEquals(1,analyzer.getResults().size()); + assertEquals(1,analyzer.getResults().size()); } @Test public void testBytecodeRestrictions() { HbmLint analyzer = new HbmLint(new Detector[] { new InstrumentationDetector() }); analyzer.analyze(metadataDescriptor.createMetadata()); - Assert.assertEquals(analyzer.getResults().toString(), 2,analyzer.getResults().size()); + assertEquals(2,analyzer.getResults().size(), analyzer.getResults().toString()); } } From 73f67ee717dcaa29c0ed9e21aebb7ac162413328 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 6 Jul 2021 21:22:12 +0200 Subject: [PATCH 338/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.hbmlint.SchemaAnalyzer.TestCase' Signed-off-by: Koen Aers --- .../tool/hbmlint/SchemaAnalyzer/TestCase.java | 55 ++++++++++++------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/hbmlint/SchemaAnalyzer/TestCase.java b/test/common/src/main/java/org/hibernate/tool/hbmlint/SchemaAnalyzer/TestCase.java index 80eeed373c..531d33adb3 100644 --- a/test/common/src/main/java/org/hibernate/tool/hbmlint/SchemaAnalyzer/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/hbmlint/SchemaAnalyzer/TestCase.java @@ -1,9 +1,28 @@ /* - * Created on 2004-11-23 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.hbmlint.SchemaAnalyzer; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.io.File; import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -15,27 +34,25 @@ import org.hibernate.tool.hbmlint.IssueCollector; import org.hibernate.tool.hbmlint.detector.SchemaByMetaDataDetector; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author koen */ public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File temporaryFolder = new File("temp"); - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -59,27 +76,27 @@ public void testSchemaAnalyzer() { if(table.getName().equalsIgnoreCase( "MISSING_TABLE" )) { analyzer.visit(table, mc ); - Assert.assertEquals(mc.problems.size(),1); + assertEquals(mc.problems.size(),1); Issue ap = (Issue) mc.problems.get( 0 ); - Assert.assertTrue(ap.getDescription().indexOf( "Missing table" ) >=0); + assertTrue(ap.getDescription().indexOf( "Missing table" ) >=0); } else if(table.getName().equalsIgnoreCase( "CATEGORY" )) { analyzer.visit(table, mc ); - Assert.assertEquals(mc.problems.size(),1); + assertEquals(mc.problems.size(),1); Issue ap = (Issue) mc.problems.get( 0 ); - Assert.assertTrue(ap.getDescription().indexOf( "missing column: name" ) >=0); + assertTrue(ap.getDescription().indexOf( "missing column: name" ) >=0); } else if(table.getName().equalsIgnoreCase( "BAD_TYPE" )) { analyzer.visit(table, mc ); - Assert.assertEquals(mc.problems.size(),1); + assertEquals(mc.problems.size(),1); Issue ap = (Issue) mc.problems.get( 0 ); - Assert.assertTrue(ap.getDescription().indexOf( "wrong column type for name" ) >=0); + assertTrue(ap.getDescription().indexOf( "wrong column type for name" ) >=0); } } MockCollector mc = new MockCollector(); analyzer.visitGenerators(mc); - Assert.assertEquals(1,mc.problems.size()); + assertEquals(1,mc.problems.size()); Issue issue = (Issue) mc.problems.get( 0 ); - Assert.assertTrue(issue.getDescription().indexOf( "does_not_exist" ) >=0); + assertTrue(issue.getDescription().indexOf( "does_not_exist" ) >=0); } From 09fd6170077af4aca6f8b602b9a5f2a7487ba575 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 6 Jul 2021 21:42:55 +0200 Subject: [PATCH 339/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.AutoQuote.TestCase' Signed-off-by: Koen Aers --- .../tool/jdbc2cfg/AutoQuote/TestCase.java | 42 +++++++++++++------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/AutoQuote/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/AutoQuote/TestCase.java index 71276d8cd4..c97395f6e1 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/AutoQuote/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/AutoQuote/TestCase.java @@ -1,9 +1,28 @@ /* - * Created on 2004-11-24 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.jdbc2cfg.AutoQuote; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import org.hibernate.boot.Metadata; import org.hibernate.mapping.PersistentClass; import org.hibernate.mapping.Property; @@ -11,10 +30,9 @@ import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; /** * @author max @@ -24,7 +42,7 @@ public class TestCase { private Metadata metadata = null; - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); metadata = MetadataDescriptorFactory @@ -32,7 +50,7 @@ public void setUp() { .createMetadata(); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -40,13 +58,13 @@ public void tearDown() { @Test public void testForQuotes() { Table table = HibernateUtil.getTable(metadata, "us-ers"); - Assert.assertNotNull(table); - Assert.assertTrue(table.isQuoted()); - Assert.assertEquals(2, table.getColumnSpan()); + assertNotNull(table); + assertTrue(table.isQuoted()); + assertEquals(2, table.getColumnSpan()); PersistentClass classMapping = metadata.getEntityBinding("Worklogs"); - Assert.assertNotNull(classMapping); + assertNotNull(classMapping); Property property = classMapping.getProperty("usErs"); - Assert.assertNotNull(property); + assertNotNull(property); } } From 4637524fb20a30829d339cd9def0e9509c18ab2f Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 6 Jul 2021 22:14:21 +0200 Subject: [PATCH 340/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.Basic.TestCase' Signed-off-by: Koen Aers --- .../tool/jdbc2cfg/Basic/TestCase.java | 55 +++++++++++++------ 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Basic/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Basic/TestCase.java index fc6a338ef0..7474541885 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Basic/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Basic/TestCase.java @@ -1,9 +1,29 @@ /* - * Created on 2004-11-23 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.jdbc2cfg.Basic; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.sql.SQLException; import org.hibernate.boot.Metadata; @@ -14,10 +34,9 @@ import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; /** * @author max @@ -27,7 +46,7 @@ public class TestCase { private Metadata metadata = null; - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); metadata = MetadataDescriptorFactory @@ -35,7 +54,7 @@ public void setUp() { .createMetadata(); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -49,20 +68,20 @@ public void testBasic() throws SQLException { Table table = HibernateUtil.getTable( metadata, JdbcUtil.toIdentifier(this, "BASIC")); - Assert.assertEquals( + assertEquals( JdbcUtil.toIdentifier(this, "BASIC"), JdbcUtil.toIdentifier(this, table.getName())); - Assert.assertEquals(2, table.getColumnSpan()); + assertEquals(2, table.getColumnSpan()); Column basicColumn = table.getColumn(0); - Assert.assertEquals( + assertEquals( JdbcUtil.toIdentifier(this, "A"), JdbcUtil.toIdentifier(this, basicColumn.getName())); PrimaryKey key = table.getPrimaryKey(); - Assert.assertNotNull("There should be a primary key!", key); - Assert.assertEquals(key.getColumnSpan(), 1); + assertNotNull(key, "There should be a primary key!"); + assertEquals(key.getColumnSpan(), 1); Column column = key.getColumn(0); - Assert.assertTrue(column.isUnique()); - Assert.assertSame(basicColumn, column); + assertTrue(column.isUnique()); + assertSame(basicColumn, column); } @Test @@ -71,9 +90,9 @@ public void testScalePrecisionLength() { metadata, JdbcUtil.toIdentifier(this, "BASIC")); Column nameCol = table.getColumn(new Column(JdbcUtil.toIdentifier(this, "NAME"))); - Assert.assertEquals(nameCol.getLength(), 20); - Assert.assertEquals(nameCol.getPrecision(), Column.DEFAULT_PRECISION); - Assert.assertEquals(nameCol.getScale(), Column.DEFAULT_SCALE); + assertEquals(nameCol.getLength(), 20); + assertEquals(nameCol.getPrecision(), Column.DEFAULT_PRECISION); + assertEquals(nameCol.getScale(), Column.DEFAULT_SCALE); } @Test @@ -82,7 +101,7 @@ public void testCompositeKeys() { metadata, JdbcUtil.toIdentifier(this, "MULTIKEYED")); PrimaryKey primaryKey = table.getPrimaryKey(); - Assert.assertEquals(2, primaryKey.getColumnSpan()); + assertEquals(2, primaryKey.getColumnSpan()); } } From 25c37f4ea24823118bc81550657c5aa79ab607ef Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 6 Jul 2021 22:29:38 +0200 Subject: [PATCH 341/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.BasicMultiSchema.TestCase' Signed-off-by: Koen Aers --- .../jdbc2cfg/BasicMultiSchema/TestCase.java | 101 +++++++----------- 1 file changed, 37 insertions(+), 64 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/TestCase.java index 9741c425fa..9d2a56d14b 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/TestCase.java @@ -1,9 +1,29 @@ /* - * Created on 2004-11-23 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.jdbc2cfg.BasicMultiSchema; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.sql.SQLException; import org.hibernate.boot.Metadata; @@ -14,10 +34,9 @@ import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; /** * @author max @@ -27,7 +46,7 @@ public class TestCase { private Metadata metadata = null; - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); metadata = MetadataDescriptorFactory @@ -35,7 +54,7 @@ public void setUp() { .createMetadata(); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -52,29 +71,24 @@ public void testBasic() throws SQLException { metadata, JdbcUtil.toIdentifier(this, "BASIC" ) ); - Assert.assertEquals( + assertEquals( JdbcUtil.toIdentifier(this, "BASIC"), JdbcUtil.toIdentifier(this, table.getName()) ); - Assert.assertEquals( 2, table.getColumnSpan() ); + assertEquals( 2, table.getColumnSpan() ); Column basicColumn = table.getColumn( 0 ); - Assert.assertEquals( + assertEquals( JdbcUtil.toIdentifier(this, "A"), JdbcUtil.toIdentifier(this, basicColumn.getName() )); - - // TODO: we cannot call getSqlType(dialect,cfg) without a - // MappingassertEquals("INTEGER", basicColumn.getSqlType() ); // at - // least on hsqldb - // assertEquals(22, basicColumn.getLength() ); // at least on oracle PrimaryKey key = table.getPrimaryKey(); - Assert.assertNotNull( "There should be a primary key!", key ); - Assert.assertEquals( key.getColumnSpan(), 1 ); + assertNotNull(key, "There should be a primary key!" ); + assertEquals( key.getColumnSpan(), 1 ); Column column = key.getColumn( 0 ); - Assert.assertTrue( column.isUnique() ); + assertTrue( column.isUnique() ); - Assert.assertSame( basicColumn, column ); + assertSame( basicColumn, column ); } @@ -84,59 +98,18 @@ public void testScalePrecisionLength() { metadata, JdbcUtil.toIdentifier(this, "BASIC" ) ); Column nameCol = table.getColumn( new Column( JdbcUtil.toIdentifier(this, "NAME" ) ) ); - Assert.assertEquals( nameCol.getLength(), 20 ); - Assert.assertEquals( nameCol.getPrecision(), Column.DEFAULT_PRECISION ); - Assert.assertEquals( nameCol.getScale(), Column.DEFAULT_SCALE ); + assertEquals( nameCol.getLength(), 20 ); + assertEquals( nameCol.getPrecision(), Column.DEFAULT_PRECISION ); + assertEquals( nameCol.getScale(), Column.DEFAULT_SCALE ); } - -/* public void testAutoDetectSingleSchema() { - - //read single schema without default schema: result = no schema info in tables. - JDBCMetaDataConfiguration mycfg = new JDBCMetaDataConfiguration(); - mycfg.setReverseEngineeringStrategy(new DelegatingReverseEngineeringStrategy(new DefaultReverseEngineeringStrategy()) { - public boolean excludeTable(TableIdentifier ti) { - return !"PUBLIC".equals(ti.getSchema()); - } - }); - mycfg.getProperties().remove(org.hibernate.cfg.Environment.DEFAULT_SCHEMA); - mycfg.readFromJDBC(); - - Table table = getTable(mycfg, identifier("otherschema")); - assertNull("rev.eng.strategy should have excluded this table",table); - - table = getTable(mycfg, identifier("basic")); - assertNotNull(table); - assertNull(table.getSchema()); - - - //read single schema with default schema: result = no schema info in tables. - - //read other single schema than default schema: result = schema info in tables. - - }*/ - - /* - * public void testGetTables() { - * - * Table table = new Table(); table.setName("dummy"); cfg.addTable(table); - * - * Table foundTable = cfg.getTable(null,null,"dummy"); - * - * assertSame(table,foundTable); - * - * foundTable = cfg.getTable(null,"dschema", "dummy"); - * - * assertNotSame(table, foundTable); } - */ - @Test public void testCompositeKeys() { Table table = HibernateUtil.getTable( metadata, JdbcUtil.toIdentifier(this, "MULTIKEYED")); PrimaryKey primaryKey = table.getPrimaryKey(); - Assert.assertEquals( 2, primaryKey.getColumnSpan() ); + assertEquals( 2, primaryKey.getColumnSpan() ); } } From 3ca5d61466998df36b84d66efe92640b7d59e0bc Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 6 Jul 2021 22:56:03 +0200 Subject: [PATCH 342/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.CompositeId.TestCase' Signed-off-by: Koen Aers --- .../tool/jdbc2cfg/CompositeId/TestCase.java | 122 ++++++++++-------- 1 file changed, 70 insertions(+), 52 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/CompositeId/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/CompositeId/TestCase.java index ae6a91a905..bd655b3f39 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/CompositeId/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/CompositeId/TestCase.java @@ -1,9 +1,30 @@ /* - * Created on 13-Jan-2005 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.jdbc2cfg.CompositeId; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + import java.io.File; import java.net.URL; import java.net.URLClassLoader; @@ -31,12 +52,10 @@ import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JavaUtil; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author max @@ -47,10 +66,10 @@ public class TestCase { private MetadataDescriptor metadataDescriptor = null; private ReverseEngineeringStrategy reverseEngineeringStrategy = null; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File temporaryFolder = new File("temp"); - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); reverseEngineeringStrategy = new DefaultReverseEngineeringStrategy(); @@ -58,7 +77,7 @@ public void setUp() { .createJdbcDescriptor(reverseEngineeringStrategy, null, true); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this);; } @@ -69,39 +88,39 @@ public void testMultiColumnForeignKeys() { Table table = HibernateUtil.getTable( metadata, JdbcUtil.toIdentifier(this, "LINE_ITEM") ); - Assert.assertNotNull(table); + assertNotNull(table); ForeignKey foreignKey = HibernateUtil.getForeignKey( table, JdbcUtil.toIdentifier(this, "TO_CUSTOMER_ORDER") ); - Assert.assertNotNull(foreignKey); - Assert.assertEquals( + assertNotNull(foreignKey); + assertEquals( reverseEngineeringStrategy.tableToClassName( new TableIdentifier( null, null, JdbcUtil.toIdentifier(this, "CUSTOMER_ORDER"))), foreignKey.getReferencedEntityName() ); - Assert.assertEquals( + assertEquals( JdbcUtil.toIdentifier(this, "LINE_ITEM"), foreignKey.getTable().getName() ); - Assert.assertEquals(2,foreignKey.getColumnSpan() ); - Assert.assertEquals(foreignKey.getColumn(0).getName(), "CUSTOMER_ID_REF"); - Assert.assertEquals(foreignKey.getColumn(1).getName(), "ORDER_NUMBER"); + assertEquals(2,foreignKey.getColumnSpan() ); + assertEquals(foreignKey.getColumn(0).getName(), "CUSTOMER_ID_REF"); + assertEquals(foreignKey.getColumn(1).getName(), "ORDER_NUMBER"); Table tab = HibernateUtil.getTable( metadata, JdbcUtil.toIdentifier(this, "CUSTOMER_ORDER")); - Assert.assertEquals(tab.getPrimaryKey().getColumn(0).getName(), "CUSTOMER_ID"); - Assert.assertEquals(tab.getPrimaryKey().getColumn(1).getName(), "ORDER_NUMBER"); + assertEquals(tab.getPrimaryKey().getColumn(0).getName(), "CUSTOMER_ID"); + assertEquals(tab.getPrimaryKey().getColumn(1).getName(), "ORDER_NUMBER"); PersistentClass lineMapping = metadata.getEntityBinding( reverseEngineeringStrategy.tableToClassName( new TableIdentifier( null, null, JdbcUtil.toIdentifier(this, "LINE_ITEM")))); - Assert.assertEquals(4,lineMapping.getIdentifier().getColumnSpan() ); + assertEquals(4,lineMapping.getIdentifier().getColumnSpan() ); Iterator columnIterator = lineMapping.getIdentifier().getColumnIterator(); - Assert.assertEquals(((Column)(columnIterator.next())).getName(), "CUSTOMER_ID_REF"); - Assert.assertEquals(((Column)(columnIterator.next())).getName(), "ORDER_NUMBER"); + assertEquals(((Column)(columnIterator.next())).getName(), "CUSTOMER_ID_REF"); + assertEquals(((Column)(columnIterator.next())).getName(), "ORDER_NUMBER"); } @Test @@ -113,24 +132,24 @@ public void testPossibleKeyManyToOne() { null, JdbcUtil.toIdentifier(this, "CUSTOMER_ORDER")))); Property identifierProperty = product.getIdentifierProperty(); - Assert.assertTrue(identifierProperty.getValue() instanceof Component); + assertTrue(identifierProperty.getValue() instanceof Component); Component cmpid = (Component) identifierProperty.getValue(); - Assert.assertEquals(2, cmpid.getPropertySpan() ); + assertEquals(2, cmpid.getPropertySpan() ); Iterator iter = cmpid.getPropertyIterator(); Property id = (Property) iter.next(); Property extraId = (Property) iter.next(); - Assert.assertEquals( + assertEquals( reverseEngineeringStrategy.columnToPropertyName( null, "CUSTOMER_ID"), id.getName() ); - Assert.assertEquals( + assertEquals( reverseEngineeringStrategy.columnToPropertyName( null, "ORDER_NUMBER"), extraId.getName() ); - Assert.assertFalse(id.getValue() instanceof ManyToOne); - Assert.assertFalse(extraId.getValue() instanceof ManyToOne); + assertFalse(id.getValue() instanceof ManyToOne); + assertFalse(extraId.getValue() instanceof ManyToOne); } @Test @@ -142,49 +161,48 @@ public void testKeyProperty() { null, JdbcUtil.toIdentifier(this, "PRODUCT")))); Property identifierProperty = product.getIdentifierProperty(); - Assert.assertTrue(identifierProperty.getValue() instanceof Component); + assertTrue(identifierProperty.getValue() instanceof Component); Component cmpid = (Component) identifierProperty.getValue(); - Assert.assertEquals(2, cmpid.getPropertySpan() ); + assertEquals(2, cmpid.getPropertySpan() ); Iterator iter = cmpid.getPropertyIterator(); Property id = (Property) iter.next(); Property extraId = (Property) iter.next(); - Assert.assertEquals( + assertEquals( reverseEngineeringStrategy.columnToPropertyName( null, "PRODUCT_ID"), id.getName() ); - Assert.assertEquals( + assertEquals( reverseEngineeringStrategy.columnToPropertyName( null, "EXTRA_ID"), extraId.getName() ); - Assert.assertFalse(id.getValue() instanceof ManyToOne); - Assert.assertFalse(extraId.getValue() instanceof ManyToOne); + assertFalse(id.getValue() instanceof ManyToOne); + assertFalse(extraId.getValue() instanceof ManyToOne); } @Test public void testGeneration() throws Exception { - final File testFolder = temporaryFolder.getRoot(); Exporter exporter = new HibernateMappingExporter(); exporter.setMetadataDescriptor(metadataDescriptor); - exporter.setOutputDirectory(testFolder); + exporter.setOutputDirectory(temporaryFolder); Exporter javaExp = new POJOExporter(); javaExp.setMetadataDescriptor(metadataDescriptor); - javaExp.setOutputDirectory(testFolder); + javaExp.setOutputDirectory(temporaryFolder); exporter.start(); javaExp.start(); - JavaUtil.compile(testFolder); - URL[] urls = new URL[] { testFolder.toURI().toURL() }; + JavaUtil.compile(temporaryFolder); + URL[] urls = new URL[] { temporaryFolder.toURI().toURL() }; URLClassLoader ucl = new URLClassLoader( urls, Thread.currentThread().getContextClassLoader()); File[] files = new File[6]; - files[0] = new File(testFolder, "Simplecustomerorder.hbm.xml"); - files[1] = new File(testFolder, "Simplelineitem.hbm.xml"); - files[2] = new File(testFolder, "Product.hbm.xml"); - files[3] = new File(testFolder, "Customer.hbm.xml"); - files[4] = new File(testFolder, "Lineitem.hbm.xml"); - files[5] = new File(testFolder, "Customerorder.hbm.xml"); + files[0] = new File(temporaryFolder, "Simplecustomerorder.hbm.xml"); + files[1] = new File(temporaryFolder, "Simplelineitem.hbm.xml"); + files[2] = new File(temporaryFolder, "Product.hbm.xml"); + files[3] = new File(temporaryFolder, "Customer.hbm.xml"); + files[4] = new File(temporaryFolder, "Lineitem.hbm.xml"); + files[5] = new File(temporaryFolder, "Customerorder.hbm.xml"); Thread.currentThread().setContextClassLoader(ucl); SessionFactory factory = MetadataDescriptorFactory .createNativeDescriptor(null, files, null) @@ -194,22 +212,22 @@ public void testGeneration() throws Exception { JdbcUtil.populateDatabase(this); session.createQuery("from LineItem").getResultList(); List list = session.createQuery("from Product").getResultList(); - Assert.assertEquals(2,list.size() ); + assertEquals(2,list.size() ); list = session .createQuery("select li.customerOrder.id from LineItem as li") .getResultList(); - Assert.assertTrue(list.size()>0); + assertTrue(list.size()>0); Class productIdClass = ucl.loadClass("ProductId"); Object object = productIdClass.newInstance(); int hash = -1; try { hash = object.hashCode(); } catch(Throwable t) { - Assert.fail("Hashcode on new instance should not fail " + t); + fail("Hashcode on new instance should not fail " + t); } - Assert.assertFalse( - "hashcode should be different from system", - hash==System.identityHashCode(object)); + assertFalse( + hash==System.identityHashCode(object), + "hashcode should be different from system"); factory.close(); Thread.currentThread().setContextClassLoader(ucl.getParent() ); } From 9f8f1d2dc5a1724525eec5a74825c3cc4ec37977 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 6 Jul 2021 23:15:18 +0200 Subject: [PATCH 343/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.ForeignKeys.TestCase' Signed-off-by: Koen Aers --- .../tool/jdbc2cfg/ForeignKeys/TestCase.java | 56 +++++++++++++------ 1 file changed, 38 insertions(+), 18 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/ForeignKeys/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/ForeignKeys/TestCase.java index 44ca79208c..b5fce40ab1 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/ForeignKeys/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/ForeignKeys/TestCase.java @@ -1,9 +1,30 @@ /* - * Created on 2004-11-24 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.jdbc2cfg.ForeignKeys; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertSame; + import java.util.EnumSet; import java.util.Iterator; @@ -20,10 +41,9 @@ import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; /** * @author max @@ -34,7 +54,7 @@ public class TestCase { private Metadata metadata = null; private ReverseEngineeringStrategy reverseEngineeringStrategy = null; - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); reverseEngineeringStrategy = new DefaultReverseEngineeringStrategy(); @@ -43,7 +63,7 @@ public void setUp() { .createMetadata(); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this);; } @@ -56,28 +76,28 @@ public void testMultiRefs() { ForeignKey foreignKey = HibernateUtil.getForeignKey( table, JdbcUtil.toIdentifier(this, "CON2MASTER") ); - Assert.assertNotNull(foreignKey); - Assert.assertEquals( + assertNotNull(foreignKey); + assertEquals( reverseEngineeringStrategy.tableToClassName( new TableIdentifier(null, null, "MASTER")), foreignKey.getReferencedEntityName() ); - Assert.assertEquals( + assertEquals( JdbcUtil.toIdentifier(this, "CONNECTION"), foreignKey.getTable().getName() ); - Assert.assertEquals( + assertEquals( HibernateUtil.getTable( metadata, JdbcUtil.toIdentifier(this, "MASTER") ), foreignKey.getReferencedTable() ); - Assert.assertNotNull( + assertNotNull( HibernateUtil.getForeignKey( table, JdbcUtil.toIdentifier(this, "CHILDREF1") ) ); - Assert.assertNotNull( + assertNotNull( HibernateUtil.getForeignKey( table, JdbcUtil.toIdentifier(this, "CHILDREF2") ) ); - Assert.assertNull( + assertNull( HibernateUtil.getForeignKey( table, JdbcUtil.toIdentifier(this, "DUMMY") ) ); @@ -86,7 +106,7 @@ public void testMultiRefs() { @Test public void testMasterChild() { - Assert.assertNotNull(HibernateUtil.getTable( + assertNotNull(HibernateUtil.getTable( metadata, JdbcUtil.toIdentifier(this, "MASTER"))); Table child = HibernateUtil.getTable( @@ -94,9 +114,9 @@ public void testMasterChild() { JdbcUtil.toIdentifier(this, "CHILD") ); Iterator iterator = child.getForeignKeyIterator(); ForeignKey fk = (ForeignKey) iterator.next(); - Assert.assertFalse("should only be one fk", iterator.hasNext() ); - Assert.assertEquals(1, fk.getColumnSpan() ); - Assert.assertSame( + assertFalse(iterator.hasNext(), "should only be one fk" ); + assertEquals(1, fk.getColumnSpan() ); + assertSame( fk.getColumn(0), child.getColumn( new Column(JdbcUtil.toIdentifier(this, "MASTERREF")))); From 59edce24332f1df0f6ced66b386974ec53040a27 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 7 Jul 2021 01:42:56 +0200 Subject: [PATCH 344/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.Identity.TestCase' Signed-off-by: Koen Aers --- .../tool/jdbc2cfg/Identity/TestCase.java | 37 ++++++++++++++----- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Identity/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Identity/TestCase.java index 864bff3e19..f628e9df3c 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Identity/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Identity/TestCase.java @@ -1,9 +1,27 @@ /* - * Created on 2004-11-23 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.jdbc2cfg.Identity; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + import java.sql.SQLException; import org.hibernate.boot.Metadata; @@ -11,10 +29,9 @@ import org.hibernate.mapping.SimpleValue; import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; /** * @author max @@ -24,7 +41,7 @@ public class TestCase { private Metadata metadata = null; - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); metadata = MetadataDescriptorFactory @@ -32,7 +49,7 @@ public void setUp() { .createMetadata(); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -41,8 +58,8 @@ public void tearDown() { public void testIdentity() throws SQLException { PersistentClass classMapping = metadata.getEntityBinding("Autoinc"); - Assert.assertNotNull(classMapping); - Assert.assertEquals( + assertNotNull(classMapping); + assertEquals( "identity", ((SimpleValue)classMapping .getIdentifierProperty() @@ -50,7 +67,7 @@ public void testIdentity() throws SQLException { .getIdentifierGeneratorStrategy()); classMapping = metadata.getEntityBinding("Noautoinc"); - Assert.assertEquals( + assertEquals( "assigned", ((SimpleValue)classMapping .getIdentifierProperty() From c1e4f15aecb1a1e99ec18f88a6b3c378ac9ab6d5 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 7 Jul 2021 11:06:27 +0200 Subject: [PATCH 345/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.Index.TestCase' Signed-off-by: Koen Aers --- .../tool/jdbc2cfg/Index/TestCase.java | 65 ++++++++++++------- 1 file changed, 42 insertions(+), 23 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Index/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Index/TestCase.java index 93aa71f68e..b0cd021d46 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Index/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Index/TestCase.java @@ -1,9 +1,30 @@ /* - * Created on 2004-11-24 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.jdbc2cfg.Index; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.util.Iterator; import org.hibernate.boot.Metadata; @@ -14,10 +35,9 @@ import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; /** * @author max @@ -27,7 +47,7 @@ public class TestCase { private Metadata metadata = null; - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); metadata = MetadataDescriptorFactory @@ -35,7 +55,7 @@ public void setUp() { .createMetadata(); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -47,11 +67,11 @@ public void testUniqueKey() { JdbcUtil.toIdentifier(this, "WITH_INDEX") ); UniqueKey uniqueKey = table.getUniqueKey( JdbcUtil.toIdentifier(this, "OTHER_IDX") ); - Assert.assertNotNull(uniqueKey); - Assert.assertEquals(1, uniqueKey.getColumnSpan() ); + assertNotNull(uniqueKey); + assertEquals(1, uniqueKey.getColumnSpan() ); Column keyCol = uniqueKey.getColumn(0); - Assert.assertTrue(keyCol.isUnique() ); - Assert.assertSame(keyCol, table.getColumn(keyCol) ); + assertTrue(keyCol.isUnique() ); + assertSame(keyCol, table.getColumn(keyCol) ); } @Test @@ -59,38 +79,37 @@ public void testWithIndex() { Table table = HibernateUtil.getTable( metadata, JdbcUtil.toIdentifier(this, "WITH_INDEX")); - Assert.assertEquals( + assertEquals( JdbcUtil.toIdentifier(this, "WITH_INDEX"), JdbcUtil.toIdentifier(this, table.getName())); - Assert.assertNull("there should be no pk", table.getPrimaryKey() ); + assertNull(table.getPrimaryKey(), "there should be no pk" ); Iterator iterator = table.getIndexIterator(); int cnt=0; while(iterator.hasNext() ) { iterator.next(); cnt++; } - Assert.assertEquals(1, cnt); + assertEquals(1, cnt); Index index = table.getIndex(JdbcUtil.toIdentifier(this, "MY_INDEX") ); - Assert.assertNotNull("No index ?", index); - Assert.assertEquals( + assertNotNull(index, "No index ?"); + assertEquals( JdbcUtil.toIdentifier(this, "MY_INDEX"), JdbcUtil.toIdentifier(this, index.getName())); - Assert.assertEquals(2, index.getColumnSpan() ); - Assert.assertSame(index.getTable(), table); + assertEquals(2, index.getColumnSpan() ); + assertSame(index.getTable(), table); Iterator cols = index.getColumnIterator(); Column col1 = cols.next(); Column col2 = cols.next(); - Assert.assertEquals( + assertEquals( JdbcUtil.toIdentifier(this, "FIRST"), JdbcUtil.toIdentifier(this, col1.getName())); - Assert.assertEquals( + assertEquals( JdbcUtil.toIdentifier(this, "THIRD"), JdbcUtil.toIdentifier(this, col2.getName())); Column example = new Column(); example.setName(col2.getName() ); - Assert.assertSame( - "column with same name should be same instance!", - table.getColumn(example), col2); + assertSame( + table.getColumn(example), col2, "column with same name should be same instance!"); } } From 11137568e05714a7aad076f575f0fa23ed1cbcdf Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 7 Jul 2021 13:14:20 +0200 Subject: [PATCH 346/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.KeyPropertyCompositeId.TestCase' Signed-off-by: Koen Aers --- .../KeyPropertyCompositeId/TestCase.java | 120 +++++++++++------- 1 file changed, 71 insertions(+), 49 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/TestCase.java index 05850c51e4..a323b0b06d 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/TestCase.java @@ -1,5 +1,30 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.jdbc2cfg.KeyPropertyCompositeId; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + import java.io.File; import java.net.URL; import java.net.URLClassLoader; @@ -27,12 +52,10 @@ import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JavaUtil; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author max @@ -40,13 +63,13 @@ */ public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File temporaryFolder = new File("temp"); private MetadataDescriptor metadataDescriptor = null; private ReverseEngineeringStrategy reverseEngineeringStrategy = null; - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); reverseEngineeringStrategy = new DefaultReverseEngineeringStrategy(); @@ -54,7 +77,7 @@ public void setUp() { .createJdbcDescriptor(reverseEngineeringStrategy, null, false); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this);; } @@ -65,29 +88,29 @@ public void testMultiColumnForeignKeys() { Table table = HibernateUtil.getTable( metadata, JdbcUtil.toIdentifier(this, "LINE_ITEM")); - Assert.assertNotNull(table); + assertNotNull(table); ForeignKey foreignKey = HibernateUtil.getForeignKey(table, JdbcUtil.toIdentifier(this, "TO_CUSTOMER_ORDER")); - Assert.assertNotNull(foreignKey); - Assert.assertEquals( + assertNotNull(foreignKey); + assertEquals( reverseEngineeringStrategy.tableToClassName( new TableIdentifier(null, null, JdbcUtil.toIdentifier(this, "CUSTOMER_ORDER"))), foreignKey.getReferencedEntityName()); - Assert.assertEquals(JdbcUtil.toIdentifier(this, "LINE_ITEM"), foreignKey.getTable().getName()); - Assert.assertEquals(2, foreignKey.getColumnSpan()); - Assert.assertEquals(foreignKey.getColumn(0).getName(), "CUSTOMER_ID_REF"); - Assert.assertEquals(foreignKey.getColumn(1).getName(), "ORDER_NUMBER"); + assertEquals(JdbcUtil.toIdentifier(this, "LINE_ITEM"), foreignKey.getTable().getName()); + assertEquals(2, foreignKey.getColumnSpan()); + assertEquals(foreignKey.getColumn(0).getName(), "CUSTOMER_ID_REF"); + assertEquals(foreignKey.getColumn(1).getName(), "ORDER_NUMBER"); Table tab = HibernateUtil.getTable( metadata, JdbcUtil.toIdentifier(this, "CUSTOMER_ORDER")); - Assert.assertEquals(tab.getPrimaryKey().getColumn(0).getName(), "CUSTOMER_ID"); - Assert.assertEquals(tab.getPrimaryKey().getColumn(1).getName(), "ORDER_NUMBER"); + assertEquals(tab.getPrimaryKey().getColumn(0).getName(), "CUSTOMER_ID"); + assertEquals(tab.getPrimaryKey().getColumn(1).getName(), "ORDER_NUMBER"); PersistentClass lineMapping = metadata.getEntityBinding( reverseEngineeringStrategy .tableToClassName(new TableIdentifier(null, null, JdbcUtil.toIdentifier(this, "LINE_ITEM")))); - Assert.assertEquals(4, lineMapping.getIdentifier().getColumnSpan()); + assertEquals(4, lineMapping.getIdentifier().getColumnSpan()); Iterator columnIterator = lineMapping.getIdentifier().getColumnIterator(); - Assert.assertEquals(((Column) (columnIterator.next())).getName(), "CUSTOMER_ID_REF"); - Assert.assertEquals(((Column) (columnIterator.next())).getName(), "ORDER_NUMBER"); + assertEquals(((Column) (columnIterator.next())).getName(), "CUSTOMER_ID_REF"); + assertEquals(((Column) (columnIterator.next())).getName(), "ORDER_NUMBER"); } @Test @@ -96,24 +119,24 @@ public void testPossibleKeyManyToOne() { reverseEngineeringStrategy .tableToClassName(new TableIdentifier(null, null, JdbcUtil.toIdentifier(this, "CUSTOMER_ORDER")))); Property identifierProperty = product.getIdentifierProperty(); - Assert.assertTrue(identifierProperty.getValue() instanceof Component); + assertTrue(identifierProperty.getValue() instanceof Component); Component cmpid = (Component) identifierProperty.getValue(); - Assert.assertEquals(2, cmpid.getPropertySpan()); + assertEquals(2, cmpid.getPropertySpan()); Iterator iter = cmpid.getPropertyIterator(); Property id = (Property) iter.next(); Property extraId = (Property) iter.next(); - Assert.assertEquals( + assertEquals( reverseEngineeringStrategy.columnToPropertyName( null, "customer"), id.getName()); - Assert.assertEquals( + assertEquals( reverseEngineeringStrategy.columnToPropertyName( null, "orderNumber"), extraId.getName()); - Assert.assertTrue(id.getValue() instanceof ManyToOne); - Assert.assertFalse(extraId.getValue() instanceof ManyToOne); + assertTrue(id.getValue() instanceof ManyToOne); + assertFalse(extraId.getValue() instanceof ManyToOne); } @Test @@ -122,47 +145,46 @@ public void testKeyProperty() { reverseEngineeringStrategy .tableToClassName(new TableIdentifier(null, null, JdbcUtil.toIdentifier(this, "PRODUCT")))); Property identifierProperty = product.getIdentifierProperty(); - Assert.assertTrue(identifierProperty.getValue() instanceof Component); + assertTrue(identifierProperty.getValue() instanceof Component); Component cmpid = (Component) identifierProperty.getValue(); - Assert.assertEquals(2, cmpid.getPropertySpan()); + assertEquals(2, cmpid.getPropertySpan()); Iterator iter = cmpid.getPropertyIterator(); Property id = (Property) iter.next(); Property extraId = (Property) iter.next(); - Assert.assertEquals( + assertEquals( reverseEngineeringStrategy.columnToPropertyName( null, "productId"), id.getName()); - Assert.assertEquals( + assertEquals( reverseEngineeringStrategy.columnToPropertyName( null, "extraId"), extraId.getName()); - Assert.assertFalse(id.getValue() instanceof ManyToOne); - Assert.assertFalse(extraId.getValue() instanceof ManyToOne); + assertFalse(id.getValue() instanceof ManyToOne); + assertFalse(extraId.getValue() instanceof ManyToOne); } @Test public void testGeneration() throws Exception { - final File testFolder = temporaryFolder.getRoot(); Exporter exporter = new HibernateMappingExporter(); exporter.setMetadataDescriptor(metadataDescriptor); - exporter.setOutputDirectory(testFolder); + exporter.setOutputDirectory(temporaryFolder); Exporter javaExp = new POJOExporter(); javaExp.setMetadataDescriptor(metadataDescriptor); - javaExp.setOutputDirectory(testFolder); + javaExp.setOutputDirectory(temporaryFolder); exporter.start(); javaExp.start(); - JavaUtil.compile(testFolder); - URL[] urls = new URL[] { testFolder.toURI().toURL() }; + JavaUtil.compile(temporaryFolder); + URL[] urls = new URL[] { temporaryFolder.toURI().toURL() }; URLClassLoader ucl = new URLClassLoader(urls, Thread.currentThread().getContextClassLoader()); File[] files = new File[6]; - files[0] = new File(testFolder, "Simplecustomerorder.hbm.xml"); - files[1] = new File(testFolder, "Simplelineitem.hbm.xml"); - files[2] = new File(testFolder, "Product.hbm.xml"); - files[3] = new File(testFolder, "Customer.hbm.xml"); - files[4] = new File(testFolder, "Lineitem.hbm.xml"); - files[5] = new File(testFolder, "Customerorder.hbm.xml"); + files[0] = new File(temporaryFolder, "Simplecustomerorder.hbm.xml"); + files[1] = new File(temporaryFolder, "Simplelineitem.hbm.xml"); + files[2] = new File(temporaryFolder, "Product.hbm.xml"); + files[3] = new File(temporaryFolder, "Customer.hbm.xml"); + files[4] = new File(temporaryFolder, "Lineitem.hbm.xml"); + files[5] = new File(temporaryFolder, "Customerorder.hbm.xml"); Thread.currentThread().setContextClassLoader(ucl); SessionFactory factory = MetadataDescriptorFactory .createNativeDescriptor(null, files, null) @@ -172,20 +194,20 @@ public void testGeneration() throws Exception { JdbcUtil.populateDatabase(this);; session.createQuery("from LineItem").getResultList(); List list = session.createQuery("from Product").getResultList(); - Assert.assertEquals(2, list.size()); + assertEquals(2, list.size()); list = session .createQuery("select li.id.customerOrder.id from LineItem as li") .getResultList(); - Assert.assertTrue(list.size() > 0); + assertTrue(list.size() > 0); Class productIdClass = ucl.loadClass("ProductId"); Object object = productIdClass.newInstance(); int hash = -1; try { hash = object.hashCode(); } catch (Throwable t) { - Assert.fail("Hashcode on new instance should not fail " + t); + fail("Hashcode on new instance should not fail " + t); } - Assert.assertFalse("hashcode should be different from system", hash == System.identityHashCode(object)); + assertFalse(hash == System.identityHashCode(object), "hashcode should be different from system"); factory.close(); Thread.currentThread().setContextClassLoader(ucl.getParent()); } From a27c713abb6f48e14644edce2be1f38f651b9e7d Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 7 Jul 2021 13:49:37 +0200 Subject: [PATCH 347/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.ManyToMany.TestCase' Signed-off-by: Koen Aers --- .../tool/jdbc2cfg/ManyToMany/TestCase.java | 120 ++++++++++-------- 1 file changed, 69 insertions(+), 51 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/ManyToMany/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/ManyToMany/TestCase.java index 5273c3e657..c423f3a02b 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/ManyToMany/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/ManyToMany/TestCase.java @@ -1,9 +1,31 @@ /* - * Created on 2004-12-01 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.jdbc2cfg.ManyToMany; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + import java.io.File; import org.hibernate.MappingException; @@ -16,12 +38,10 @@ import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; import org.hibernate.tool.hbm2x.HibernateMappingExporter; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author max @@ -29,15 +49,15 @@ */ public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File temporaryFolder = new File("temp"); - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -53,26 +73,26 @@ public void testNoManyToManyBiDirectional() { PersistentClass project = metadata.getEntityBinding("Project"); - Assert.assertNotNull(project.getProperty("worksOns")); + assertNotNull(project.getProperty("worksOns")); //assertNotNull(project.getProperty("employee")); - Assert.assertEquals(3, project.getPropertyClosureSpan()); - Assert.assertEquals("projectId", project.getIdentifierProperty().getName()); + assertEquals(3, project.getPropertyClosureSpan()); + assertEquals("projectId", project.getIdentifierProperty().getName()); PersistentClass employee = metadata.getEntityBinding("Employee"); - Assert.assertNotNull(employee.getProperty("worksOns")); - Assert.assertNotNull(employee.getProperty("employees")); - Assert.assertNotNull(employee.getProperty("employee")); + assertNotNull(employee.getProperty("worksOns")); + assertNotNull(employee.getProperty("employees")); + assertNotNull(employee.getProperty("employee")); //assertNotNull(employee.getProperty("projects")); - Assert.assertEquals(6, employee.getPropertyClosureSpan()); - Assert.assertEquals("id", employee.getIdentifierProperty().getName()); + assertEquals(6, employee.getPropertyClosureSpan()); + assertEquals("id", employee.getIdentifierProperty().getName()); PersistentClass worksOn = metadata.getEntityBinding("WorksOn"); - Assert.assertNotNull(worksOn.getProperty("project")); - Assert.assertNotNull(worksOn.getProperty("employee")); - Assert.assertEquals(2, worksOn.getPropertyClosureSpan()); - Assert.assertEquals("id", worksOn.getIdentifierProperty().getName()); + assertNotNull(worksOn.getProperty("project")); + assertNotNull(worksOn.getProperty("employee")); + assertEquals(2, worksOn.getPropertyClosureSpan()); + assertEquals("id", worksOn.getIdentifierProperty().getName()); } @Test @@ -81,22 +101,22 @@ public void testAutoCreation() { .createJdbcDescriptor(null, null, true) .createMetadata(); - Assert.assertNull("No middle class should be generated.", metadata.getEntityBinding( "WorksOn" )); + assertNull(metadata.getEntityBinding( "WorksOn" ), "No middle class should be generated."); - Assert.assertNotNull("Should create worksontext since one of the foreign keys is not part of pk", metadata.getEntityBinding( "WorksOnContext" )); + assertNotNull(metadata.getEntityBinding( "WorksOnContext" ), "Should create worksontext since one of the foreign keys is not part of pk"); PersistentClass projectClass = metadata.getEntityBinding("Project"); - Assert.assertNotNull( projectClass ); + assertNotNull( projectClass ); PersistentClass employeeClass = metadata.getEntityBinding("Employee"); - Assert.assertNotNull( employeeClass ); + assertNotNull( employeeClass ); assertPropertyNotExist( projectClass, "worksOns" ); assertPropertyNotExist( employeeClass, "worksOns" ); Property property = employeeClass.getProperty( "projects" ); - Assert.assertNotNull( property); - Assert.assertNotNull( projectClass.getProperty( "employees" )); + assertNotNull( property); + assertNotNull( projectClass.getProperty( "employees" )); } @@ -105,7 +125,7 @@ public void testFalsePositive() { Metadata metadata = MetadataDescriptorFactory .createJdbcDescriptor(null, null, true) .createMetadata(); - Assert.assertNotNull("Middle class should be generated.", metadata.getEntityBinding( "NonMiddle" )); + assertNotNull(metadata.getEntityBinding( "NonMiddle" ), "Middle class should be generated."); } @Test @@ -113,7 +133,7 @@ public void testBuildMappings() { Metadata metadata = MetadataDescriptorFactory .createJdbcDescriptor(null, null, true) .createMetadata(); - Assert.assertNotNull(metadata); + assertNotNull(metadata); } @Test @@ -121,33 +141,31 @@ public void testGenerateAndReadable() { MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createJdbcDescriptor(null, null, true); - File outputDir = temporaryFolder.getRoot(); - - Assert.assertNotNull(metadataDescriptor.createMetadata()); + assertNotNull(metadataDescriptor.createMetadata()); HibernateMappingExporter hme = new HibernateMappingExporter(); hme.setMetadataDescriptor(metadataDescriptor); - hme.setOutputDirectory(outputDir); + hme.setOutputDirectory(temporaryFolder); hme.start(); - assertFileAndExists( new File(outputDir, "Employee.hbm.xml") ); - assertFileAndExists( new File(outputDir, "Project.hbm.xml") ); - assertFileAndExists( new File(outputDir, "WorksOnContext.hbm.xml") ); + assertFileAndExists( new File(temporaryFolder, "Employee.hbm.xml") ); + assertFileAndExists( new File(temporaryFolder, "Project.hbm.xml") ); + assertFileAndExists( new File(temporaryFolder, "WorksOnContext.hbm.xml") ); - assertFileAndExists( new File(outputDir, "RightTable.hbm.xml") ); - assertFileAndExists( new File(outputDir, "LeftTable.hbm.xml") ); - assertFileAndExists( new File(outputDir, "NonMiddle.hbm.xml") ); //Must be there since it has a fkey that is not part of the pk + assertFileAndExists( new File(temporaryFolder, "RightTable.hbm.xml") ); + assertFileAndExists( new File(temporaryFolder, "LeftTable.hbm.xml") ); + assertFileAndExists( new File(temporaryFolder, "NonMiddle.hbm.xml") ); //Must be there since it has a fkey that is not part of the pk - Assert.assertFalse(new File(outputDir, "WorksOn.hbm.xml").exists() ); + assertFalse(new File(temporaryFolder, "WorksOn.hbm.xml").exists() ); - Assert.assertEquals(6, outputDir.listFiles().length); + assertEquals(6, temporaryFolder.listFiles().length); File[] files = new File[3]; - files[0] = new File(outputDir, "Employee.hbm.xml"); - files[1] = new File(outputDir, "Project.hbm.xml"); - files[2] = new File(outputDir, "WorksOnContext.hbm.xml"); + files[0] = new File(temporaryFolder, "Employee.hbm.xml"); + files[1] = new File(temporaryFolder, "Project.hbm.xml"); + files[2] = new File(temporaryFolder, "WorksOnContext.hbm.xml"); - Assert.assertNotNull(MetadataDescriptorFactory + assertNotNull(MetadataDescriptorFactory .createNativeDescriptor(null, files, null) .createMetadata()); @@ -157,16 +175,16 @@ public void testGenerateAndReadable() { private void assertPropertyNotExist(PersistentClass projectClass, String prop) { try { projectClass.getProperty(prop); - Assert.fail("property " + prop + " should not exist on " + projectClass); + fail("property " + prop + " should not exist on " + projectClass); } catch(MappingException e) { // expected } } private void assertFileAndExists(File file) { - Assert.assertTrue(file + " does not exist", file.exists() ); - Assert.assertTrue(file + " not a file", file.isFile() ); - Assert.assertTrue(file + " does not have any contents", file.length()>0); + assertTrue(file.exists(), file + " does not exist" ); + assertTrue(file.isFile(), file + " not a file" ); + assertTrue(file.length()>0, file + " does not have any contents"); } } From 843ef450ec0504fcbeb9cde3cd766a0b6970cf54 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 7 Jul 2021 14:24:05 +0200 Subject: [PATCH 348/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.MetaData.TestCase' Signed-off-by: Koen Aers --- .../tool/jdbc2cfg/MetaData/TestCase.java | 73 ++++++++++--------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/MetaData/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/MetaData/TestCase.java index 877b83a96f..55f568e6db 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/MetaData/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/MetaData/TestCase.java @@ -1,9 +1,29 @@ /* - * Created on 2004-11-23 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.jdbc2cfg.MetaData; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertTrue; + import org.hibernate.boot.Metadata; import org.hibernate.mapping.Column; import org.hibernate.mapping.PrimaryKey; @@ -12,10 +32,9 @@ import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; /** * @author max @@ -25,7 +44,7 @@ public class TestCase { private Metadata metadata = null; - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); metadata = MetadataDescriptorFactory @@ -33,7 +52,7 @@ public void setUp() { .createMetadata(); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -47,24 +66,20 @@ public void testBasic() { Table table = HibernateUtil.getTable( metadata, JdbcUtil.toIdentifier(this, "BASIC" ) ); - Assert.assertEquals( + assertEquals( JdbcUtil.toIdentifier(this, "BASIC"), JdbcUtil.toIdentifier(this, table.getName())); - Assert.assertEquals( 2, table.getColumnSpan() ); + assertEquals( 2, table.getColumnSpan() ); Column basicColumn = table.getColumn( 0 ); - Assert.assertEquals( + assertEquals( JdbcUtil.toIdentifier(this, "A"), JdbcUtil.toIdentifier(this, basicColumn.getName())); - // TODO: we cannot call getSqlType(dialect,cfg) without a - // MappingassertEquals("INTEGER", basicColumn.getSqlType() ); // at - // least on hsqldb - // assertEquals(22, basicColumn.getLength() ); // at least on oracle PrimaryKey key = table.getPrimaryKey(); - Assert.assertNotNull( "There should be a primary key!", key ); - Assert.assertEquals( key.getColumnSpan(), 1 ); + assertNotNull(key, "There should be a primary key!" ); + assertEquals( key.getColumnSpan(), 1 ); Column column = key.getColumn( 0 ); - Assert.assertTrue( column.isUnique() ); - Assert.assertSame( basicColumn, column ); + assertTrue( column.isUnique() ); + assertSame( basicColumn, column ); } @Test @@ -73,32 +88,18 @@ public void testScalePrecisionLength() { metadata, JdbcUtil.toIdentifier(this, "BASIC")); Column nameCol = table.getColumn(new Column( JdbcUtil.toIdentifier(this, "NAME" ) ) ); - Assert.assertEquals( nameCol.getLength(), 20 ); - Assert.assertEquals( nameCol.getPrecision(), Column.DEFAULT_PRECISION ); - Assert.assertEquals( nameCol.getScale(), Column.DEFAULT_SCALE ); + assertEquals( nameCol.getLength(), 20 ); + assertEquals( nameCol.getPrecision(), Column.DEFAULT_PRECISION ); + assertEquals( nameCol.getScale(), Column.DEFAULT_SCALE ); } - /* - * public void testGetTables() { - * - * Table table = new Table(); table.setName("dummy"); cfg.addTable(table); - * - * Table foundTable = cfg.getTable(null,null,"dummy"); - * - * assertSame(table,foundTable); - * - * foundTable = cfg.getTable(null,"dschema", "dummy"); - * - * assertNotSame(table, foundTable); } - */ - @Test public void testCompositeKeys() { Table table = HibernateUtil.getTable( metadata, JdbcUtil.toIdentifier(this, "MULTIKEYED")); PrimaryKey primaryKey = table.getPrimaryKey(); - Assert.assertEquals( 2, primaryKey.getColumnSpan() ); + assertEquals( 2, primaryKey.getColumnSpan() ); } } From 39b83a5a19f67e3796acb74cafae64660489dba4 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 7 Jul 2021 16:57:42 +0200 Subject: [PATCH 349/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.NoPrimaryKey.TestCase' Signed-off-by: Koen Aers --- .../tool/jdbc2cfg/NoPrimaryKey/TestCase.java | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/NoPrimaryKey/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/NoPrimaryKey/TestCase.java index ae5eb821a7..f56f4a8453 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/NoPrimaryKey/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/NoPrimaryKey/TestCase.java @@ -1,17 +1,31 @@ /* - * Created on 2004-11-24 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.jdbc2cfg.NoPrimaryKey; +import static org.junit.jupiter.api.Assertions.assertNotNull; + import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - - +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; /** * @author max @@ -19,19 +33,19 @@ */ public class TestCase { - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @Test public void testMe() { - Assert.assertNotNull( + assertNotNull( MetadataDescriptorFactory .createJdbcDescriptor(null, null, true) .createMetadata()); From 9c69dee8e56e607a8ac34ff492eb62f0c9c672af Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 7 Jul 2021 17:32:17 +0200 Subject: [PATCH 350/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.OneToOne.TestCase' Signed-off-by: Koen Aers --- .../tool/jdbc2cfg/OneToOne/TestCase.java | 120 ++++++++++-------- 1 file changed, 68 insertions(+), 52 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/OneToOne/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/OneToOne/TestCase.java index 403153642f..4d5e621b16 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/OneToOne/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/OneToOne/TestCase.java @@ -1,9 +1,29 @@ /* - * Created on 2004-12-01 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.jdbc2cfg.OneToOne; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import java.net.MalformedURLException; import java.net.URL; @@ -31,12 +51,10 @@ import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JavaUtil; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author max @@ -44,20 +62,20 @@ */ public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputDir = new File("output"); private MetadataDescriptor metadataDescriptor = null; private Metadata metadata = null; - @Before + @BeforeEach public void setUp() throws Exception { JdbcUtil.createDatabase(this); metadataDescriptor = MetadataDescriptorFactory.createJdbcDescriptor(null, null, true); metadata = metadataDescriptor.createMetadata(); } - @After + @AfterEach public void tearDown() throws Exception { JdbcUtil.dropDatabase(this); } @@ -66,68 +84,67 @@ public void tearDown() throws Exception { public void testOneToOneSingleColumnBiDirectional() { PersistentClass person = metadata.getEntityBinding("Person"); Property addressProperty = person.getProperty("addressPerson"); - Assert.assertNotNull(addressProperty); - Assert.assertTrue(addressProperty.getValue() instanceof OneToOne); + assertNotNull(addressProperty); + assertTrue(addressProperty.getValue() instanceof OneToOne); OneToOne oto = (OneToOne) addressProperty.getValue(); - Assert.assertEquals(oto.getColumnSpan(),1); - Assert.assertEquals("Person", oto.getEntityName()); - Assert.assertEquals("AddressPerson", oto.getReferencedEntityName()); - Assert.assertEquals(2, person.getPropertyClosureSpan()); - Assert.assertEquals("personId", person.getIdentifierProperty().getName()); - Assert.assertFalse(oto.isConstrained()); + assertEquals(oto.getColumnSpan(),1); + assertEquals("Person", oto.getEntityName()); + assertEquals("AddressPerson", oto.getReferencedEntityName()); + assertEquals(2, person.getPropertyClosureSpan()); + assertEquals("personId", person.getIdentifierProperty().getName()); + assertFalse(oto.isConstrained()); PersistentClass addressPerson = metadata.getEntityBinding("AddressPerson"); Property personProperty = addressPerson.getProperty("person"); - Assert.assertNotNull(personProperty); - Assert.assertTrue(personProperty.getValue() instanceof OneToOne); + assertNotNull(personProperty); + assertTrue(personProperty.getValue() instanceof OneToOne); oto = (OneToOne) personProperty.getValue(); - Assert.assertTrue(oto.isConstrained()); - Assert.assertEquals(oto.getColumnSpan(),1); - Assert.assertEquals("AddressPerson", oto.getEntityName()); - Assert.assertEquals("Person", oto.getReferencedEntityName()); - Assert.assertEquals(2, addressPerson.getPropertyClosureSpan()); - Assert.assertEquals("addressId", addressPerson.getIdentifierProperty().getName()); + assertTrue(oto.isConstrained()); + assertEquals(oto.getColumnSpan(),1); + assertEquals("AddressPerson", oto.getEntityName()); + assertEquals("Person", oto.getReferencedEntityName()); + assertEquals(2, addressPerson.getPropertyClosureSpan()); + assertEquals("addressId", addressPerson.getIdentifierProperty().getName()); } @Test public void testAddressWithForeignKeyGeneration() { PersistentClass address = metadata.getEntityBinding("AddressPerson"); - Assert.assertEquals("foreign", ((SimpleValue)address.getIdentifier()).getIdentifierGeneratorStrategy()); + assertEquals("foreign", ((SimpleValue)address.getIdentifier()).getIdentifierGeneratorStrategy()); } @Test public void testOneToOneMultiColumnBiDirectional() { PersistentClass person = metadata.getEntityBinding("MultiPerson"); Property addressProperty = person.getProperty("addressMultiPerson"); - Assert.assertNotNull(addressProperty); - Assert.assertTrue(addressProperty.getValue() instanceof OneToOne); + assertNotNull(addressProperty); + assertTrue(addressProperty.getValue() instanceof OneToOne); OneToOne oto = (OneToOne) addressProperty.getValue(); - Assert.assertEquals(oto.getColumnSpan(),2); - Assert.assertEquals("MultiPerson", oto.getEntityName()); - Assert.assertEquals("AddressMultiPerson", oto.getReferencedEntityName()); - Assert.assertFalse(oto.isConstrained()); - Assert.assertEquals(2, person.getPropertyClosureSpan()); - Assert.assertEquals("compositeid gives generic id name", "id", person.getIdentifierProperty().getName()); + assertEquals(oto.getColumnSpan(),2); + assertEquals("MultiPerson", oto.getEntityName()); + assertEquals("AddressMultiPerson", oto.getReferencedEntityName()); + assertFalse(oto.isConstrained()); + assertEquals(2, person.getPropertyClosureSpan()); + assertEquals("id", person.getIdentifierProperty().getName(), "compositeid gives generic id name"); PersistentClass addressPerson = metadata.getEntityBinding("AddressMultiPerson"); Property personProperty = addressPerson.getProperty("multiPerson"); - Assert.assertNotNull(personProperty); - Assert.assertTrue(personProperty.getValue() instanceof OneToOne); + assertNotNull(personProperty); + assertTrue(personProperty.getValue() instanceof OneToOne); oto = (OneToOne) personProperty.getValue(); - Assert.assertEquals(oto.getColumnSpan(),2); - Assert.assertEquals("AddressMultiPerson", oto.getEntityName()); - Assert.assertEquals("MultiPerson", oto.getReferencedEntityName()); - Assert.assertEquals(2, addressPerson.getPropertyClosureSpan()); - Assert.assertEquals("compositeid gives generic id name","id", addressPerson.getIdentifierProperty().getName()); - Assert.assertTrue(oto.isConstrained()); + assertEquals(oto.getColumnSpan(),2); + assertEquals("AddressMultiPerson", oto.getEntityName()); + assertEquals("MultiPerson", oto.getReferencedEntityName()); + assertEquals(2, addressPerson.getPropertyClosureSpan()); + assertEquals("id", addressPerson.getIdentifierProperty().getName(), "compositeid gives generic id name"); + assertTrue(oto.isConstrained()); } @Test public void testBuildMappings() { - Assert.assertNotNull(metadata); + assertNotNull(metadata); } @Test public void testGenerateMappingAndReadable() throws MalformedURLException { - File outputDir = temporaryFolder.getRoot(); HibernateMappingExporter hme = new HibernateMappingExporter(); hme.setMetadataDescriptor(metadataDescriptor); hme.setOutputDirectory(outputDir); @@ -139,7 +156,7 @@ public void testGenerateMappingAndReadable() throws MalformedURLException { assertFileAndExists( new File(outputDir, "MiddleTable.hbm.xml") ); assertFileAndExists( new File(outputDir, "LeftTable.hbm.xml") ); assertFileAndExists( new File(outputDir, "RightTable.hbm.xml") ); - Assert.assertEquals(7, outputDir.listFiles().length); + assertEquals(7, outputDir.listFiles().length); POJOExporter exporter = new POJOExporter(); exporter.setMetadataDescriptor(metadataDescriptor); exporter.setOutputDirectory(outputDir); @@ -175,7 +192,6 @@ public void testGenerateMappingAndReadable() throws MalformedURLException { @Test public void testGenerateAnnotatedClassesAndReadable() throws MappingException, ClassNotFoundException, MalformedURLException { - File outputDir = temporaryFolder.getRoot(); POJOExporter exporter = new POJOExporter(); exporter.setMetadataDescriptor(metadataDescriptor); exporter.setOutputDirectory(outputDir); @@ -189,7 +205,7 @@ public void testGenerateAnnotatedClassesAndReadable() throws MappingException, C assertFileAndExists( new File(outputDir, "AddressMultiPerson.java") ); assertFileAndExists( new File(outputDir, "AddressMultiPersonId.java") ); assertFileAndExists( new File(outputDir, "MultiPerson.java") ); - Assert.assertEquals(9, outputDir.listFiles().length); + assertEquals(9, outputDir.listFiles().length); List paths = new ArrayList(); paths.add(JavaUtil.resolvePathToJarFileFor(Persistence.class)); // for jpa api paths.add(JavaUtil.resolvePathToJarFileFor(Version.class)); // for hibernate core @@ -228,9 +244,9 @@ public void testGenerateAnnotatedClassesAndReadable() throws MappingException, C } private void assertFileAndExists(File file) { - Assert.assertTrue(file + " does not exist", file.exists() ); - Assert.assertTrue(file + " not a file", file.isFile() ); - Assert.assertTrue(file + " does not have any contents", file.length()>0); + assertTrue(file.exists(), file + " does not exist"); + assertTrue(file.isFile(), file + " not a file"); + assertTrue(file.length()>0, file + " does not have any contents"); } } From bca56d008548c3ca320614e5e99e4e9072ef9b52 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 7 Jul 2021 18:04:15 +0200 Subject: [PATCH 351/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.OverrideBinder.TestCase' Signed-off-by: Koen Aers --- .../jdbc2cfg/OverrideBinder/TestCase.java | 320 ++++++++++-------- 1 file changed, 170 insertions(+), 150 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/OverrideBinder/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/OverrideBinder/TestCase.java index 3781b9c7ce..d7ce01f773 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/OverrideBinder/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/OverrideBinder/TestCase.java @@ -1,9 +1,30 @@ /* - * Created on 2004-12-01 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.jdbc2cfg.OverrideBinder; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.sql.Types; import java.util.Iterator; import java.util.List; @@ -30,10 +51,9 @@ import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; /** * @author max @@ -48,7 +68,7 @@ public class TestCase { private Metadata metadata = null; - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); OverrideRepository or = new OverrideRepository(); @@ -60,7 +80,7 @@ public void setUp() { .createMetadata(); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -72,23 +92,23 @@ public void testReadTypeMappings() { or.addResource(TEST_REVENG_XML); ReverseEngineeringStrategy repository = or.getReverseEngineeringStrategy(null); - Assert.assertEquals("int", repository.columnToHibernateTypeName(null, null, Types.INTEGER, 5, SQLTypeMapping.UNKNOWN_PRECISION, SQLTypeMapping.UNKNOWN_SCALE, false, false) ); - Assert.assertEquals("long", repository.columnToHibernateTypeName(null, null, Types.INTEGER, SQLTypeMapping.UNKNOWN_LENGTH, SQLTypeMapping.UNKNOWN_PRECISION, SQLTypeMapping.UNKNOWN_SCALE, false, false) ); - Assert.assertEquals("byte[]", repository.columnToHibernateTypeName(null, null, Types.BIGINT, SQLTypeMapping.UNKNOWN_LENGTH, 5, SQLTypeMapping.UNKNOWN_SCALE, false, false) ); - Assert.assertEquals("java.math.BigInteger", repository.columnToHibernateTypeName(null, null, Types.BIGINT, SQLTypeMapping.UNKNOWN_LENGTH, 2, 3, false, false) ); - Assert.assertEquals("string", repository.columnToHibernateTypeName(null, null, Types.CHAR, 1, 10, SQLTypeMapping.UNKNOWN_SCALE, false, false) ); + assertEquals("int", repository.columnToHibernateTypeName(null, null, Types.INTEGER, 5, SQLTypeMapping.UNKNOWN_PRECISION, SQLTypeMapping.UNKNOWN_SCALE, false, false) ); + assertEquals("long", repository.columnToHibernateTypeName(null, null, Types.INTEGER, SQLTypeMapping.UNKNOWN_LENGTH, SQLTypeMapping.UNKNOWN_PRECISION, SQLTypeMapping.UNKNOWN_SCALE, false, false) ); + assertEquals("byte[]", repository.columnToHibernateTypeName(null, null, Types.BIGINT, SQLTypeMapping.UNKNOWN_LENGTH, 5, SQLTypeMapping.UNKNOWN_SCALE, false, false) ); + assertEquals("java.math.BigInteger", repository.columnToHibernateTypeName(null, null, Types.BIGINT, SQLTypeMapping.UNKNOWN_LENGTH, 2, 3, false, false) ); + assertEquals("string", repository.columnToHibernateTypeName(null, null, Types.CHAR, 1, 10, SQLTypeMapping.UNKNOWN_SCALE, false, false) ); //Assert.assertEquals("string", repository.jdbcToHibernateType(Types.CHAR, 1, SQLTypeMapping.UNKNOWN_PRECISION, SQLTypeMapping.UNKNOWN_SCALE) ); - Assert.assertEquals("Long", repository.columnToHibernateTypeName(null, null, Types.NUMERIC, 1, 10, 0, false, false) ); - Assert.assertEquals("java.lang.Long", repository.columnToHibernateTypeName(null, null, Types.NUMERIC, 1, 10, SQLTypeMapping.UNKNOWN_SCALE, false, false) ); - Assert.assertEquals("java.lang.Long", repository.columnToHibernateTypeName(null, null, Types.NUMERIC, 1, 10, 43, false, false) ); + assertEquals("Long", repository.columnToHibernateTypeName(null, null, Types.NUMERIC, 1, 10, 0, false, false) ); + assertEquals("java.lang.Long", repository.columnToHibernateTypeName(null, null, Types.NUMERIC, 1, 10, SQLTypeMapping.UNKNOWN_SCALE, false, false) ); + assertEquals("java.lang.Long", repository.columnToHibernateTypeName(null, null, Types.NUMERIC, 1, 10, 43, false, false) ); // nullability - Assert.assertEquals("nonnull-float", repository.columnToHibernateTypeName(null, null, Types.FLOAT, SQLTypeMapping.UNKNOWN_LENGTH, SQLTypeMapping.UNKNOWN_PRECISION,17,false, false) ); - Assert.assertEquals("null-float", repository.columnToHibernateTypeName(null, null, Types.FLOAT, SQLTypeMapping.UNKNOWN_LENGTH, SQLTypeMapping.UNKNOWN_PRECISION,17,true, false) ); + assertEquals("nonnull-float", repository.columnToHibernateTypeName(null, null, Types.FLOAT, SQLTypeMapping.UNKNOWN_LENGTH, SQLTypeMapping.UNKNOWN_PRECISION,17,false, false) ); + assertEquals("null-float", repository.columnToHibernateTypeName(null, null, Types.FLOAT, SQLTypeMapping.UNKNOWN_LENGTH, SQLTypeMapping.UNKNOWN_PRECISION,17,true, false) ); - Assert.assertEquals("onlynotnull", repository.columnToHibernateTypeName(null, null, Types.FLOAT, SQLTypeMapping.UNKNOWN_LENGTH, SQLTypeMapping.UNKNOWN_PRECISION,SQLTypeMapping.UNKNOWN_SCALE,false, false) ); - Assert.assertEquals("donotcare", repository.columnToHibernateTypeName(null, null, Types.FLOAT, SQLTypeMapping.UNKNOWN_LENGTH, SQLTypeMapping.UNKNOWN_PRECISION,SQLTypeMapping.UNKNOWN_SCALE,true, false) ); + assertEquals("onlynotnull", repository.columnToHibernateTypeName(null, null, Types.FLOAT, SQLTypeMapping.UNKNOWN_LENGTH, SQLTypeMapping.UNKNOWN_PRECISION,SQLTypeMapping.UNKNOWN_SCALE,false, false) ); + assertEquals("donotcare", repository.columnToHibernateTypeName(null, null, Types.FLOAT, SQLTypeMapping.UNKNOWN_LENGTH, SQLTypeMapping.UNKNOWN_PRECISION,SQLTypeMapping.UNKNOWN_SCALE,true, false) ); } @@ -100,12 +120,12 @@ public void testDocExample() { or.addResource(DOC_REVENG_XML); ReverseEngineeringStrategy repository = or.getReverseEngineeringStrategy(new DefaultReverseEngineeringStrategy()); - Assert.assertEquals("int", repository.columnToHibernateTypeName(null, "ID", Types.INTEGER, SQLTypeMapping.UNKNOWN_LENGTH, 10, SQLTypeMapping.UNKNOWN_SCALE, false, false) ); - Assert.assertEquals("your.package.TrimStringUserType", repository.columnToHibernateTypeName(null, "NAME", Types.VARCHAR, 30, SQLTypeMapping.UNKNOWN_PRECISION, SQLTypeMapping.UNKNOWN_SCALE, true, false) ); - Assert.assertEquals("char", repository.columnToHibernateTypeName(null, "INITIAL", Types.VARCHAR, 1, SQLTypeMapping.UNKNOWN_PRECISION, SQLTypeMapping.UNKNOWN_SCALE, true, false) ); - Assert.assertEquals("java.lang.Character", repository.columnToHibernateTypeName(null, "CODE", Types.VARCHAR, 1, SQLTypeMapping.UNKNOWN_PRECISION, SQLTypeMapping.UNKNOWN_SCALE, false, false) ); - Assert.assertEquals("big_decimal", repository.columnToHibernateTypeName(null, "SALARY", Types.NUMERIC, SQLTypeMapping.UNKNOWN_LENGTH, 15, SQLTypeMapping.UNKNOWN_SCALE, true, false) ); - Assert.assertEquals("java.lang.Long", repository.columnToHibernateTypeName(null, "AGE", Types.NUMERIC, SQLTypeMapping.UNKNOWN_LENGTH, 3, SQLTypeMapping.UNKNOWN_SCALE, true, false) ); + assertEquals("int", repository.columnToHibernateTypeName(null, "ID", Types.INTEGER, SQLTypeMapping.UNKNOWN_LENGTH, 10, SQLTypeMapping.UNKNOWN_SCALE, false, false) ); + assertEquals("your.package.TrimStringUserType", repository.columnToHibernateTypeName(null, "NAME", Types.VARCHAR, 30, SQLTypeMapping.UNKNOWN_PRECISION, SQLTypeMapping.UNKNOWN_SCALE, true, false) ); + assertEquals("char", repository.columnToHibernateTypeName(null, "INITIAL", Types.VARCHAR, 1, SQLTypeMapping.UNKNOWN_PRECISION, SQLTypeMapping.UNKNOWN_SCALE, true, false) ); + assertEquals("java.lang.Character", repository.columnToHibernateTypeName(null, "CODE", Types.VARCHAR, 1, SQLTypeMapping.UNKNOWN_PRECISION, SQLTypeMapping.UNKNOWN_SCALE, false, false) ); + assertEquals("big_decimal", repository.columnToHibernateTypeName(null, "SALARY", Types.NUMERIC, SQLTypeMapping.UNKNOWN_LENGTH, 15, SQLTypeMapping.UNKNOWN_SCALE, true, false) ); + assertEquals("java.lang.Long", repository.columnToHibernateTypeName(null, "AGE", Types.NUMERIC, SQLTypeMapping.UNKNOWN_LENGTH, 3, SQLTypeMapping.UNKNOWN_SCALE, true, false) ); } @@ -118,29 +138,29 @@ public void testSchemaSelection() { List schemaSelectors = repository.getSchemaSelections(); - Assert.assertNotNull(schemaSelectors); - Assert.assertEquals(4,schemaSelectors.size()); + assertNotNull(schemaSelectors); + assertEquals(4,schemaSelectors.size()); SchemaSelection ss; ss = (SchemaSelection) schemaSelectors.get(0); - Assert.assertEquals(null,ss.getMatchCatalog()); - Assert.assertEquals(null,ss.getMatchSchema()); - Assert.assertEquals(null,ss.getMatchTable()); + assertEquals(null,ss.getMatchCatalog()); + assertEquals(null,ss.getMatchSchema()); + assertEquals(null,ss.getMatchTable()); ss = (SchemaSelection) schemaSelectors.get(1); - Assert.assertEquals(null,ss.getMatchCatalog()); - Assert.assertEquals("OVRTEST",ss.getMatchSchema()); - Assert.assertEquals(null,ss.getMatchTable()); + assertEquals(null,ss.getMatchCatalog()); + assertEquals("OVRTEST",ss.getMatchSchema()); + assertEquals(null,ss.getMatchTable()); ss = (SchemaSelection) schemaSelectors.get(2); - Assert.assertEquals("UBERCATALOG",ss.getMatchCatalog()); - Assert.assertEquals("OVRTEST",ss.getMatchSchema()); - Assert.assertEquals(null,ss.getMatchTable()); + assertEquals("UBERCATALOG",ss.getMatchCatalog()); + assertEquals("OVRTEST",ss.getMatchSchema()); + assertEquals(null,ss.getMatchTable()); ss = (SchemaSelection) schemaSelectors.get(3); - Assert.assertEquals("PUBLIC.*",ss.getMatchCatalog()); - Assert.assertEquals("OVRTEST",ss.getMatchSchema()); - Assert.assertEquals(".*",ss.getMatchTable()); + assertEquals("PUBLIC.*",ss.getMatchCatalog()); + assertEquals("OVRTEST",ss.getMatchSchema()); + assertEquals(".*",ss.getMatchTable()); OverrideRepository ox = new OverrideRepository(); ox.addSchemaSelection(new SchemaSelection(null, null, "DUMMY.*")); @@ -151,8 +171,8 @@ public void testSchemaSelection() { Iterator
tableMappings = md.collectTableMappings().iterator(); Table t = (Table) tableMappings.next(); - Assert.assertEquals(t.getName(), "DUMMY"); - Assert.assertFalse(tableMappings.hasNext()); + assertEquals(t.getName(), "DUMMY"); + assertFalse(tableMappings.hasNext()); } @Test @@ -162,24 +182,24 @@ public void testColumnTypeMappings() { or.addResource(OVERRIDETEST_REVENG_XML); ReverseEngineeringStrategy repository = or.getReverseEngineeringStrategy(null); - Assert.assertNull(repository.columnToHibernateTypeName(new TableIdentifier("blah"), "bogus",0,0,0,0, false, false)); - Assert.assertNull(repository.columnToHibernateTypeName(new TableIdentifier("ORDERS"), "CUSTID",0,0,0,0, false, false)); - Assert.assertEquals("string", repository.columnToHibernateTypeName(new TableIdentifier(null, null, "ORDERS"), "NAME",0,0,0,0, false, false)); + assertNull(repository.columnToHibernateTypeName(new TableIdentifier("blah"), "bogus",0,0,0,0, false, false)); + assertNull(repository.columnToHibernateTypeName(new TableIdentifier("ORDERS"), "CUSTID",0,0,0,0, false, false)); + assertEquals("string", repository.columnToHibernateTypeName(new TableIdentifier(null, null, "ORDERS"), "NAME",0,0,0,0, false, false)); PersistentClass classMapping = metadata.getEntityBinding("Orders"); Property property = classMapping.getProperty("completed"); - Assert.assertEquals("boolean because of not null", "boolean", ((SimpleValue)property.getValue()).getTypeName()); + assertEquals("boolean", ((SimpleValue)property.getValue()).getTypeName(), "boolean because of not null"); property = classMapping.getProperty("verified"); - Assert.assertEquals("java.lang.Boolean because of null","java.lang.Boolean", ((SimpleValue)property.getValue()).getTypeName()); + assertEquals("java.lang.Boolean", ((SimpleValue)property.getValue()).getTypeName(), "java.lang.Boolean because of null"); classMapping = metadata.getEntityBinding("MiscTypes"); property = classMapping.getIdentifierProperty(); - Assert.assertFalse(((SimpleValue)property.getValue()).isNullable()); - Assert.assertEquals("java.lang.Long because of primary key", "java.lang.Long", ((SimpleValue)property.getValue()).getTypeName()); + assertFalse(((SimpleValue)property.getValue()).isNullable()); + assertEquals("java.lang.Long", ((SimpleValue)property.getValue()).getTypeName(), "java.lang.Long because of primary key"); } @Test @@ -189,18 +209,18 @@ public void testColumnPropertyNameMappings() { or.addResource(OVERRIDETEST_REVENG_XML); ReverseEngineeringStrategy repository = or.getReverseEngineeringStrategy(null); - Assert.assertNull(repository.columnToPropertyName(new TableIdentifier("blah"), "bogus")); - Assert.assertNull(repository.columnToPropertyName(new TableIdentifier("ORDERS"), "cust_id")); - Assert.assertEquals("orderName", repository.columnToPropertyName(new TableIdentifier(null, null, "ORDERS"), "NAME")); + assertNull(repository.columnToPropertyName(new TableIdentifier("blah"), "bogus")); + assertNull(repository.columnToPropertyName(new TableIdentifier("ORDERS"), "cust_id")); + assertEquals("orderName", repository.columnToPropertyName(new TableIdentifier(null, null, "ORDERS"), "NAME")); } @Test public void testMetaAttributeMappings() { PersistentClass classMapping = metadata.getEntityBinding( "Orders" ); - Assert.assertEquals("order table value", classMapping.getMetaAttribute( "order-meta" ).getValue()); + assertEquals("order table value", classMapping.getMetaAttribute( "order-meta" ).getValue()); Property property = classMapping.getProperty("orderName"); - Assert.assertEquals("order column value", property.getMetaAttribute( "order-meta" ).getValue()); + assertEquals("order column value", property.getMetaAttribute( "order-meta" ).getValue()); //TODO: test sequence of meta } @@ -212,46 +232,46 @@ public void testIdGenerator() { ReverseEngineeringStrategy repository = or.getReverseEngineeringStrategy(null); TableIdentifier miscTable = new TableIdentifier(null,null, "MISC_TYPES"); - Assert.assertEquals("sequence",repository.getTableIdentifierStrategyName(miscTable)); + assertEquals("sequence",repository.getTableIdentifierStrategyName(miscTable)); Map props = repository.getTableIdentifierProperties(miscTable); - Assert.assertEquals("seq_table", props.get("table")); + assertEquals("seq_table", props.get("table")); - Assert.assertNull(repository.getTableIdentifierStrategyName(new TableIdentifier("blah"))); - Assert.assertNull(repository.getTableIdentifierProperties(new TableIdentifier("blah"))); + assertNull(repository.getTableIdentifierStrategyName(new TableIdentifier("blah"))); + assertNull(repository.getTableIdentifierProperties(new TableIdentifier("blah"))); TableIdentifier ordersTable = new TableIdentifier(null,null, "ORDERS"); - Assert.assertEquals("customOrderId", repository.tableToIdentifierPropertyName(ordersTable)); - Assert.assertEquals(null, repository.tableToIdentifierPropertyName(new TableIdentifier("blah"))); + assertEquals("customOrderId", repository.tableToIdentifierPropertyName(ordersTable)); + assertEquals(null, repository.tableToIdentifierPropertyName(new TableIdentifier("blah"))); - Assert.assertEquals("CustomOID", repository.tableToCompositeIdName(ordersTable)); - Assert.assertEquals(null, repository.tableToCompositeIdName(new TableIdentifier("blah"))); + assertEquals("CustomOID", repository.tableToCompositeIdName(ordersTable)); + assertEquals(null, repository.tableToCompositeIdName(new TableIdentifier("blah"))); List primaryKeyColumnNames = repository.getPrimaryKeyColumnNames(new TableIdentifier("blah")); - Assert.assertNull(primaryKeyColumnNames); + assertNull(primaryKeyColumnNames); primaryKeyColumnNames = repository.getPrimaryKeyColumnNames(ordersTable); - Assert.assertNotNull(primaryKeyColumnNames); - Assert.assertEquals(2, primaryKeyColumnNames.size()); - Assert.assertEquals("ORDERID", primaryKeyColumnNames.get(0)); - Assert.assertEquals("CUSTID", primaryKeyColumnNames.get(1)); - Assert.assertFalse(repository.excludeColumn(ordersTable, "CUSTID")); + assertNotNull(primaryKeyColumnNames); + assertEquals(2, primaryKeyColumnNames.size()); + assertEquals("ORDERID", primaryKeyColumnNames.get(0)); + assertEquals("CUSTID", primaryKeyColumnNames.get(1)); + assertFalse(repository.excludeColumn(ordersTable, "CUSTID")); // applied PersistentClass classMapping = metadata.getEntityBinding("Orders"); SimpleValue sv = (SimpleValue) classMapping.getIdentifier(); - Assert.assertEquals("CustomOID", ((Component)sv).getComponentClassName()); + assertEquals("CustomOID", ((Component)sv).getComponentClassName()); - Assert.assertEquals(2,classMapping.getIdentifierProperty().getColumnSpan()); + assertEquals(2,classMapping.getIdentifierProperty().getColumnSpan()); Property identifierProperty = classMapping.getIdentifierProperty(); - Assert.assertEquals("customOrderId", identifierProperty.getName()); + assertEquals("customOrderId", identifierProperty.getName()); classMapping = metadata.getEntityBinding("MiscTypes"); sv = (SimpleValue) classMapping.getIdentifier(); - Assert.assertEquals("sequence", sv.getIdentifierGeneratorStrategy()); // will fail if default schema is not set since then there is no match in the override binder + assertEquals("sequence", sv.getIdentifierGeneratorStrategy()); // will fail if default schema is not set since then there is no match in the override binder - Assert.assertNotNull(sv.getIdentifierGeneratorProperties()); - Assert.assertEquals("seq_table", sv.getIdentifierGeneratorProperties().getProperty("table")); + assertNotNull(sv.getIdentifierGeneratorProperties()); + assertEquals("seq_table", sv.getIdentifierGeneratorProperties().getProperty("table")); } @@ -262,11 +282,11 @@ public void testReadExcludeTables() { or.addResource(OVERRIDETEST_REVENG_XML); ReverseEngineeringStrategy repository = or.getReverseEngineeringStrategy(null); - Assert.assertTrue(repository.excludeTable(new TableIdentifier(null,null, "DoNotWantIt") ) ); - Assert.assertFalse(repository.excludeTable(new TableIdentifier(null,null, "NotListedThere") ) ); - Assert.assertFalse(repository.excludeTable(new TableIdentifier("cat","sch", "WantedTable") ) ); - Assert.assertFalse(repository.excludeTable(new TableIdentifier("BAD","SCHEMA", "WantedTable") ) ); - Assert.assertTrue(repository.excludeTable(new TableIdentifier("BAD","SCHEMA", "SomethingElse") ) ); + assertTrue(repository.excludeTable(new TableIdentifier(null,null, "DoNotWantIt") ) ); + assertFalse(repository.excludeTable(new TableIdentifier(null,null, "NotListedThere") ) ); + assertFalse(repository.excludeTable(new TableIdentifier("cat","sch", "WantedTable") ) ); + assertFalse(repository.excludeTable(new TableIdentifier("BAD","SCHEMA", "WantedTable") ) ); + assertTrue(repository.excludeTable(new TableIdentifier("BAD","SCHEMA", "SomethingElse") ) ); } @@ -277,28 +297,28 @@ public void testReadPackageName() { or.addResource(OVERRIDETEST_REVENG_XML); ReverseEngineeringStrategy repository = or.getReverseEngineeringStrategy(new DefaultReverseEngineeringStrategy()); - Assert.assertEquals("org.werd.Q", repository.tableToClassName(new TableIdentifier("q","Werd", "Q") ) ); - Assert.assertEquals("Notknown", repository.tableToClassName(new TableIdentifier(null,null, "notknown") ) ); + assertEquals("org.werd.Q", repository.tableToClassName(new TableIdentifier("q","Werd", "Q") ) ); + assertEquals("Notknown", repository.tableToClassName(new TableIdentifier(null,null, "notknown") ) ); - Assert.assertEquals("org.werd.MyWorld", repository.tableToClassName(new TableIdentifier(null,"Werd", "TBL_PKG") ) ); - Assert.assertEquals("other.MyWorld", repository.tableToClassName(new TableIdentifier(null,"Werd", "TBL_OTHER") ) ); + assertEquals("org.werd.MyWorld", repository.tableToClassName(new TableIdentifier(null,"Werd", "TBL_PKG") ) ); + assertEquals("other.MyWorld", repository.tableToClassName(new TableIdentifier(null,"Werd", "TBL_OTHER") ) ); } @Test public void testRevEngExclude() { - Assert.assertNull(HibernateUtil.getTable( + assertNull(HibernateUtil.getTable( metadata, JdbcUtil.toIdentifier(this, "DEFUNCT_TABLE") ) ); Table foundTable = HibernateUtil.getTable( metadata, JdbcUtil.toIdentifier(this, "INTHEMIDDLE") ); - Assert.assertNotNull(foundTable); + assertNotNull(foundTable); Iterator fkiter = foundTable.getForeignKeyIterator(); ForeignKey fk1 = (ForeignKey) fkiter.next(); - Assert.assertNotNull(fk1); - Assert.assertFalse(fkiter.hasNext() ); + assertNotNull(fk1); + assertFalse(fkiter.hasNext() ); } @@ -312,25 +332,25 @@ public void testSQLTypeMappingComparisons() { SQLTypeMapping morespecific = new SQLTypeMapping(Types.BIGINT, 2, 3, 4, Boolean.TRUE); SQLTypeMapping equalmorespecific = new SQLTypeMapping(Types.BIGINT, 2, 3, 4, Boolean.TRUE); - Assert.assertFalse(one.equals(two) ); - Assert.assertFalse(two.equals(one) ); - Assert.assertTrue(two.equals(two) ); - Assert.assertTrue(one.equals(one) ); - Assert.assertTrue(morespecific.equals(equalmorespecific)); + assertFalse(one.equals(two) ); + assertFalse(two.equals(one) ); + assertTrue(two.equals(two) ); + assertTrue(one.equals(one) ); + assertTrue(morespecific.equals(equalmorespecific)); - Assert.assertEquals(-1, one.compareTo(two) ); - Assert.assertEquals(1, two.compareTo(one) ); + assertEquals(-1, one.compareTo(two) ); + assertEquals(1, two.compareTo(one) ); - Assert.assertEquals(1, generic.compareTo(one) ); - Assert.assertEquals(1, generic.compareTo(two) ); - Assert.assertEquals(1, generic.compareTo(specific) ); + assertEquals(1, generic.compareTo(one) ); + assertEquals(1, generic.compareTo(two) ); + assertEquals(1, generic.compareTo(specific) ); - Assert.assertEquals(-1, specific.compareTo(one) ); - Assert.assertEquals(-1, specific.compareTo(two) ); - Assert.assertEquals(-1, specific.compareTo(generic) ); - Assert.assertEquals(1, specific.compareTo(morespecific) ); - Assert.assertEquals(-1, morespecific.compareTo(specific) ); + assertEquals(-1, specific.compareTo(one) ); + assertEquals(-1, specific.compareTo(two) ); + assertEquals(-1, specific.compareTo(generic) ); + assertEquals(1, specific.compareTo(morespecific) ); + assertEquals(-1, morespecific.compareTo(specific) ); } @@ -351,9 +371,9 @@ public void testSqlTypeOverride() { or.addTypeMapping(sqltype); ReverseEngineeringStrategy res = or.getReverseEngineeringStrategy(null); - Assert.assertEquals("boolean",res.columnToHibernateTypeName(null,null, Types.BINARY, 1, SQLTypeMapping.UNKNOWN_PRECISION, SQLTypeMapping.UNKNOWN_SCALE, false, false) ); - Assert.assertEquals(null,res.columnToHibernateTypeName(null,null, Types.LONGVARCHAR, 1, SQLTypeMapping.UNKNOWN_PRECISION, SQLTypeMapping.UNKNOWN_SCALE, false, false) ); - Assert.assertEquals("yes_no",res.columnToHibernateTypeName(null,null, Types.BIT, SQLTypeMapping.UNKNOWN_LENGTH, SQLTypeMapping.UNKNOWN_PRECISION, SQLTypeMapping.UNKNOWN_SCALE, false, false) ); + assertEquals("boolean",res.columnToHibernateTypeName(null,null, Types.BINARY, 1, SQLTypeMapping.UNKNOWN_PRECISION, SQLTypeMapping.UNKNOWN_SCALE, false, false) ); + assertEquals(null,res.columnToHibernateTypeName(null,null, Types.LONGVARCHAR, 1, SQLTypeMapping.UNKNOWN_PRECISION, SQLTypeMapping.UNKNOWN_SCALE, false, false) ); + assertEquals("yes_no",res.columnToHibernateTypeName(null,null, Types.BIT, SQLTypeMapping.UNKNOWN_LENGTH, SQLTypeMapping.UNKNOWN_PRECISION, SQLTypeMapping.UNKNOWN_SCALE, false, false) ); } @Test @@ -361,18 +381,18 @@ public void testTableExclude() { TableFilter tf = new TableFilter(); tf.setMatchName("max"); tf.setExclude(Boolean.TRUE); - Assert.assertTrue(tf.exclude(new TableIdentifier("max") ).booleanValue() ); - Assert.assertNull(tf.exclude(new TableIdentifier("maxnotexact") ) ); + assertTrue(tf.exclude(new TableIdentifier("max") ).booleanValue() ); + assertNull(tf.exclude(new TableIdentifier("maxnotexact") ) ); tf.setMatchName(".*max"); - Assert.assertTrue(tf.exclude(new TableIdentifier("max") ).booleanValue() ); - Assert.assertNull(tf.exclude(new TableIdentifier("maxnotending") ) ); - Assert.assertTrue(tf.exclude(new TableIdentifier("endingWithmax") ).booleanValue() ); + assertTrue(tf.exclude(new TableIdentifier("max") ).booleanValue() ); + assertNull(tf.exclude(new TableIdentifier("maxnotending") ) ); + assertTrue(tf.exclude(new TableIdentifier("endingWithmax") ).booleanValue() ); tf.setMatchName("max.*"); - Assert.assertTrue(tf.exclude(new TableIdentifier("max") ).booleanValue() ); + assertTrue(tf.exclude(new TableIdentifier("max") ).booleanValue() ); tf.setMatchName(".*max.*"); - Assert.assertTrue(tf.exclude(new TableIdentifier("max") ).booleanValue() ); - Assert.assertNull(tf.exclude(new TableIdentifier("notxam") ) ); - Assert.assertTrue(tf.exclude(new TableIdentifier("heremaxsub") ).booleanValue() ); + assertTrue(tf.exclude(new TableIdentifier("max") ).booleanValue() ); + assertNull(tf.exclude(new TableIdentifier("notxam") ) ); + assertTrue(tf.exclude(new TableIdentifier("heremaxsub") ).booleanValue() ); } @Test @@ -383,15 +403,15 @@ public void testColumnExclude() { ReverseEngineeringStrategy reverseEngineeringStrategy = or.getReverseEngineeringStrategy(); - Assert.assertFalse(reverseEngineeringStrategy.excludeColumn(new TableIdentifier("EXCOLUMNS"), "blah")); - Assert.assertFalse(reverseEngineeringStrategy.excludeColumn(new TableIdentifier("EXCOLUMNS"), "NAME")); - Assert.assertTrue(reverseEngineeringStrategy.excludeColumn(new TableIdentifier("EXCOLUMNS"), "EXCOLUMN")); + assertFalse(reverseEngineeringStrategy.excludeColumn(new TableIdentifier("EXCOLUMNS"), "blah")); + assertFalse(reverseEngineeringStrategy.excludeColumn(new TableIdentifier("EXCOLUMNS"), "NAME")); + assertTrue(reverseEngineeringStrategy.excludeColumn(new TableIdentifier("EXCOLUMNS"), "EXCOLUMN")); Table table = HibernateUtil.getTable(metadata, JdbcUtil.toIdentifier(this, "EXCOLUMNS")); - Assert.assertNotNull(table); + assertNotNull(table); - Assert.assertNotNull(table.getColumn(new Column("name"))); - Assert.assertNull(table.getColumn(new Column("excolumn"))); + assertNotNull(table.getColumn(new Column("name"))); + assertNull(table.getColumn(new Column("excolumn"))); } @@ -402,7 +422,7 @@ public void testSimpleUserDefinedForeignKeys() { Iterator foreignKeyIterator = table.getForeignKeyIterator(); ForeignKey fk = (ForeignKey) foreignKeyIterator.next(); - Assert.assertEquals(fk.getReferencedTable().getName(), JdbcUtil.toIdentifier(this, "CUSTOMER") ); + assertEquals(fk.getReferencedTable().getName(), JdbcUtil.toIdentifier(this, "CUSTOMER") ); PersistentClass classMapping = metadata.getEntityBinding("Orders"); classMapping.getProperty("customer"); @@ -419,13 +439,13 @@ public void testCompositeUserDefinedForeignKeys() { Iterator foreignKeyIterator = table.getForeignKeyIterator(); ForeignKey fk = (ForeignKey) foreignKeyIterator.next(); - Assert.assertEquals(fk.getReferencedTable().getName(), JdbcUtil.toIdentifier(this, "PARENT") ); - Assert.assertEquals(2, fk.getReferencedColumns().size()); - Assert.assertEquals("child_to_parent", fk.getName()); + assertEquals(fk.getReferencedTable().getName(), JdbcUtil.toIdentifier(this, "PARENT") ); + assertEquals(2, fk.getReferencedColumns().size()); + assertEquals("child_to_parent", fk.getName()); PersistentClass classMapping = metadata.getEntityBinding("Children"); Property property = classMapping.getProperty("propertyParent"); - Assert.assertEquals(2,property.getColumnSpan()); + assertEquals(2,property.getColumnSpan()); classMapping = metadata.getEntityBinding("Parent"); property = classMapping.getProperty("propertyChildren"); @@ -435,13 +455,13 @@ public void testCompositeUserDefinedForeignKeys() { @Test public void testTypes() { PersistentClass classMapping = metadata.getEntityBinding("MiscTypes"); - Assert.assertEquals( + assertEquals( "SomeUserType", ((SimpleValue)classMapping.getProperty("name").getValue()).getTypeName()); - Assert.assertEquals( + assertEquals( "string", ((SimpleValue)classMapping.getProperty("shortname").getValue()).getTypeName()); - Assert.assertEquals( + assertEquals( "yes_no", ((SimpleValue)classMapping.getProperty("flag").getValue()).getTypeName()); } @@ -452,7 +472,7 @@ public void testTableToClass() { ReverseEngineeringStrategy res = new OverrideRepository().addResource(OVERRIDETEST_REVENG_XML).getReverseEngineeringStrategy(new DefaultReverseEngineeringStrategy()); TableIdentifier tableIdentifier = new TableIdentifier(null, null, "TblTest"); - Assert.assertEquals("org.test.Test", res.tableToClassName(tableIdentifier)); + assertEquals("org.test.Test", res.tableToClassName(tableIdentifier)); tableIdentifier = new TableIdentifier( Environment @@ -460,10 +480,10 @@ public void testTableToClass() { .getProperty(AvailableSettings.DEFAULT_CATALOG), "Werd", "Testy"); - Assert.assertEquals("org.werd.Testy", res.tableToClassName(tableIdentifier)); + assertEquals("org.werd.Testy", res.tableToClassName(tableIdentifier)); tableIdentifier = new TableIdentifier(null, null, "Nothing"); - Assert.assertEquals("Nothing", res.tableToClassName(tableIdentifier)); + assertEquals("Nothing", res.tableToClassName(tableIdentifier)); } @@ -474,11 +494,11 @@ public void testMetaAttributes() { TableIdentifier tableIdentifier = new TableIdentifier(null, null, "TblTest"); Map attributes = res.tableToMetaAttributes(tableIdentifier); - Assert.assertNotNull(attributes); - Assert.assertEquals(attributes.size(),1); + assertNotNull(attributes); + assertEquals(attributes.size(),1); MetaAttribute ma = (MetaAttribute) attributes.get("use-in-test"); - Assert.assertEquals(ma.getName(), "use-in-test"); - Assert.assertEquals(ma.getValue(), "true"); + assertEquals(ma.getName(), "use-in-test"); + assertEquals(ma.getValue(), "true"); tableIdentifier = new TableIdentifier( Environment @@ -487,34 +507,34 @@ public void testMetaAttributes() { "Werd", "Testy"); attributes = res.tableToMetaAttributes( tableIdentifier ); - Assert.assertNotNull(attributes); + assertNotNull(attributes); ma = attributes.get( "werd-meta" ); - Assert.assertEquals(ma.getName(), "werd-meta"); - Assert.assertEquals(ma.getValues().size(), 2); + assertEquals(ma.getName(), "werd-meta"); + assertEquals(ma.getValues().size(), 2); tableIdentifier = new TableIdentifier(null, "Werd", "MetaTable"); attributes = res.tableToMetaAttributes( tableIdentifier ); - Assert.assertNotNull(attributes); - Assert.assertEquals(2, attributes.size()); + assertNotNull(attributes); + assertEquals(2, attributes.size()); ma = attributes.get("specific-werd"); - Assert.assertEquals(ma.getName(), "specific-werd"); - Assert.assertEquals(ma.getValue(), "a one"); + assertEquals(ma.getName(), "specific-werd"); + assertEquals(ma.getValue(), "a one"); ma = attributes.get( "werd-meta" ); - Assert.assertEquals(ma.getName(), "werd-meta"); - Assert.assertEquals(1, ma.getValues().size()); // as long as no inherit this should be one - Assert.assertEquals("value three", ma.getValue()); + assertEquals(ma.getName(), "werd-meta"); + assertEquals(1, ma.getValues().size()); // as long as no inherit this should be one + assertEquals("value three", ma.getValue()); tableIdentifier = new TableIdentifier(null, null, "Nothing"); - Assert.assertEquals(null, res.tableToMetaAttributes(tableIdentifier)); + assertEquals(null, res.tableToMetaAttributes(tableIdentifier)); - Assert.assertNull(res.columnToMetaAttributes(new TableIdentifier("Nothing"), "bogus")); - Assert.assertNull(res.columnToMetaAttributes( new TableIdentifier(null, "Werd", "MetaTable"), "bogusColumn" )); + assertNull(res.columnToMetaAttributes(new TableIdentifier("Nothing"), "bogus")); + assertNull(res.columnToMetaAttributes( new TableIdentifier(null, "Werd", "MetaTable"), "bogusColumn" )); attributes = res.columnToMetaAttributes( new TableIdentifier(null, "Werd", "MetaTable"), "MetaColumn" ); - Assert.assertEquals(1, attributes.size()); + assertEquals(1, attributes.size()); ma = attributes.get("specific-column"); - Assert.assertEquals("specific-column",ma.getName()); - Assert.assertEquals("yes a column with meta",ma.getValue()); + assertEquals("specific-column",ma.getName()); + assertEquals("yes a column with meta",ma.getValue()); } From 4d979fe6070901eeec7c73c02d3aa3218a74b7a4 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 7 Jul 2021 22:12:16 +0200 Subject: [PATCH 352/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.Performance.TestCase' Signed-off-by: Koen Aers --- .../tool/jdbc2cfg/Performance/TestCase.java | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Performance/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Performance/TestCase.java index f367a520a6..89f7ecbd44 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Performance/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Performance/TestCase.java @@ -1,9 +1,26 @@ /* - * Created on 2004-11-23 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.jdbc2cfg.Performance; +import static org.junit.jupiter.api.Assertions.assertEquals; + import java.sql.SQLException; import org.hibernate.boot.Metadata; @@ -11,10 +28,9 @@ import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; import org.hibernate.tools.test.util.JUnitUtil; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; /** * @author max @@ -25,12 +41,12 @@ public class TestCase { private static final int TABLECOUNT = 200; private static final int COLCOUNT = 10; - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -45,7 +61,7 @@ public void testBasic() throws SQLException { metadata.collectTableMappings().iterator(), TABLECOUNT); Table tab = (Table) metadata.collectTableMappings().iterator().next(); - Assert.assertEquals(tab.getColumnSpan(), COLCOUNT+1); + assertEquals(tab.getColumnSpan(), COLCOUNT+1); } } From 4aa0f951292041505e239c0a33daf6d050607ce4 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 7 Jul 2021 22:53:52 +0200 Subject: [PATCH 353/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.PersistentClasses.TestCase' Signed-off-by: Koen Aers --- .../tool/jdbc2cfg/PersistentClasses/Item.java | 20 ++++- .../jdbc2cfg/PersistentClasses/Orders.java | 20 ++++- .../jdbc2cfg/PersistentClasses/TestCase.java | 77 ++++++++++++------- 3 files changed, 86 insertions(+), 31 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/PersistentClasses/Item.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/PersistentClasses/Item.java index dfecf2e303..340b041de8 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/PersistentClasses/Item.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/PersistentClasses/Item.java @@ -1,4 +1,22 @@ - +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.jdbc2cfg.PersistentClasses; public class Item { diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/PersistentClasses/Orders.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/PersistentClasses/Orders.java index 27734faf38..7f9d0c10f9 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/PersistentClasses/Orders.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/PersistentClasses/Orders.java @@ -1,4 +1,22 @@ - +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.jdbc2cfg.PersistentClasses; import java.util.HashSet; import java.util.Set; diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/PersistentClasses/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/PersistentClasses/TestCase.java index 5ec29d6867..dd1151efb5 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/PersistentClasses/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/PersistentClasses/TestCase.java @@ -1,9 +1,29 @@ /* - * Created on 2004-11-23 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.jdbc2cfg.PersistentClasses; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.sql.SQLException; import org.hibernate.Hibernate; @@ -24,10 +44,9 @@ import org.hibernate.mapping.Set; import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; /** * @author max @@ -39,7 +58,7 @@ public class TestCase { private Metadata metadata = null; - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); DefaultReverseEngineeringStrategy c = new DefaultReverseEngineeringStrategy(); @@ -49,7 +68,7 @@ public void setUp() { .createMetadata(); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -57,22 +76,22 @@ public void tearDown() { @Test public void testCreatePersistentClasses() { PersistentClass classMapping = metadata.getEntityBinding(PACKAGE_NAME + ".Orders"); - Assert.assertNotNull("class not found", classMapping); + assertNotNull(classMapping, "class not found"); KeyValue identifier = classMapping.getIdentifier(); - Assert.assertNotNull(identifier); + assertNotNull(identifier); } @Test public void testCreateManyToOne() { PersistentClass classMapping = metadata.getEntityBinding(PACKAGE_NAME + ".Item"); - Assert.assertNotNull(classMapping); + assertNotNull(classMapping); KeyValue identifier = classMapping.getIdentifier(); - Assert.assertNotNull(identifier); - Assert.assertEquals(3,classMapping.getPropertyClosureSpan() ); + assertNotNull(identifier); + assertEquals(3,classMapping.getPropertyClosureSpan() ); Property property = classMapping.getProperty("ordersByRelatedOrderId"); - Assert.assertNotNull(property); + assertNotNull(property); property = classMapping.getProperty("ordersByOrderId"); - Assert.assertNotNull(property); + assertNotNull(property); } @Test @@ -81,11 +100,11 @@ public void testCreateOneToMany() { Property itemset = orders.getProperty("itemsForRelatedOrderId"); Collection col = (Collection) itemset.getValue(); OneToMany otm = (OneToMany) col.getElement(); - Assert.assertEquals(otm.getReferencedEntityName(), PACKAGE_NAME + ".Item"); - Assert.assertEquals(otm.getAssociatedClass().getClassName(), PACKAGE_NAME + ".Item"); - Assert.assertEquals(otm.getTable().getName(), "ORDERS"); - Assert.assertNotNull(itemset); - Assert.assertTrue(itemset.getValue() instanceof Set); + assertEquals(otm.getReferencedEntityName(), PACKAGE_NAME + ".Item"); + assertEquals(otm.getAssociatedClass().getClassName(), PACKAGE_NAME + ".Item"); + assertEquals(otm.getTable().getName(), "ORDERS"); + assertNotNull(itemset); + assertTrue(itemset.getValue() instanceof Set); } @Test @@ -124,15 +143,15 @@ public void testBinding() throws HibernateException, SQLException { Item loadeditem = (Item) session.get(PACKAGE_NAME + ".Item", new Integer(42) ); - Assert.assertEquals(item.getName(),loadeditem.getName() ); - Assert.assertEquals(item.getChildId(),loadeditem.getChildId() ); - Assert.assertEquals(item.getOrderId().getId(),loadeditem.getOrderId().getId() ); + assertEquals(item.getName(),loadeditem.getName() ); + assertEquals(item.getChildId(),loadeditem.getChildId() ); + assertEquals(item.getOrderId().getId(),loadeditem.getOrderId().getId() ); - Assert.assertTrue(loadeditem.getOrderId().getItemsForOrderId().contains(loadeditem) ); - Assert.assertTrue(item.getOrderId().getItemsForOrderId().contains(item) ); + assertTrue(loadeditem.getOrderId().getItemsForOrderId().contains(loadeditem) ); + assertTrue(item.getOrderId().getItemsForOrderId().contains(item) ); - Assert.assertEquals(5,item.getOrderId().getItemsForOrderId().size() ); - Assert.assertEquals(5,loadeditem.getOrderId().getItemsForOrderId().size() ); + assertEquals(5,item.getOrderId().getItemsForOrderId().size() ); + assertEquals(5,loadeditem.getOrderId().getItemsForOrderId().size() ); t.commit(); session.close(); @@ -141,12 +160,12 @@ public void testBinding() throws HibernateException, SQLException { t = session.beginTransaction(); order = (Orders) session.load(Orders.class, new Integer(1) ); - Assert.assertFalse(Hibernate.isInitialized(order) ); - Assert.assertFalse(Hibernate.isInitialized(order.getItemsForOrderId() ) ); + assertFalse(Hibernate.isInitialized(order) ); + assertFalse(Hibernate.isInitialized(order.getItemsForOrderId() ) ); order = (Orders) session.createQuery("from " + PACKAGE_NAME + ".Orders").getSingleResult(); - Assert.assertFalse(Hibernate.isInitialized(order.getItemsForOrderId() ) ); + assertFalse(Hibernate.isInitialized(order.getItemsForOrderId() ) ); t.commit(); session.close(); sf.close(); From 32505fc7208700e1bf6484e65bf0156d537d2dbf Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 7 Jul 2021 23:13:33 +0200 Subject: [PATCH 354/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.RevEngForeignKey.TestCase' Signed-off-by: Koen Aers --- .../jdbc2cfg/RevEngForeignKey/TestCase.java | 123 ++++++++++-------- 1 file changed, 71 insertions(+), 52 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/TestCase.java index 8447b0c1bf..96dab2f797 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/TestCase.java @@ -1,9 +1,29 @@ /* - * Created on 2004-12-01 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.jdbc2cfg.RevEngForeignKey; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + import java.net.MalformedURLException; import org.hibernate.MappingException; @@ -16,10 +36,9 @@ import org.hibernate.mapping.SimpleValue; import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; /** * @author max @@ -30,12 +49,12 @@ public class TestCase { private static final String FOREIGN_KEY_TEST_XML = "org/hibernate/tool/jdbc2cfg/RevEngForeignKey/foreignkeytest.reveng.xml"; private static final String BAD_FOREIGNKEY_XML = "org/hibernate/tool/jdbc2cfg/RevEngForeignKey/badforeignkeytest.reveng.xml"; - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -46,22 +65,22 @@ public void testDefaultBiDirectional() { .createJdbcDescriptor(null, null, true) .createMetadata(); PersistentClass project = metadata.getEntityBinding("Project"); - Assert.assertNotNull(project.getProperty("worksOns")); - Assert.assertNotNull(project.getProperty("employee")); - Assert.assertEquals(3, project.getPropertyClosureSpan()); - Assert.assertEquals("projectId", project.getIdentifierProperty().getName()); + assertNotNull(project.getProperty("worksOns")); + assertNotNull(project.getProperty("employee")); + assertEquals(3, project.getPropertyClosureSpan()); + assertEquals("projectId", project.getIdentifierProperty().getName()); PersistentClass employee = metadata.getEntityBinding("Employee"); - Assert.assertNotNull(employee.getProperty("worksOns")); - Assert.assertNotNull(employee.getProperty("employees")); - Assert.assertNotNull(employee.getProperty("employee")); - Assert.assertNotNull(employee.getProperty("projects")); - Assert.assertEquals(5, employee.getPropertyClosureSpan()); - Assert.assertEquals("id", employee.getIdentifierProperty().getName()); + assertNotNull(employee.getProperty("worksOns")); + assertNotNull(employee.getProperty("employees")); + assertNotNull(employee.getProperty("employee")); + assertNotNull(employee.getProperty("projects")); + assertEquals(5, employee.getPropertyClosureSpan()); + assertEquals("id", employee.getIdentifierProperty().getName()); PersistentClass worksOn = metadata.getEntityBinding("WorksOn"); - Assert.assertNotNull(worksOn.getProperty("project")); - Assert.assertNotNull(worksOn.getProperty("employee")); - Assert.assertEquals(4, worksOn.getPropertyClosureSpan()); - Assert.assertEquals("id", worksOn.getIdentifierProperty().getName()); + assertNotNull(worksOn.getProperty("project")); + assertNotNull(worksOn.getProperty("employee")); + assertEquals(4, worksOn.getPropertyClosureSpan()); + assertEquals("id", worksOn.getIdentifierProperty().getName()); } @Test @@ -73,27 +92,27 @@ public void testSetAndManyToOne() { .createJdbcDescriptor(repository, null, true) .createMetadata(); PersistentClass project = metadata.getEntityBinding("Project"); - Assert.assertNotNull(project.getProperty("worksOns")); + assertNotNull(project.getProperty("worksOns")); assertPropertyNotExists(project, "employee", "should be removed by reveng.xml"); Property property = project.getProperty("teamLead"); - Assert.assertNotNull(property); - Assert.assertTrue(property.getValue() instanceof SimpleValue); - Assert.assertEquals(3, project.getPropertyClosureSpan()); - Assert.assertEquals("projectId", project.getIdentifierProperty().getName()); + assertNotNull(property); + assertTrue(property.getValue() instanceof SimpleValue); + assertEquals(3, project.getPropertyClosureSpan()); + assertEquals("projectId", project.getIdentifierProperty().getName()); PersistentClass employee = metadata.getEntityBinding("Employee"); - Assert.assertNotNull(employee.getProperty("worksOns")); - Assert.assertNotNull("property should be renamed by reveng.xml", employee.getProperty("manager")); + assertNotNull(employee.getProperty("worksOns")); + assertNotNull(employee.getProperty("manager"), "property should be renamed by reveng.xml"); assertPropertyNotExists( employee, "employees", "set should be excluded by reveng.xml" ); Property setProperty = employee.getProperty("managedProjects"); - Assert.assertNotNull("should be renamed by reveng.xml", setProperty); - Assert.assertEquals("delete, update", setProperty.getCascade()); - Assert.assertEquals(4, employee.getPropertyClosureSpan()); - Assert.assertEquals("id", employee.getIdentifierProperty().getName()); + assertNotNull(setProperty); + assertEquals("delete, update", setProperty.getCascade()); + assertEquals(4, employee.getPropertyClosureSpan()); + assertEquals("id", employee.getIdentifierProperty().getName()); PersistentClass worksOn = metadata.getEntityBinding("WorksOn"); - Assert.assertNotNull(worksOn.getProperty("project")); - Assert.assertNotNull(worksOn.getProperty("employee")); - Assert.assertEquals(4, worksOn.getPropertyClosureSpan()); - Assert.assertEquals("id", worksOn.getIdentifierProperty().getName()); + assertNotNull(worksOn.getProperty("project")); + assertNotNull(worksOn.getProperty("employee")); + assertEquals(4, worksOn.getPropertyClosureSpan()); + assertEquals("id", worksOn.getIdentifierProperty().getName()); } @Test @@ -111,13 +130,13 @@ public void testOneToOne() throws MalformedURLException, ClassNotFoundException assertPropertyNotExists(addressPerson, "person", "should be removed by reveng.xml"); assertPropertyNotExists(person, "addressPerson", "should be removed by reveng.xml"); Property property = addressMultiPerson.getProperty("renamedOne"); - Assert.assertNotNull(property); - Assert.assertEquals("Casade should be set to delete by reveng.xml", "delete", property.getCascade()); + assertNotNull(property); + assertEquals("delete", property.getCascade(), "Casade should be set to delete by reveng.xml"); assertPropertyNotExists(multiPerson, "addressMultiPerson", "should not be there"); Property o2o = multiPerson.getProperty("renamedInversedOne"); - Assert.assertNotNull(o2o); - Assert.assertEquals("update", o2o.getCascade()); - Assert.assertEquals("JOIN", o2o.getValue().getFetchMode().toString()); + assertNotNull(o2o); + assertEquals("update", o2o.getCascade()); + assertEquals("JOIN", o2o.getValue().getFetchMode().toString()); } @Test @@ -129,9 +148,9 @@ public void testDuplicateForeignKeyDefinition() { MetadataDescriptorFactory .createJdbcDescriptor(repository, null, true) .createMetadata(); - Assert.fail("Should fail because foreign key is already defined in the database"); // maybe we should ignore the definition and only listen to what is overwritten ? For now we error. + fail("Should fail because foreign key is already defined in the database"); // maybe we should ignore the definition and only listen to what is overwritten ? For now we error. } catch(MappingException me) { - Assert.assertTrue(me.getMessage().indexOf("already defined")>=0); + assertTrue(me.getMessage().indexOf("already defined")>=0); } } @@ -142,10 +161,10 @@ public void testManyToOneAttributeDefaults() { .createMetadata(); PersistentClass classMapping = metadata.getEntityBinding("Employee"); Property property = classMapping.getProperty("employee"); - Assert.assertEquals("none", property.getCascade()); - Assert.assertEquals(true, property.isUpdateable()); - Assert.assertEquals(true, property.isInsertable()); - Assert.assertEquals("SELECT", property.getValue().getFetchMode().toString()); + assertEquals("none", property.getCascade()); + assertEquals(true, property.isUpdateable()); + assertEquals(true, property.isInsertable()); + assertEquals("SELECT", property.getValue().getFetchMode().toString()); } @Test @@ -158,16 +177,16 @@ public void testManyToOneAttributeOverrides() { .createMetadata(); PersistentClass classMapping = metadata.getEntityBinding("Employee"); Property property = classMapping.getProperty("manager"); - Assert.assertEquals("all", property.getCascade()); - Assert.assertEquals(false, property.isUpdateable()); - Assert.assertEquals(false, property.isInsertable()); - Assert.assertEquals("JOIN", property.getValue().getFetchMode().toString()); + assertEquals("all", property.getCascade()); + assertEquals(false, property.isUpdateable()); + assertEquals(false, property.isInsertable()); + assertEquals("JOIN", property.getValue().getFetchMode().toString()); } private void assertPropertyNotExists(PersistentClass employee, String name, String msg) { try { employee.getProperty(name); - Assert.fail(msg); + fail(msg); } catch(MappingException me) { // excpected } From 5c8b8009a5478c8490d11ac6d5b8561ed11e8095 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 8 Jul 2021 08:45:29 +0200 Subject: [PATCH 355/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.SearchEscapeString.TestCase' Signed-off-by: Koen Aers --- .../jdbc2cfg/SearchEscapeString/TestCase.java | 39 +++++++++++++------ 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/SearchEscapeString/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/SearchEscapeString/TestCase.java index 38ea061ceb..6ace5a31de 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/SearchEscapeString/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/SearchEscapeString/TestCase.java @@ -1,9 +1,27 @@ /* - * Created on 2004-11-23 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.jdbc2cfg.SearchEscapeString; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + import java.sql.SQLException; import org.hibernate.boot.Metadata; @@ -12,10 +30,9 @@ import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JUnitUtil; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; /** * @author max @@ -25,7 +42,7 @@ public class TestCase { private Metadata metadata = null; - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); metadata = MetadataDescriptorFactory @@ -33,7 +50,7 @@ public void setUp() { .createMetadata(); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -49,11 +66,11 @@ public void testBasic() throws SQLException { Table table = HibernateUtil.getTable(metadata, JdbcUtil.toIdentifier(this, "B_TAB" ) ); Table table2 = HibernateUtil.getTable(metadata, JdbcUtil.toIdentifier(this, "B2TAB" ) ); - Assert.assertNotNull(table); - Assert.assertNotNull(table2); + assertNotNull(table); + assertNotNull(table2); - Assert.assertEquals(table.getColumnSpan(), 2); - Assert.assertEquals(table2.getColumnSpan(), 2); + assertEquals(table.getColumnSpan(), 2); + assertEquals(table2.getColumnSpan(), 2); } From 39d75327da92a3941f7c4bdef93f0020b7473c30 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 8 Jul 2021 09:26:11 +0200 Subject: [PATCH 356/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.TernarySchema.TestCase' Signed-off-by: Koen Aers --- .../tool/jdbc2cfg/TernarySchema/TestCase.java | 67 ++++++++++++------- 1 file changed, 41 insertions(+), 26 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/TernarySchema/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/TernarySchema/TestCase.java index e4c60b0330..a1742bff20 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/TernarySchema/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/TernarySchema/TestCase.java @@ -1,9 +1,27 @@ /* - * Created on 2004-11-23 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.jdbc2cfg.TernarySchema; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + import java.io.File; import java.sql.SQLException; import java.util.ArrayList; @@ -21,13 +39,11 @@ import org.hibernate.tool.hbm2x.visitor.DefaultValueVisitor; import org.hibernate.tools.test.util.JUnitUtil; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * @author max @@ -35,12 +51,12 @@ */ public class TestCase { - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File outputFolder = new File("temp"); private MetadataDescriptor metadataDescriptor = null; - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); DefaultReverseEngineeringStrategy c = new DefaultReverseEngineeringStrategy() { @@ -56,23 +72,22 @@ public List getSchemaSelections() { .createJdbcDescriptor(c, null, true); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } // TODO Investigate the ignored test: HBX-1410 - @Ignore + @Disabled @Test public void testTernaryModel() throws SQLException { assertMultiSchema(metadataDescriptor.createMetadata()); } // TODO Investigate the ignored test: HBX-1410 - @Ignore + @Disabled @Test public void testGeneration() { - File outputFolder = temporaryFolder.getRoot(); HibernateMappingExporter hme = new HibernateMappingExporter(); hme.setMetadataDescriptor(metadataDescriptor); hme.setOutputDirectory(outputFolder); @@ -80,7 +95,7 @@ public void testGeneration() { JUnitUtil.assertIsNonEmptyFile( new File(outputFolder, "Role.hbm.xml") ); JUnitUtil.assertIsNonEmptyFile( new File(outputFolder, "User.hbm.xml") ); JUnitUtil.assertIsNonEmptyFile( new File(outputFolder, "Plainrole.hbm.xml") ); - Assert.assertEquals(3, outputFolder.listFiles().length); + assertEquals(3, outputFolder.listFiles().length); File[] files = new File[3]; files[0] = new File(outputFolder, "Role.hbm.xml"); files[0] = new File(outputFolder, "User.hbm.xml"); @@ -96,28 +111,28 @@ private void assertMultiSchema(Metadata metadata) { metadata.getEntityBindings().iterator(), 5); final PersistentClass role = metadata.getEntityBinding("Role"); - Assert.assertNotNull(role); + assertNotNull(role); PersistentClass userroles = metadata.getEntityBinding("Userroles"); - Assert.assertNotNull(userroles); + assertNotNull(userroles); PersistentClass user = metadata.getEntityBinding("User"); - Assert.assertNotNull(user); + assertNotNull(user); PersistentClass plainRole = metadata.getEntityBinding("Plainrole"); - Assert.assertNotNull(plainRole); + assertNotNull(plainRole); Property property = role.getProperty("users"); - Assert.assertEquals(role.getTable().getSchema(), "OTHERSCHEMA"); - Assert.assertNotNull(property); + assertEquals(role.getTable().getSchema(), "OTHERSCHEMA"); + assertNotNull(property); property.getValue().accept(new DefaultValueVisitor(true) { public Object accept(Set o) { - Assert.assertEquals(o.getCollectionTable().getSchema(), "THIRDSCHEMA"); + assertEquals(o.getCollectionTable().getSchema(), "THIRDSCHEMA"); return null; } }); property = plainRole.getProperty("users"); - Assert.assertEquals(role.getTable().getSchema(), "OTHERSCHEMA"); - Assert.assertNotNull(property); + assertEquals(role.getTable().getSchema(), "OTHERSCHEMA"); + assertNotNull(property); property.getValue().accept(new DefaultValueVisitor(true) { public Object accept(Set o) { - Assert.assertEquals(o.getCollectionTable().getSchema(), null); + assertEquals(o.getCollectionTable().getSchema(), null); return null; } }); From c3b4a11f82b44641fe99340eefc371a8038627f8 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 8 Jul 2021 11:49:42 +0200 Subject: [PATCH 357/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.Versioning' Signed-off-by: Koen Aers --- .../tool/jdbc2cfg/Versioning/TestCase.java | 69 ++++++++++++------- 1 file changed, 43 insertions(+), 26 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Versioning/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Versioning/TestCase.java index 36d36210c9..d451472d67 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Versioning/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Versioning/TestCase.java @@ -1,9 +1,29 @@ /* - * Created on 2004-11-24 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.jdbc2cfg.Versioning; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.io.File; import org.hibernate.boot.Metadata; @@ -18,12 +38,10 @@ import org.hibernate.type.IntegerType; import org.hibernate.type.RowVersionType; import org.hibernate.type.TimestampType; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; /** * To be extended by VersioningForJDK50Test for the JPA generation part @@ -35,10 +53,10 @@ public class TestCase { private Metadata metadata = null; private MetadataDescriptor metadataDescriptor = null; - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); + @TempDir + public File testFolder = new File("test"); - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); metadataDescriptor = MetadataDescriptorFactory @@ -47,7 +65,7 @@ public void setUp() { .createMetadata(); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this);; } @@ -56,17 +74,16 @@ public void tearDown() { public void testVersion() { PersistentClass cl = metadata.getEntityBinding("WithVersion"); Property version = cl.getVersion(); - Assert.assertNotNull(version); - Assert.assertEquals("version", version.getName()); + assertNotNull(version); + assertEquals("version", version.getName()); cl = metadata.getEntityBinding("NoVersion"); - Assert.assertNotNull(cl); + assertNotNull(cl); version = cl.getVersion(); - Assert.assertNull(version); + assertNull(version); } @Test public void testGenerateMappings() { - File testFolder = temporaryFolder.getRoot(); Exporter exporter = new HibernateMappingExporter(); exporter.setMetadataDescriptor(metadataDescriptor); exporter.setOutputDirectory(testFolder); @@ -81,24 +98,24 @@ public void testGenerateMappings() { .createMetadata(); PersistentClass cl = metadata.getEntityBinding( "WithVersion" ); Property version = cl.getVersion(); - Assert.assertNotNull(version); - Assert.assertEquals("version", version.getName()); + assertNotNull(version); + assertEquals("version", version.getName()); cl = metadata.getEntityBinding( "NoVersion" ); - Assert.assertNotNull(cl); + assertNotNull(cl); version = cl.getVersion(); - Assert.assertNull(version); + assertNull(version); cl = metadata.getEntityBinding( "WithRealTimestamp" ); - Assert.assertNotNull(cl); + assertNotNull(cl); version = cl.getVersion(); - Assert.assertNotNull(version); - Assert.assertTrue( + assertNotNull(version); + assertTrue( version.getType() instanceof TimestampType || version.getType() instanceof RowVersionType); // on MS SQL Server cl = metadata.getEntityBinding( "WithFakeTimestamp" ); - Assert.assertNotNull(cl); + assertNotNull(cl); version = cl.getVersion(); - Assert.assertNotNull(version); - Assert.assertTrue( + assertNotNull(version); + assertTrue( version.getType() instanceof IntegerType || version.getType() instanceof BigDecimalType); // on Oracle } From 5c891f306cc98b09f13d2d372f36b8eb8e2009c8 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 8 Jul 2021 13:43:09 +0200 Subject: [PATCH 358/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.stat.Statistics.TestCase' Signed-off-by: Koen Aers --- .../hibernate/tool/stat/Statistics/Group.java | 20 ++++++++++++- .../stat/Statistics/SessionAttribute.java | 20 ++++++++++++- .../tool/stat/Statistics/TestCase.java | 29 +++++++++++++++---- .../hibernate/tool/stat/Statistics/User.java | 20 ++++++++++++- 4 files changed, 81 insertions(+), 8 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/stat/Statistics/Group.java b/test/common/src/main/java/org/hibernate/tool/stat/Statistics/Group.java index 3e0f748c97..864ad6025d 100644 --- a/test/common/src/main/java/org/hibernate/tool/stat/Statistics/Group.java +++ b/test/common/src/main/java/org/hibernate/tool/stat/Statistics/Group.java @@ -1,4 +1,22 @@ -//$Id: Group.java 5686 2005-02-12 07:27:32Z steveebersole $ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.stat.Statistics; import java.util.HashSet; diff --git a/test/common/src/main/java/org/hibernate/tool/stat/Statistics/SessionAttribute.java b/test/common/src/main/java/org/hibernate/tool/stat/Statistics/SessionAttribute.java index 20e7ffa6cd..b6de132772 100644 --- a/test/common/src/main/java/org/hibernate/tool/stat/Statistics/SessionAttribute.java +++ b/test/common/src/main/java/org/hibernate/tool/stat/Statistics/SessionAttribute.java @@ -1,4 +1,22 @@ -//$Id: SessionAttribute.java 5686 2005-02-12 07:27:32Z steveebersole $ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.stat.Statistics; diff --git a/test/common/src/main/java/org/hibernate/tool/stat/Statistics/TestCase.java b/test/common/src/main/java/org/hibernate/tool/stat/Statistics/TestCase.java index 471e6e3592..a86b718270 100644 --- a/test/common/src/main/java/org/hibernate/tool/stat/Statistics/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/stat/Statistics/TestCase.java @@ -1,3 +1,22 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.stat.Statistics; import org.hibernate.Session; @@ -7,18 +26,18 @@ import org.hibernate.boot.MetadataSources; import org.hibernate.tool.stat.StatisticsBrowser; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class TestCase { - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } diff --git a/test/common/src/main/java/org/hibernate/tool/stat/Statistics/User.java b/test/common/src/main/java/org/hibernate/tool/stat/Statistics/User.java index 65bc88a005..3fb975a14d 100644 --- a/test/common/src/main/java/org/hibernate/tool/stat/Statistics/User.java +++ b/test/common/src/main/java/org/hibernate/tool/stat/Statistics/User.java @@ -1,4 +1,22 @@ -//$Id: User.java 5686 2005-02-12 07:27:32Z steveebersole $ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.stat.Statistics; import java.util.HashSet; From 9c329ff2721f8f66a1a87e53f7488704af624d0b Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 8 Jul 2021 14:07:09 +0200 Subject: [PATCH 359/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Remove class 'org.hibernate.tool.test.db.h2.TestSuiteJUnit4' Signed-off-by: Koen Aers --- .../hibernate/tool/test/db/h2/TestSuiteJUnit4.java | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 test/h2/src/test/java/org/hibernate/tool/test/db/h2/TestSuiteJUnit4.java diff --git a/test/h2/src/test/java/org/hibernate/tool/test/db/h2/TestSuiteJUnit4.java b/test/h2/src/test/java/org/hibernate/tool/test/db/h2/TestSuiteJUnit4.java deleted file mode 100644 index b9b86c3598..0000000000 --- a/test/h2/src/test/java/org/hibernate/tool/test/db/h2/TestSuiteJUnit4.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.hibernate.tool.test.db.h2; - -import org.hibernate.tools.test.util.DbSuite; -import org.junit.runner.RunWith; -import org.junit.runners.Suite.SuiteClasses; - -@RunWith(DbSuite.class) -@SuiteClasses({ - org.hibernate.tool.test.db.CommonTestSuite.class -}) -public class TestSuiteJUnit4 {} From ee7d062583099b2a022a369a74c600d55cba6572 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 8 Jul 2021 14:23:26 +0200 Subject: [PATCH 360/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Remove dependencies on 'junit' and 'junit-vintage-engine' from pom.xml Signed-off-by: Koen Aers --- test/h2/pom.xml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/test/h2/pom.xml b/test/h2/pom.xml index c6499f2509..15a23f1abc 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -16,10 +16,6 @@ Hibernate Tools H2 Tests Project - - junit - junit - com.h2database h2 @@ -32,10 +28,6 @@ org.junit.jupiter junit-jupiter-engine - - org.junit.vintage - junit-vintage-engine - From 23e69093d91a26113291cc1d0db2a9912f621840 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 9 Jul 2021 11:02:50 +0200 Subject: [PATCH 361/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Rename 'org.hibernate.tool.test.db.h2.TestSuiteJupiter' to 'org.hibernate.tool.test.db.h2.TestSuite' Signed-off-by: Koen Aers --- .../tool/test/db/h2/{TestSuiteJupiter.java => TestSuite.java} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename test/h2/src/test/java/org/hibernate/tool/test/db/h2/{TestSuiteJupiter.java => TestSuite.java} (96%) diff --git a/test/h2/src/test/java/org/hibernate/tool/test/db/h2/TestSuiteJupiter.java b/test/h2/src/test/java/org/hibernate/tool/test/db/h2/TestSuite.java similarity index 96% rename from test/h2/src/test/java/org/hibernate/tool/test/db/h2/TestSuiteJupiter.java rename to test/h2/src/test/java/org/hibernate/tool/test/db/h2/TestSuite.java index 21b632d197..23dd25f664 100644 --- a/test/h2/src/test/java/org/hibernate/tool/test/db/h2/TestSuiteJupiter.java +++ b/test/h2/src/test/java/org/hibernate/tool/test/db/h2/TestSuite.java @@ -22,7 +22,7 @@ import org.hibernate.tool.test.db.DbTestSuite; import org.junit.jupiter.api.Nested; -public class TestSuiteJupiter { +public class TestSuite { @Nested public class H2TestSuite extends DbTestSuite {} From 5beceab9d25133461a463c197e37e824310e22cb Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 9 Jul 2021 13:48:03 +0200 Subject: [PATCH 362/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Create test suite 'org.hibernate.tool.test.db.oracle.TestSuiteJupiter' incorporating the common database tests for Oracle Signed-off-by: Koen Aers --- test/oracle/pom.xml | 10 ++++++- .../tool/test/db/oracle/TestSuiteJupiter.java | 30 +++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 test/oracle/src/test/java/org/hibernate/tool/test/db/oracle/TestSuiteJupiter.java diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 55b99550ba..baa06cf7f0 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -28,6 +28,14 @@ org.hibernate hibernate-tools-tests-common - + + org.junit.jupiter + junit-jupiter-engine + + + org.junit.vintage + junit-vintage-engine + + diff --git a/test/oracle/src/test/java/org/hibernate/tool/test/db/oracle/TestSuiteJupiter.java b/test/oracle/src/test/java/org/hibernate/tool/test/db/oracle/TestSuiteJupiter.java new file mode 100644 index 0000000000..e7e9c740ef --- /dev/null +++ b/test/oracle/src/test/java/org/hibernate/tool/test/db/oracle/TestSuiteJupiter.java @@ -0,0 +1,30 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.hibernate.tool.test.db.oracle; + +import org.hibernate.tool.test.db.DbTestSuite; +import org.junit.jupiter.api.Nested; + +public class TestSuiteJupiter { + + @Nested + public class OracleTestSuite extends DbTestSuite {} + +} From 78f8e9381d53b0675ebfbd8f7919e4db723d05ac Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 9 Jul 2021 14:01:09 +0200 Subject: [PATCH 363/560] HBX-2190: Make the tests run with the Oracle database - Add a 'oracle' profile to the 'test/pom.xml' file Signed-off-by: Koen Aers --- test/pom.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/pom.xml b/test/pom.xml index 91d3ef1897..7dcf178d16 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -66,6 +66,14 @@ hsql + + oracle + + utils + common + oracle + + From 66a2383bd5fc6a401dbb8aaaf139a475498e8bf6 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 9 Jul 2021 14:23:06 +0200 Subject: [PATCH 364/560] HBX-2190: Make the tests run with the Oracle database - Update 'readme.txt' for use with the Oracle 12c Docker image Signed-off-by: Koen Aers --- test/oracle/readme.txt | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/test/oracle/readme.txt b/test/oracle/readme.txt index e55ac50cb7..c6acab6d7e 100644 --- a/test/oracle/readme.txt +++ b/test/oracle/readme.txt @@ -6,29 +6,28 @@ To do this on your own machine execute the following steps: 1. Install Docker. -2. Pull the Docker image of the Oracle DB: 'docker pull sath89/oracle-12c' +2. Pull the Docker image of the Oracle DB: 'docker pull store/oracle/database-enterprise:12.2.0.1-slim' -3. Start the database: 'docker run -d -p 8080:8080 -p 1521:1521 sath89/oracle-12c'. +3. Start the database: 'docker run --name oracle -d -p 1521:1521 store/oracle/database-enterprise:12.2.0.1-slim'. This step takes a while the first time. Use 'docker logs' and specify the id of your docker container to monitor the progress. When the logs say 'Database is ready to use' you can move to step 4. -4. Connect to the database using your favorite client (e.g. DBeaver: http://dbeaver.jkiss.org) +4. Connect to the database: 'docker exec -it oracle bash -c "source /home/oracle/.bashrc; sqlplus sys/Oradoc_db1@ORCLPDB1 as sysdba"' +Alternatively you can use your favorite database client (e.g. DBeaver: http://dbeaver.jkiss.org) hostname: localhost port: 1521 -service name: xe.oracle.docker -username: system -password: oracle -The complete JDBC URL is: jdbc:oracle:thin:@//localhost:1521/xe.oracle.docker +service name: ORCLPDB1.localdomain +username: SYS +password: Oradoc_db1 +role: SYSDBA +The complete JDBC URL is: jdbc:oracle:thin:@//localhost:1521/ORCLPDB1.localdomain 5. Create the Hibernate Tools test ('HTT') database. You can do this by executing the following SQL: - -create user HTT - identified by HTT - default tablespace USERS - temporary tablespace TEMP - quota unlimited on USERS; +create user HTT identified by HTT; grant all privileges to HTT with admin option; 6. You can now connect with username 'HTT' and password 'HTT' and verify the existence of the 'HTT' schema. -If that is the case you are ready to run the tests. \ No newline at end of file +If that is the case you are ready to run the tests. + +7. Run only the Oracle tests using the 'oracle' profile: mvn clean test -P oracle \ No newline at end of file From 7f146d48c72235a5ebcc4d0c5771db5cfa1cca0f Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 9 Jul 2021 14:38:46 +0200 Subject: [PATCH 365/560] HBX-2190: Make the tests run with the Oracle database - Update 'hibernate.properties' with the new Oracle service name Signed-off-by: Koen Aers --- test/oracle/src/test/resources/hibernate.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/oracle/src/test/resources/hibernate.properties b/test/oracle/src/test/resources/hibernate.properties index edbb7ac4c8..0bd7042c6a 100644 --- a/test/oracle/src/test/resources/hibernate.properties +++ b/test/oracle/src/test/resources/hibernate.properties @@ -2,6 +2,6 @@ hibernate.dialect org.hibernate.dialect.Oracle12cDialect hibernate.connection.driver_class oracle.jdbc.driver.OracleDriver hibernate.connection.username HTT hibernate.connection.password HTT -hibernate.connection.url jdbc:oracle:thin:@//localhost:1521/xe.oracle.docker +hibernate.connection.url jdbc:oracle:thin:@//localhost:1521/ORCLPDB1.localdomain hibernate.default_schema HTT From 164455f582db576ca805273365c2f66a3114d3f0 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 9 Jul 2021 15:04:59 +0200 Subject: [PATCH 366/560] HBX-2190: Make the tests run with the Oracle database - Fix test class 'org.hibernate.tool.jdbc2cfg.Versioning.TestCase' (versions in Oracle are of type BigIntegerType) Signed-off-by: Koen Aers --- .../java/org/hibernate/tool/jdbc2cfg/Versioning/TestCase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Versioning/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Versioning/TestCase.java index d451472d67..5018f56dda 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Versioning/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Versioning/TestCase.java @@ -34,7 +34,7 @@ import org.hibernate.tool.hbm2x.Exporter; import org.hibernate.tool.hbm2x.HibernateMappingExporter; import org.hibernate.tools.test.util.JdbcUtil; -import org.hibernate.type.BigDecimalType; +import org.hibernate.type.BigIntegerType; import org.hibernate.type.IntegerType; import org.hibernate.type.RowVersionType; import org.hibernate.type.TimestampType; @@ -117,7 +117,7 @@ public void testGenerateMappings() { assertNotNull(version); assertTrue( version.getType() instanceof IntegerType || - version.getType() instanceof BigDecimalType); // on Oracle + version.getType() instanceof BigIntegerType); // on Oracle } } From 3462a3a0ae4e17c62731886a0f11594649b382da Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 9 Jul 2021 16:58:36 +0200 Subject: [PATCH 367/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.cfg.reveng.dialect.TestCase' Signed-off-by: Koen Aers --- .../cfg/reveng/dialect/TestCase.java | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) rename test/oracle/src/{main => test}/java/org/hibernate/cfg/reveng/dialect/TestCase.java (84%) diff --git a/test/oracle/src/main/java/org/hibernate/cfg/reveng/dialect/TestCase.java b/test/oracle/src/test/java/org/hibernate/cfg/reveng/dialect/TestCase.java similarity index 84% rename from test/oracle/src/main/java/org/hibernate/cfg/reveng/dialect/TestCase.java rename to test/oracle/src/test/java/org/hibernate/cfg/reveng/dialect/TestCase.java index dab7e9b9b9..f973fa644e 100644 --- a/test/oracle/src/main/java/org/hibernate/cfg/reveng/dialect/TestCase.java +++ b/test/oracle/src/test/java/org/hibernate/cfg/reveng/dialect/TestCase.java @@ -1,5 +1,12 @@ package org.hibernate.cfg.reveng.dialect; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.Iterator; +import java.util.Map; +import java.util.Properties; + import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.cfg.AvailableSettings; import org.hibernate.cfg.Environment; @@ -9,23 +16,16 @@ import org.hibernate.engine.jdbc.spi.JdbcServices; import org.hibernate.service.ServiceRegistry; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -import java.util.Iterator; -import java.util.Map; -import java.util.Properties; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.junit.Assert.assertThat; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class TestCase { private Properties properties = null; private ServiceRegistry serviceRegistry; - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); properties = Environment.getProperties(); @@ -33,7 +33,7 @@ public void setUp() { serviceRegistry = ssrb.build(); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -76,12 +76,12 @@ private void assertSqlTypeLengths(MetaDataDialect dialect, String columnName, St boolean found = false; while (columns.hasNext()) { Map column = columns.next(); - assertThat(column.get("COLUMN_NAME"), equalTo(columnName.toUpperCase())); - assertThat(column.get("TYPE_NAME"), equalTo(typeName)); - assertThat(column.get("COLUMN_SIZE"), equalTo(columnSize)); - assertThat(column.get("DECIMAL_DIGITS"), equalTo(decimalDigits)); + assertEquals(column.get("COLUMN_NAME"),columnName.toUpperCase()); + assertEquals(column.get("TYPE_NAME"), typeName); + assertEquals(column.get("COLUMN_SIZE"), columnSize); + assertEquals(column.get("DECIMAL_DIGITS"), decimalDigits); found = true; } - assertThat("Expected column '" + columnName + "'to exist.", found, equalTo(true)); + assertTrue(found, "Expected column '" + columnName + "'to exist."); } } From babc068179d9f948143c892afc5001f54dddb813 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sat, 10 Jul 2021 22:32:38 +0200 Subject: [PATCH 368/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.CompositeIdOrder.TestCase' Signed-off-by: Koen Aers --- .../jdbc2cfg/CompositeIdOrder/TestCase.java | 82 ---------------- .../cfg/reveng/dialect/TestCase.java | 19 ++++ .../jdbc2cfg/CompositeIdOrder/TestCase.java | 97 +++++++++++++++++++ 3 files changed, 116 insertions(+), 82 deletions(-) delete mode 100644 test/oracle/src/main/java/org/hibernate/tool/jdbc2cfg/CompositeIdOrder/TestCase.java create mode 100644 test/oracle/src/test/java/org/hibernate/tool/jdbc2cfg/CompositeIdOrder/TestCase.java diff --git a/test/oracle/src/main/java/org/hibernate/tool/jdbc2cfg/CompositeIdOrder/TestCase.java b/test/oracle/src/main/java/org/hibernate/tool/jdbc2cfg/CompositeIdOrder/TestCase.java deleted file mode 100644 index 33bf9a57e7..0000000000 --- a/test/oracle/src/main/java/org/hibernate/tool/jdbc2cfg/CompositeIdOrder/TestCase.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Created on 2004-12-01 - * - */ -package org.hibernate.tool.jdbc2cfg.CompositeIdOrder; - -import java.sql.SQLException; -import java.util.Iterator; - -import org.hibernate.boot.Metadata; -import org.hibernate.mapping.Column; -import org.hibernate.mapping.ForeignKey; -import org.hibernate.mapping.PersistentClass; -import org.hibernate.mapping.Property; -import org.hibernate.mapping.Selectable; -import org.hibernate.mapping.Table; -import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; -import org.hibernate.tools.test.util.HibernateUtil; -import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; - - - -/** - * @author max - * @author koen - */ -public class TestCase { - - private Metadata metadata = null; - - @Before - public void setUp() { - JdbcUtil.createDatabase(this); - metadata = MetadataDescriptorFactory - .createJdbcDescriptor(null, null, true) - .createMetadata(); - } - - @After - public void tearDown() { - JdbcUtil.dropDatabase(this); - } - - @Test - public void testMultiColumnForeignKeys() throws SQLException { - - Table table = HibernateUtil.getTable(metadata, "COURSE"); - Assert.assertNotNull(table); - ForeignKey foreignKey = HibernateUtil.getForeignKey(table, "FK_COURSE__SCHEDULE"); - Assert.assertNotNull(foreignKey); - - Assert.assertEquals("Schedule", foreignKey.getReferencedEntityName() ); - Assert.assertEquals("COURSE", foreignKey.getTable().getName() ); - - Assert.assertEquals(1,foreignKey.getColumnSpan() ); - Assert.assertEquals(foreignKey.getColumn(0).getName(), "SCHEDULE_KEY"); - - Assert.assertEquals(table.getPrimaryKey().getColumn(0).getName(), "SCHEDULE_KEY"); - Assert.assertEquals(table.getPrimaryKey().getColumn(1).getName(), "REQUEST_KEY"); - - PersistentClass course = metadata.getEntityBinding("Course"); - - Assert.assertEquals(2,course.getIdentifier().getColumnSpan() ); - Iterator columnIterator = course.getIdentifier().getColumnIterator(); - Assert.assertEquals(((Column)(columnIterator.next())).getName(), "SCHEDULE_KEY"); - Assert.assertEquals(((Column)(columnIterator.next())).getName(), "REQUEST_KEY"); - - PersistentClass topic = metadata.getEntityBinding("CourseTopic"); - - Property property = topic.getProperty("course"); - columnIterator = property.getValue().getColumnIterator(); - Assert. assertEquals(((Column)(columnIterator.next())).getName(), "SCHEDULE_KEY"); - Assert.assertEquals(((Column)(columnIterator.next())).getName(), "REQUEST_KEY"); - - } - - -} diff --git a/test/oracle/src/test/java/org/hibernate/cfg/reveng/dialect/TestCase.java b/test/oracle/src/test/java/org/hibernate/cfg/reveng/dialect/TestCase.java index f973fa644e..ed3cf4f6e8 100644 --- a/test/oracle/src/test/java/org/hibernate/cfg/reveng/dialect/TestCase.java +++ b/test/oracle/src/test/java/org/hibernate/cfg/reveng/dialect/TestCase.java @@ -1,3 +1,22 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.cfg.reveng.dialect; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/test/oracle/src/test/java/org/hibernate/tool/jdbc2cfg/CompositeIdOrder/TestCase.java b/test/oracle/src/test/java/org/hibernate/tool/jdbc2cfg/CompositeIdOrder/TestCase.java new file mode 100644 index 0000000000..6ae43a3529 --- /dev/null +++ b/test/oracle/src/test/java/org/hibernate/tool/jdbc2cfg/CompositeIdOrder/TestCase.java @@ -0,0 +1,97 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.hibernate.tool.jdbc2cfg.CompositeIdOrder; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +import java.sql.SQLException; +import java.util.Iterator; + +import org.hibernate.boot.Metadata; +import org.hibernate.mapping.Column; +import org.hibernate.mapping.ForeignKey; +import org.hibernate.mapping.PersistentClass; +import org.hibernate.mapping.Property; +import org.hibernate.mapping.Selectable; +import org.hibernate.mapping.Table; +import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; +import org.hibernate.tools.test.util.HibernateUtil; +import org.hibernate.tools.test.util.JdbcUtil; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +/** + * @author max + * @author koen + */ +public class TestCase { + + private Metadata metadata = null; + + @BeforeEach + public void setUp() { + JdbcUtil.createDatabase(this); + metadata = MetadataDescriptorFactory + .createJdbcDescriptor(null, null, true) + .createMetadata(); + } + + @AfterEach + public void tearDown() { + JdbcUtil.dropDatabase(this); + } + + @Test + public void testMultiColumnForeignKeys() throws SQLException { + + Table table = HibernateUtil.getTable(metadata, "COURSE"); + assertNotNull(table); + ForeignKey foreignKey = HibernateUtil.getForeignKey(table, "FK_COURSE__SCHEDULE"); + assertNotNull(foreignKey); + + assertEquals("Schedule", foreignKey.getReferencedEntityName() ); + assertEquals("COURSE", foreignKey.getTable().getName() ); + + assertEquals(1,foreignKey.getColumnSpan() ); + assertEquals(foreignKey.getColumn(0).getName(), "SCHEDULE_KEY"); + + assertEquals(table.getPrimaryKey().getColumn(0).getName(), "SCHEDULE_KEY"); + assertEquals(table.getPrimaryKey().getColumn(1).getName(), "REQUEST_KEY"); + + PersistentClass course = metadata.getEntityBinding("Course"); + + assertEquals(2,course.getIdentifier().getColumnSpan() ); + Iterator columnIterator = course.getIdentifier().getColumnIterator(); + assertEquals(((Column)(columnIterator.next())).getName(), "SCHEDULE_KEY"); + assertEquals(((Column)(columnIterator.next())).getName(), "REQUEST_KEY"); + + PersistentClass topic = metadata.getEntityBinding("CourseTopic"); + + Property property = topic.getProperty("course"); + columnIterator = property.getValue().getColumnIterator(); + assertEquals(((Column)(columnIterator.next())).getName(), "SCHEDULE_KEY"); + assertEquals(((Column)(columnIterator.next())).getName(), "REQUEST_KEY"); + + } + + +} From 0eeff83833cf85c22e431d979cf7f56a18d12a15 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sun, 11 Jul 2021 23:58:07 +0200 Subject: [PATCH 369/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.Identity.TestCaase' Signed-off-by: Koen Aers --- .../tool/jdbc2cfg/Identity/TestCase.java | 41 +++++++++++++------ 1 file changed, 29 insertions(+), 12 deletions(-) rename test/oracle/src/{main => test}/java/org/hibernate/tool/jdbc2cfg/Identity/TestCase.java (51%) diff --git a/test/oracle/src/main/java/org/hibernate/tool/jdbc2cfg/Identity/TestCase.java b/test/oracle/src/test/java/org/hibernate/tool/jdbc2cfg/Identity/TestCase.java similarity index 51% rename from test/oracle/src/main/java/org/hibernate/tool/jdbc2cfg/Identity/TestCase.java rename to test/oracle/src/test/java/org/hibernate/tool/jdbc2cfg/Identity/TestCase.java index cb7cad2dd6..e10e57365d 100644 --- a/test/oracle/src/main/java/org/hibernate/tool/jdbc2cfg/Identity/TestCase.java +++ b/test/oracle/src/test/java/org/hibernate/tool/jdbc2cfg/Identity/TestCase.java @@ -1,9 +1,27 @@ /* - * Created on 2004-11-23 + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.hibernate.tool.jdbc2cfg.Identity; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + import java.sql.SQLException; import org.hibernate.boot.Metadata; @@ -11,11 +29,10 @@ import org.hibernate.mapping.SimpleValue; import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * @author max @@ -25,7 +42,7 @@ public class TestCase { private Metadata metadata = null; - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); metadata = MetadataDescriptorFactory @@ -33,19 +50,19 @@ public void setUp() { .createMetadata(); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } // TODO HBX-1412: Enable the test below and make sure it passes. - @Ignore +// @Disabled @Test public void testIdentity() throws SQLException { PersistentClass classMapping = metadata.getEntityBinding("Autoinc"); - Assert.assertNotNull(classMapping); - Assert.assertEquals( + assertNotNull(classMapping); + assertEquals( "identity", ((SimpleValue)classMapping .getIdentifierProperty() @@ -53,7 +70,7 @@ public void testIdentity() throws SQLException { .getIdentifierGeneratorStrategy()); classMapping = metadata.getEntityBinding("Noautoinc"); - Assert.assertEquals( + assertEquals( "assigned", ((SimpleValue)classMapping .getIdentifierProperty() From 524b613f33c000cea759a9a13e1147067d842e98 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 13 Jul 2021 21:23:04 +0200 Subject: [PATCH 370/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Create test suite 'org.hibernate.tool.test.db.hsql.TestSuiteJupiter' incorporating the common database tests for HSQL Signed-off-by: Koen Aers --- test/hsql/pom.xml | 8 +++++ .../tool/test/db/hsql/TestSuiteJupiter.java | 30 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 test/hsql/src/test/java/org/hibernate/tool/test/db/hsql/TestSuiteJupiter.java diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 8454475590..798e932b47 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -29,6 +29,14 @@ org.hibernate hibernate-tools-tests-common + + org.junit.jupiter + junit-jupiter-engine + + + org.junit.vintage + junit-vintage-engine + diff --git a/test/hsql/src/test/java/org/hibernate/tool/test/db/hsql/TestSuiteJupiter.java b/test/hsql/src/test/java/org/hibernate/tool/test/db/hsql/TestSuiteJupiter.java new file mode 100644 index 0000000000..a6ae3f180c --- /dev/null +++ b/test/hsql/src/test/java/org/hibernate/tool/test/db/hsql/TestSuiteJupiter.java @@ -0,0 +1,30 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.hibernate.tool.test.db.hsql; + +import org.hibernate.tool.test.db.DbTestSuite; +import org.junit.jupiter.api.Nested; + +public class TestSuiteJupiter { + + @Nested + public class HsqlTestSuite extends DbTestSuite {} + +} From ac7ae8b3297933439f4b15739188af49409924c5 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 14 Jul 2021 08:35:54 +0200 Subject: [PATCH 371/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Remove JUnit4 test suite 'org.hibernate.tool.test.db.hsql.TestSuite' Signed-off-by: Koen Aers --- .../org/hibernate/tool/test/db/hsql/TestSuite.java | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 test/hsql/src/test/java/org/hibernate/tool/test/db/hsql/TestSuite.java diff --git a/test/hsql/src/test/java/org/hibernate/tool/test/db/hsql/TestSuite.java b/test/hsql/src/test/java/org/hibernate/tool/test/db/hsql/TestSuite.java deleted file mode 100644 index c3a5c806fe..0000000000 --- a/test/hsql/src/test/java/org/hibernate/tool/test/db/hsql/TestSuite.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.hibernate.tool.test.db.hsql; - -import org.hibernate.tools.test.util.DbSuite; -import org.junit.runner.RunWith; -import org.junit.runners.Suite.SuiteClasses; - -@RunWith(DbSuite.class) -@SuiteClasses({ - org.hibernate.tool.test.db.CommonTestSuite.class -}) -public class TestSuite {} From 3bac5ee97b4e66f8dbd25a0bdcea0100a5407396 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 15 Jul 2021 00:32:30 +0200 Subject: [PATCH 372/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Rename 'org.hibernate.tool.test.db.hsql.TestSuiteJupiter' into 'org.hibernate.tool.test.db.hsql.TestSuite' Signed-off-by: Koen Aers --- .../tool/test/db/hsql/{TestSuiteJupiter.java => TestSuite.java} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename test/hsql/src/test/java/org/hibernate/tool/test/db/hsql/{TestSuiteJupiter.java => TestSuite.java} (96%) diff --git a/test/hsql/src/test/java/org/hibernate/tool/test/db/hsql/TestSuiteJupiter.java b/test/hsql/src/test/java/org/hibernate/tool/test/db/hsql/TestSuite.java similarity index 96% rename from test/hsql/src/test/java/org/hibernate/tool/test/db/hsql/TestSuiteJupiter.java rename to test/hsql/src/test/java/org/hibernate/tool/test/db/hsql/TestSuite.java index a6ae3f180c..3dfb23da8f 100644 --- a/test/hsql/src/test/java/org/hibernate/tool/test/db/hsql/TestSuiteJupiter.java +++ b/test/hsql/src/test/java/org/hibernate/tool/test/db/hsql/TestSuite.java @@ -22,7 +22,7 @@ import org.hibernate.tool.test.db.DbTestSuite; import org.junit.jupiter.api.Nested; -public class TestSuiteJupiter { +public class TestSuite { @Nested public class HsqlTestSuite extends DbTestSuite {} From 82f81a565d3e48401d60a170b823127de05387be Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 16 Jul 2021 22:48:29 +0200 Subject: [PATCH 373/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Remove 'junit' and 'junit-vintage-engine' dependencies from pom.xml Signed-off-by: Koen Aers --- test/hsql/pom.xml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 798e932b47..4ee68fe465 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -17,10 +17,6 @@ Hibernate Tools HSQL Tests Project - - junit - junit - org.hsqldb hsqldb @@ -33,10 +29,6 @@ org.junit.jupiter junit-jupiter-engine - - org.junit.vintage - junit-vintage-engine - From b3061792bb525b531a2b8396a321e8759ceede4a Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sat, 17 Jul 2021 18:41:56 +0200 Subject: [PATCH 374/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Add 'junit' and 'junit-vintage-engine' dependencies to 'test/mssql/pom.xml' Signed-off-by: Koen Aers --- test/mssql/pom.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 1e47f40e61..3d452953ca 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -28,6 +28,14 @@ org.hibernate hibernate-tools-tests-common + + org.junit.jupiter + junit-jupiter-engine + + + org.junit.vintage + junit-vintage-engine + From ab43d579d8dbedf6d0d5b7bbc11827cb5dc73ce9 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sun, 18 Jul 2021 20:08:52 +0200 Subject: [PATCH 375/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Add test suite 'org.hibernate.tool.test.db.sqlserver.TestSuiteJupiter' Signed-off-by: Koen Aers --- .../test/db/sqlserver/TestSuiteJupiter.java | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 test/mssql/src/test/java/org/hibernate/tool/test/db/sqlserver/TestSuiteJupiter.java diff --git a/test/mssql/src/test/java/org/hibernate/tool/test/db/sqlserver/TestSuiteJupiter.java b/test/mssql/src/test/java/org/hibernate/tool/test/db/sqlserver/TestSuiteJupiter.java new file mode 100644 index 0000000000..cff71f0401 --- /dev/null +++ b/test/mssql/src/test/java/org/hibernate/tool/test/db/sqlserver/TestSuiteJupiter.java @@ -0,0 +1,30 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.hibernate.tool.test.db.sqlserver; + +import org.hibernate.tool.test.db.DbTestSuite; +import org.junit.jupiter.api.Nested; + +public class TestSuiteJupiter { + + @Nested + public class SqlServerTestSuite extends DbTestSuite {} + +} From 4dd99381ed0319afaddabd6832540e3ea8fc01ca Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sun, 18 Jul 2021 21:13:38 +0200 Subject: [PATCH 376/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.Identity.TestCaase' for mssql Signed-off-by: Koen Aers --- .../tool/jdbc2cfg/Identity/TestCase.java | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) rename test/mssql/src/{main => test}/java/org/hibernate/tool/jdbc2cfg/Identity/TestCase.java (75%) diff --git a/test/mssql/src/main/java/org/hibernate/tool/jdbc2cfg/Identity/TestCase.java b/test/mssql/src/test/java/org/hibernate/tool/jdbc2cfg/Identity/TestCase.java similarity index 75% rename from test/mssql/src/main/java/org/hibernate/tool/jdbc2cfg/Identity/TestCase.java rename to test/mssql/src/test/java/org/hibernate/tool/jdbc2cfg/Identity/TestCase.java index 3d9f6dae29..7ba7df2b0d 100644 --- a/test/mssql/src/main/java/org/hibernate/tool/jdbc2cfg/Identity/TestCase.java +++ b/test/mssql/src/test/java/org/hibernate/tool/jdbc2cfg/Identity/TestCase.java @@ -4,6 +4,9 @@ */ package org.hibernate.tool.jdbc2cfg.Identity; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + import java.sql.SQLException; import org.hibernate.boot.Metadata; @@ -11,11 +14,10 @@ import org.hibernate.mapping.SimpleValue; import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * @author max @@ -25,7 +27,7 @@ public class TestCase { private Metadata metadata = null; - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); MetadataDescriptorFactory @@ -33,18 +35,18 @@ public void setUp() { .createMetadata(); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } // TODO HBX-1413: Enable the test below - @Ignore + @Disabled @Test public void testIdentity() throws SQLException { PersistentClass classMapping = metadata.getEntityBinding("WithIdentity"); - Assert.assertNotNull(classMapping); - Assert.assertEquals( + assertNotNull(classMapping); + assertEquals( "identity", ((SimpleValue)classMapping .getIdentifierProperty() @@ -53,12 +55,12 @@ public void testIdentity() throws SQLException { } // TODO HBX-1413: Enable the test below - @Ignore + @Disabled @Test public void testGuid() throws SQLException { PersistentClass classMapping = metadata.getEntityBinding("WithGuid"); - Assert.assertNotNull(classMapping); - Assert.assertEquals( + assertNotNull(classMapping); + assertEquals( "guid", ((SimpleValue)classMapping .getIdentifierProperty() From 9cb7b9660149a7b9964b3409a4d804e5756008cc Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 20 Jul 2021 18:15:49 +0200 Subject: [PATCH 377/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Remove unused test suite 'org.hibernate.tool.test.db.sqlserver.TestSuite' Signed-off-by: Koen Aers --- .../hibernate/tool/test/db/sqlserver/TestSuite.java | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 test/mssql/src/test/java/org/hibernate/tool/test/db/sqlserver/TestSuite.java diff --git a/test/mssql/src/test/java/org/hibernate/tool/test/db/sqlserver/TestSuite.java b/test/mssql/src/test/java/org/hibernate/tool/test/db/sqlserver/TestSuite.java deleted file mode 100644 index 39cfef5d7f..0000000000 --- a/test/mssql/src/test/java/org/hibernate/tool/test/db/sqlserver/TestSuite.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.hibernate.tool.test.db.sqlserver; - -import org.hibernate.tools.test.util.DbSuite; -import org.junit.runner.RunWith; -import org.junit.runners.Suite.SuiteClasses; - -@RunWith(DbSuite.class) -@SuiteClasses({ - org.hibernate.tool.test.db.CommonTestSuite.class -}) -public class TestSuite {} From 0148f228d41bb8cd77a253d75a8ab7e351306f1a Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 21 Jul 2021 21:50:08 +0200 Subject: [PATCH 378/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Rename 'org.hibernate.tool.test.db.sqlserver.TestSuiteJupiter' to 'org.hibernate.tool.test.db.sqlserver.TestSuite' Signed-off-by: Koen Aers --- .../test/db/sqlserver/{TestSuiteJupiter.java => TestSuite.java} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename test/mssql/src/test/java/org/hibernate/tool/test/db/sqlserver/{TestSuiteJupiter.java => TestSuite.java} (96%) diff --git a/test/mssql/src/test/java/org/hibernate/tool/test/db/sqlserver/TestSuiteJupiter.java b/test/mssql/src/test/java/org/hibernate/tool/test/db/sqlserver/TestSuite.java similarity index 96% rename from test/mssql/src/test/java/org/hibernate/tool/test/db/sqlserver/TestSuiteJupiter.java rename to test/mssql/src/test/java/org/hibernate/tool/test/db/sqlserver/TestSuite.java index cff71f0401..c3e74df41a 100644 --- a/test/mssql/src/test/java/org/hibernate/tool/test/db/sqlserver/TestSuiteJupiter.java +++ b/test/mssql/src/test/java/org/hibernate/tool/test/db/sqlserver/TestSuite.java @@ -22,7 +22,7 @@ import org.hibernate.tool.test.db.DbTestSuite; import org.junit.jupiter.api.Nested; -public class TestSuiteJupiter { +public class TestSuite { @Nested public class SqlServerTestSuite extends DbTestSuite {} From 8debd99e788e15d56d37dc9de97cedd5a2cf4bab Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sat, 24 Jul 2021 18:51:55 +0200 Subject: [PATCH 379/560] HBX-2195: Update Hibernate Core dependency to version 5.5.4.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 048201c16d..1d5d10de1b 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ 1.7 1.4.200 5.1.2.Final - 5.5.3.Final + 5.5.4.Final 2.5.2 8.0.1 2.2 From 7f31aade5513881a10631293084e1d2ac51eb3d8 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 26 Jul 2021 10:03:40 +0200 Subject: [PATCH 380/560] HBX-2194: Update version identifier to 5.5.4.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 72e5759717..c727f63594 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.5.4-SNAPSHOT + 5.5.4.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 82bea2e7b8..eaf55e05df 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.5.4-SNAPSHOT"; + public static final String VERSION = "5.5.4.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index b1801b0731..ccd2e752a6 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.5.4-SNAPSHOT + 5.5.4.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 1d5d10de1b..357ef185d1 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.5.4-SNAPSHOT + 5.5.4.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 5845044191..18f9b70400 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.4-SNAPSHOT + 5.5.4.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 15a23f1abc..9c8f177d03 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.4-SNAPSHOT + 5.5.4.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 4ee68fe465..9f74752db2 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.4-SNAPSHOT + 5.5.4.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 2a885013f8..e3479f865e 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.4-SNAPSHOT + 5.5.4.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 3d452953ca..13950f820c 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.4-SNAPSHOT + 5.5.4.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index c96cc4408f..c07abb7ad3 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.4-SNAPSHOT + 5.5.4.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 6a2f034c60..4f761ce5e7 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.4-SNAPSHOT + 5.5.4.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index baa06cf7f0..0dd1ac16c0 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.4-SNAPSHOT + 5.5.4.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 7dcf178d16..054afe0a21 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.5.4-SNAPSHOT + 5.5.4.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 927f2045a8..ffe938b95c 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.4-SNAPSHOT + 5.5.4.Final hibernate-tools-tests-utils From 8da3c6227e37a0ab0d4663a8e4508aded3b14e08 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 29 Jul 2021 10:16:34 +0200 Subject: [PATCH 381/560] HBX-2196: Update version identifier to 5.5.5-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index c727f63594..c1b74584db 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.5.4.Final + 5.5.5-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index eaf55e05df..55b5739d7b 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.5.4.Final"; + public static final String VERSION = "5.5.5-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index ccd2e752a6..9e9b27ed8c 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.5.4.Final + 5.5.5-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 357ef185d1..b11829d23c 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.5.4.Final + 5.5.5-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 18f9b70400..99bb27eb76 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.4.Final + 5.5.5-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 9c8f177d03..80bc40d8d8 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.4.Final + 5.5.5-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 9f74752db2..55e3c5b983 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.4.Final + 5.5.5-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index e3479f865e..40b6fc9f75 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.4.Final + 5.5.5-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 13950f820c..bdf079e7e4 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.4.Final + 5.5.5-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index c07abb7ad3..b7324abb28 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.4.Final + 5.5.5-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 4f761ce5e7..628aa3ea04 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.4.Final + 5.5.5-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 0dd1ac16c0..2dbcbc8c3a 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.4.Final + 5.5.5-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 054afe0a21..2b196cacc9 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.5.4.Final + 5.5.5-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index ffe938b95c..ce6b9a3957 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.4.Final + 5.5.5-SNAPSHOT hibernate-tools-tests-utils From 588bacb1ff3e4cf08ccafcfaf8965ebb1d736f2d Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 29 Jul 2021 12:15:04 +0200 Subject: [PATCH 382/560] HBX-2199: Increment JUnit Jupiter dependency to version 5.7.2 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b11829d23c..285665cae8 100644 --- a/pom.xml +++ b/pom.xml @@ -54,7 +54,7 @@ 2.2 1.2.0 4.13.2 - 5.7.1 + 5.7.2 6.0.6 19.3.0.0 9.2.1.jre8 From 45792deb83a8a6a58e849fb34f8c8cc6d1d0904b Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 30 Jul 2021 10:15:18 +0200 Subject: [PATCH 383/560] HBX-2197: Update Hibernate Core dependency to version 5.5.5.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 285665cae8..6610b58e91 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ 1.7 1.4.200 5.1.2.Final - 5.5.4.Final + 5.5.5.Final 2.5.2 8.0.1 2.2 From e7c6d31e7c99f4d21879b9a371e0043613b6dee8 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 30 Jul 2021 11:57:36 +0200 Subject: [PATCH 384/560] HBX-2198: Update version identifier to 5.5.5.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index c1b74584db..0e810f0e95 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.5.5-SNAPSHOT + 5.5.5.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 55b5739d7b..ce7bd006c6 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.5.5-SNAPSHOT"; + public static final String VERSION = "5.5.5.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 9e9b27ed8c..aa5643e937 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.5.5-SNAPSHOT + 5.5.5.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 6610b58e91..ea1f1a8f1d 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.5.5-SNAPSHOT + 5.5.5.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 99bb27eb76..359ed09c58 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.5-SNAPSHOT + 5.5.5.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 80bc40d8d8..c9dc447f5a 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.5-SNAPSHOT + 5.5.5.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 55e3c5b983..aa2c871dfa 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.5-SNAPSHOT + 5.5.5.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 40b6fc9f75..650328af45 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.5-SNAPSHOT + 5.5.5.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index bdf079e7e4..f3d69bd21f 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.5-SNAPSHOT + 5.5.5.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index b7324abb28..8d847f5701 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.5-SNAPSHOT + 5.5.5.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 628aa3ea04..8c85e3bd1a 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.5-SNAPSHOT + 5.5.5.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 2dbcbc8c3a..aa4dff49ec 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.5-SNAPSHOT + 5.5.5.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 2b196cacc9..a0f6501d9c 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.5.5-SNAPSHOT + 5.5.5.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index ce6b9a3957..142c890899 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.5-SNAPSHOT + 5.5.5.Final hibernate-tools-tests-utils From 81b55475c6a1d6f4adb53e795e63cc8fea2ccf0e Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sat, 31 Jul 2021 10:55:52 +0200 Subject: [PATCH 385/560] HBX-2201: Update version identifier to 5.5.6-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 0e810f0e95..add8cf1ab7 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.5.5.Final + 5.5.6-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index ce7bd006c6..a2a787a5ef 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.5.5.Final"; + public static final String VERSION = "5.5.6-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index aa5643e937..79e0f413bd 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.5.5.Final + 5.5.6-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index ea1f1a8f1d..57a133f335 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.5.5.Final + 5.5.6-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 359ed09c58..0af5897424 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.5.Final + 5.5.6-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index c9dc447f5a..884cec257f 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.5.Final + 5.5.6-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index aa2c871dfa..bae5e92c7d 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.5.Final + 5.5.6-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 650328af45..817b4d4dbf 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.5.Final + 5.5.6-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index f3d69bd21f..1dce537501 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.5.Final + 5.5.6-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 8d847f5701..1d7c25efc5 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.5.Final + 5.5.6-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 8c85e3bd1a..0d5327c3f9 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.5.Final + 5.5.6-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index aa4dff49ec..25636fac0b 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.5.Final + 5.5.6-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index a0f6501d9c..3134488e3c 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.5.5.Final + 5.5.6-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 142c890899..a24e809e90 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.5.Final + 5.5.6-SNAPSHOT hibernate-tools-tests-utils From c3077fba8bee33b9829480c69ae0c36a11bf36a9 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 3 Aug 2021 09:36:46 +0200 Subject: [PATCH 386/560] HBX-2200: Increment Apache Ant dependency to version 1.10.11 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 57a133f335..609378f286 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,7 @@ - 1.10.10 + 1.10.11 4.4 2.3.31 From e13cfe49b5c9ea50b3c27bf087877ac3f9b4a3e1 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 20 Aug 2021 10:39:07 +0300 Subject: [PATCH 387/560] HBX-2206: Update Hibernate ORM dependency to version 5.5.6.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 609378f286..03b2bb050d 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ 1.7 1.4.200 5.1.2.Final - 5.5.5.Final + 5.5.6.Final 2.5.2 8.0.1 2.2 From 736251c2db9e1c4cd2ff196b2c1ea5a18a3a1494 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 20 Aug 2021 13:41:54 +0300 Subject: [PATCH 388/560] HBX-2207: Update version identifier to 5.5.6.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index add8cf1ab7..2c4740eb6c 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.5.6-SNAPSHOT + 5.5.6.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index a2a787a5ef..c4e5f3a156 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.5.6-SNAPSHOT"; + public static final String VERSION = "5.5.6.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 79e0f413bd..0202684abd 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.5.6-SNAPSHOT + 5.5.6.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 03b2bb050d..934867c02a 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.5.6-SNAPSHOT + 5.5.6.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 0af5897424..7213092d97 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.6-SNAPSHOT + 5.5.6.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 884cec257f..c6e4b1e7ba 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.6-SNAPSHOT + 5.5.6.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index bae5e92c7d..84959326c5 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.6-SNAPSHOT + 5.5.6.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 817b4d4dbf..0ce7020ffd 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.6-SNAPSHOT + 5.5.6.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 1dce537501..273464f0a2 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.6-SNAPSHOT + 5.5.6.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 1d7c25efc5..313b3440ad 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.6-SNAPSHOT + 5.5.6.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 0d5327c3f9..2facdbef13 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.6-SNAPSHOT + 5.5.6.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 25636fac0b..d77fd56df3 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.6-SNAPSHOT + 5.5.6.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 3134488e3c..70bbb2739b 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.5.6-SNAPSHOT + 5.5.6.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index a24e809e90..79e89d2193 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.6-SNAPSHOT + 5.5.6.Final hibernate-tools-tests-utils From a1cddef29448512ed10fcf78b5491e2cf67cdae0 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 27 Aug 2021 10:09:35 +0300 Subject: [PATCH 389/560] HBX-2210: Update version identifier to 5.5.7-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 2c4740eb6c..3c10007fbc 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.5.6.Final + 5.5.7-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index c4e5f3a156..f5ae977634 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.5.6.Final"; + public static final String VERSION = "5.5.7-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 0202684abd..4298f26902 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.5.6.Final + 5.5.7-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 934867c02a..6882323f59 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.5.6.Final + 5.5.7-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 7213092d97..2e5716e3fd 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.6.Final + 5.5.7-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index c6e4b1e7ba..ad2c0eb9ee 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.6.Final + 5.5.7-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 84959326c5..b46e55c7b4 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.6.Final + 5.5.7-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 0ce7020ffd..da85395db0 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.6.Final + 5.5.7-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 273464f0a2..ec607221fd 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.6.Final + 5.5.7-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 313b3440ad..e9a161803b 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.6.Final + 5.5.7-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 2facdbef13..7a4c64f226 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.6.Final + 5.5.7-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index d77fd56df3..57bba1f498 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.6.Final + 5.5.7-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 70bbb2739b..f7fae0429f 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.5.6.Final + 5.5.7-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 79e89d2193..72e4236baf 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.6.Final + 5.5.7-SNAPSHOT hibernate-tools-tests-utils From 142213aa3bda824836ef5fb26a241640ef2c2715 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 30 Aug 2021 12:05:21 +0200 Subject: [PATCH 390/560] HBX-2215: Update Hibernate core dependency to version 5.5.7.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6882323f59..ad9766b194 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ 1.7 1.4.200 5.1.2.Final - 5.5.6.Final + 5.5.7.Final 2.5.2 8.0.1 2.2 From 99783240f803ba68ec42252a45c1ce7f38defb2d Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 30 Aug 2021 12:47:53 +0200 Subject: [PATCH 391/560] HBX-2214: Update version identifier to 5.5.7.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 3c10007fbc..ab8c3ff380 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.5.7-SNAPSHOT + 5.5.7.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index f5ae977634..f73f233454 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.5.7-SNAPSHOT"; + public static final String VERSION = "5.5.7.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 4298f26902..8bec12c507 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.5.7-SNAPSHOT + 5.5.7.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index ad9766b194..2a4414c361 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.5.7-SNAPSHOT + 5.5.7.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 2e5716e3fd..8e994f6b7e 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.7-SNAPSHOT + 5.5.7.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index ad2c0eb9ee..323370b321 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.7-SNAPSHOT + 5.5.7.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index b46e55c7b4..de27decf0d 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.7-SNAPSHOT + 5.5.7.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index da85395db0..c0c95999fc 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.7-SNAPSHOT + 5.5.7.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index ec607221fd..cc5d67bd25 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.7-SNAPSHOT + 5.5.7.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index e9a161803b..8595e94fc1 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.7-SNAPSHOT + 5.5.7.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 7a4c64f226..2cfdd46661 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.7-SNAPSHOT + 5.5.7.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 57bba1f498..6cb6d9fba8 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.7-SNAPSHOT + 5.5.7.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index f7fae0429f..a6684ca93e 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.5.7-SNAPSHOT + 5.5.7.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 72e4236baf..be83a15df7 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.7-SNAPSHOT + 5.5.7.Final hibernate-tools-tests-utils From e1eaa00304749d85c32e1f52e82787e935f4fc28 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 31 Aug 2021 14:13:15 +0200 Subject: [PATCH 392/560] HBX-2211: Update the version identifier to 5.6.0-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index ab8c3ff380..6e047b626c 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.5.7.Final + 5.6.0-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index f73f233454..e6569eb993 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.5.7.Final"; + public static final String VERSION = "5.6.0-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 8bec12c507..b9f63b32b6 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.5.7.Final + 5.6.0-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 2a4414c361..0533db75e5 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.5.7.Final + 5.6.0-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 8e994f6b7e..48747d4956 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.7.Final + 5.6.0-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 323370b321..1573138b50 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.7.Final + 5.6.0-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index de27decf0d..b771c2cc15 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.7.Final + 5.6.0-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index c0c95999fc..3d49ad61ab 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.7.Final + 5.6.0-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index cc5d67bd25..e33f10e617 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.7.Final + 5.6.0-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 8595e94fc1..b29bafd3de 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.7.Final + 5.6.0-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 2cfdd46661..e4f92d085b 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.7.Final + 5.6.0-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 6cb6d9fba8..5e8104c126 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.7.Final + 5.6.0-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index a6684ca93e..84715f8d59 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.5.7.Final + 5.6.0-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index be83a15df7..1034335c09 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.5.7.Final + 5.6.0-SNAPSHOT hibernate-tools-tests-utils From a66c87c7f97d051af5b01dd6745f16398cea7ce9 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 31 Aug 2021 17:30:16 +0200 Subject: [PATCH 393/560] HBX-2212: Update Hibernate core dependency to version 5.6.0.Beta1 Signed-off-by: Koen Aers --- .../tool/hbmlint/detector/InstrumentationDetector.java | 3 +-- pom.xml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/main/src/main/java/org/hibernate/tool/hbmlint/detector/InstrumentationDetector.java b/main/src/main/java/org/hibernate/tool/hbmlint/detector/InstrumentationDetector.java index 0ff24cb818..48de1b2aaa 100644 --- a/main/src/main/java/org/hibernate/tool/hbmlint/detector/InstrumentationDetector.java +++ b/main/src/main/java/org/hibernate/tool/hbmlint/detector/InstrumentationDetector.java @@ -21,8 +21,7 @@ public String getName() { public void initialize(Metadata metadata) { super.initialize(metadata); BytecodeProvider bytecodeProvider = Environment.getBytecodeProvider(); - if(bytecodeProvider instanceof org.hibernate.bytecode.internal.javassist.BytecodeProviderImpl || - bytecodeProvider instanceof org.hibernate.bytecode.internal.bytebuddy.BytecodeProviderImpl) { + if(bytecodeProvider instanceof org.hibernate.bytecode.internal.bytebuddy.BytecodeProviderImpl) { enhanceEnabled = true; } } diff --git a/pom.xml b/pom.xml index 0533db75e5..ea00b2ee37 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ 1.7 1.4.200 5.1.2.Final - 5.5.7.Final + 5.6.0.Beta1 2.5.2 8.0.1 2.2 From 1f7b0270ccb5e23d50e5ec723f49afd76d9f2d7d Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 31 Aug 2021 17:50:52 +0200 Subject: [PATCH 394/560] HBX-2213: Update version identifier to 5.6.0.Beta1 Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 6e047b626c..6a6685bdb9 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta1 hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index e6569eb993..d86e8a2ded 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.0-SNAPSHOT"; + public static final String VERSION = "5.6.0.Beta1"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index b9f63b32b6..d504a9a216 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta1 hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index ea00b2ee37..76c14c849c 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta1 pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 48747d4956..1e8d38ce3d 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta1 hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 1573138b50..acbde962c1 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta1 hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index b771c2cc15..c4996a5552 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta1 hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 3d49ad61ab..eb90ea5fe4 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta1 hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index e33f10e617..0db160011b 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta1 hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index b29bafd3de..c1166cd1f8 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta1 hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index e4f92d085b..17a9d1bd73 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta1 hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 5e8104c126..f53730d0ec 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta1 hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 84715f8d59..694a9446a3 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta1 hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 1034335c09..a97513f6d9 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta1 hibernate-tools-tests-utils From 533ae88ae65569987ce2c1daa628c3f71dd8338c Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 3 Sep 2021 09:47:25 +0200 Subject: [PATCH 395/560] HBX-2219: Update version identifier to 5.6.0-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 6a6685bdb9..6e047b626c 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.0.Beta1 + 5.6.0-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index d86e8a2ded..e6569eb993 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.0.Beta1"; + public static final String VERSION = "5.6.0-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index d504a9a216..b9f63b32b6 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.0.Beta1 + 5.6.0-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 76c14c849c..ea00b2ee37 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.0.Beta1 + 5.6.0-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 1e8d38ce3d..48747d4956 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Beta1 + 5.6.0-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index acbde962c1..1573138b50 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Beta1 + 5.6.0-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index c4996a5552..b771c2cc15 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Beta1 + 5.6.0-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index eb90ea5fe4..3d49ad61ab 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Beta1 + 5.6.0-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 0db160011b..e33f10e617 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Beta1 + 5.6.0-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index c1166cd1f8..b29bafd3de 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Beta1 + 5.6.0-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 17a9d1bd73..e4f92d085b 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Beta1 + 5.6.0-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index f53730d0ec..5e8104c126 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Beta1 + 5.6.0-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 694a9446a3..84715f8d59 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.0.Beta1 + 5.6.0-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index a97513f6d9..1034335c09 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Beta1 + 5.6.0-SNAPSHOT hibernate-tools-tests-utils From 558e1e07567e40159bfe0531f14d432a121d793f Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sat, 4 Sep 2021 10:38:28 +0200 Subject: [PATCH 396/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Remove dependencies on 'junit' and 'junit-vintage-engine' from 'test/common' Signed-off-by: Koen Aers --- test/common/pom.xml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/test/common/pom.xml b/test/common/pom.xml index 48747d4956..2af710f81a 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -16,10 +16,6 @@ Hibernate Tools Common Database Tests Project - - junit - junit - jaxen jaxen @@ -37,10 +33,6 @@ junit-jupiter-engine compile - - org.junit.vintage - junit-vintage-engine - From faa4457657bce680de0d9d01403ddeccf3089dc7 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 6 Sep 2021 08:37:43 +0200 Subject: [PATCH 397/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Remove dependencies on 'junit' and 'junit-vintage-engine' from 'test/mssql' Signed-off-by: Koen Aers --- test/mssql/pom.xml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index e33f10e617..4d36616c70 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -16,10 +16,6 @@ Hibernate Tools MS SQL Server Tests Project - - junit - junit - com.microsoft.sqlserver mssql-jdbc @@ -32,10 +28,6 @@ org.junit.jupiter junit-jupiter-engine - - org.junit.vintage - junit-vintage-engine - From 3460ac9903ea0c5662539e6ded4e901269c1452d Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 21 Sep 2021 14:50:22 +0200 Subject: [PATCH 398/560] HBX-2221: Update Hibernate ORM Dependency to Version 5.6.0.Beta2 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ea00b2ee37..5c57d45584 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ 1.7 1.4.200 5.1.2.Final - 5.6.0.Beta1 + 5.6.0.Beta2 2.5.2 8.0.1 2.2 From 5abcacecf049fc6ead75276ff5ca6ed1318be9c2 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 21 Sep 2021 17:05:03 +0200 Subject: [PATCH 399/560] HBX-2222: Update version identifier to 5.6.0.Beta2 Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 6e047b626c..7e2651c08a 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta2 hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index e6569eb993..919b990e4d 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.0-SNAPSHOT"; + public static final String VERSION = "5.6.0.Beta2"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index b9f63b32b6..a4359a5fd8 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta2 hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 5c57d45584..af602efdf1 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta2 pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 2af710f81a..868d2dad2f 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta2 hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 1573138b50..0c43bcde61 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta2 hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index b771c2cc15..38076ad5b1 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta2 hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 3d49ad61ab..55f4680914 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta2 hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 4d36616c70..b743a1626b 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta2 hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index b29bafd3de..af8d3f6ee9 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta2 hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index e4f92d085b..a15a985de6 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta2 hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 5e8104c126..61261a6426 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta2 hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 84715f8d59..41fac32082 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta2 hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 1034335c09..991b35d25c 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Beta2 hibernate-tools-tests-utils From 3f755f959fcf84cc2e9b833594a6f030813a3282 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 22 Sep 2021 15:35:42 +0200 Subject: [PATCH 400/560] HBX-2223: Update version identifier to 5.6.0-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 7e2651c08a..6e047b626c 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.0.Beta2 + 5.6.0-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 919b990e4d..e6569eb993 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.0.Beta2"; + public static final String VERSION = "5.6.0-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index a4359a5fd8..b9f63b32b6 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.0.Beta2 + 5.6.0-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index af602efdf1..5c57d45584 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.0.Beta2 + 5.6.0-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 868d2dad2f..2af710f81a 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Beta2 + 5.6.0-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 0c43bcde61..1573138b50 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Beta2 + 5.6.0-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 38076ad5b1..b771c2cc15 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Beta2 + 5.6.0-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 55f4680914..3d49ad61ab 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Beta2 + 5.6.0-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index b743a1626b..4d36616c70 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Beta2 + 5.6.0-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index af8d3f6ee9..b29bafd3de 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Beta2 + 5.6.0-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index a15a985de6..e4f92d085b 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Beta2 + 5.6.0-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 61261a6426..5e8104c126 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Beta2 + 5.6.0-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 41fac32082..84715f8d59 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.0.Beta2 + 5.6.0-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 991b35d25c..1034335c09 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Beta2 + 5.6.0-SNAPSHOT hibernate-tools-tests-utils From 5cc28e0739ab155a7d45e9dadb67b47120bb5305 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 23 Sep 2021 15:05:57 +0200 Subject: [PATCH 401/560] HBX-2182: Review and adapt the tests to remove the stack traces caused by the dialect and/or connection not being specified - Add test class 'org.hibernate.tools.test.util.DummyConnectionProviderTest' and implementation 'org.hibernate.tools.test.util.DummyConnectionProvider' Signed-off-by: Koen Aers --- .../test/util/DummyConnectionProvider.java | 273 ++++++++++++++++++ .../util/DummyConnectionProviderTest.java | 31 ++ 2 files changed, 304 insertions(+) create mode 100644 test/utils/src/main/java/org/hibernate/tools/test/util/DummyConnectionProvider.java create mode 100644 test/utils/src/test/java/org/hibernate/tools/test/util/DummyConnectionProviderTest.java diff --git a/test/utils/src/main/java/org/hibernate/tools/test/util/DummyConnectionProvider.java b/test/utils/src/main/java/org/hibernate/tools/test/util/DummyConnectionProvider.java new file mode 100644 index 0000000000..842fe7f927 --- /dev/null +++ b/test/utils/src/main/java/org/hibernate/tools/test/util/DummyConnectionProvider.java @@ -0,0 +1,273 @@ +package org.hibernate.tools.test.util; + +import java.sql.Array; +import java.sql.Blob; +import java.sql.CallableStatement; +import java.sql.Clob; +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.NClob; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.RowIdLifetime; +import java.sql.SQLClientInfoException; +import java.sql.SQLException; +import java.sql.SQLWarning; +import java.sql.SQLXML; +import java.sql.Savepoint; +import java.sql.Statement; +import java.sql.Struct; +import java.util.Map; +import java.util.Properties; +import java.util.concurrent.Executor; + +import org.hibernate.engine.jdbc.connections.internal.UserSuppliedConnectionProviderImpl; + +public class DummyConnectionProvider extends UserSuppliedConnectionProviderImpl { + + private static final long serialVersionUID = 1L; + + private static Connection CONNECTION = new TestConnection(); + private static DatabaseMetaData DATABASE_META_DATA = new TestDatabaseMetaData(); + + @Override public Connection getConnection() throws SQLException { return CONNECTION; } + + @Override public void closeConnection(Connection conn) throws SQLException {} + + private static class TestConnection implements Connection { + @Override public T unwrap(Class iface) throws SQLException { return null; } + @Override public boolean isWrapperFor(Class iface) throws SQLException { return false; } + @Override public Statement createStatement() throws SQLException { return null; } + @Override public PreparedStatement prepareStatement(String sql) throws SQLException { return null; } + @Override public CallableStatement prepareCall(String sql) throws SQLException { return null; } + @Override public String nativeSQL(String sql) throws SQLException { return null; } + @Override public void setAutoCommit(boolean autoCommit) throws SQLException {} + @Override public boolean getAutoCommit() throws SQLException { return false; } + @Override public void commit() throws SQLException {} + @Override public void rollback() throws SQLException {} + @Override public void close() throws SQLException {} + @Override public boolean isClosed() throws SQLException { return false; } + @Override public DatabaseMetaData getMetaData() throws SQLException { return DATABASE_META_DATA; } + @Override public void setReadOnly(boolean readOnly) throws SQLException {} + @Override public boolean isReadOnly() throws SQLException { return false; } + @Override public void setCatalog(String catalog) throws SQLException {} + @Override public String getCatalog() throws SQLException { return null; } + @Override public void setTransactionIsolation(int level) throws SQLException {} + @Override public int getTransactionIsolation() throws SQLException { return 0; } + @Override public SQLWarning getWarnings() throws SQLException { return null; } + @Override public void clearWarnings() throws SQLException {} + @Override public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException { return null; } + @Override public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException { return null; } + @Override public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException { return null; } + @Override public Map> getTypeMap() throws SQLException { return null; } + @Override public void setTypeMap(Map> map) throws SQLException {} + @Override public void setHoldability(int holdability) throws SQLException {} + @Override public int getHoldability() throws SQLException { return 0; } + @Override public Savepoint setSavepoint() throws SQLException { return null; } + @Override public Savepoint setSavepoint(String name) throws SQLException { return null; } + @Override public void rollback(Savepoint savepoint) throws SQLException {} + @Override public void releaseSavepoint(Savepoint savepoint) throws SQLException {} + @Override public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { return null; } + @Override public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { return null; } + @Override public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { return null; } + @Override public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException { return null; } + @Override public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException { return null; } + @Override public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException { return null; } + @Override public Clob createClob() throws SQLException { return null; } + @Override public Blob createBlob() throws SQLException { return null; } + @Override public NClob createNClob() throws SQLException { return null; } + @Override public SQLXML createSQLXML() throws SQLException { return null; } + @Override public boolean isValid(int timeout) throws SQLException { return false;} + @Override public void setClientInfo(String name, String value) throws SQLClientInfoException {} + @Override public void setClientInfo(Properties properties) throws SQLClientInfoException {} + @Override public String getClientInfo(String name) throws SQLException { return null; } + @Override public Properties getClientInfo() throws SQLException { return null; } + @Override public Array createArrayOf(String typeName, Object[] elements) throws SQLException { return null; } + @Override public Struct createStruct(String typeName, Object[] attributes) throws SQLException { return null; } + @Override public void setSchema(String schema) throws SQLException {} + @Override public String getSchema() throws SQLException { return null; } + @Override public void abort(Executor executor) throws SQLException {} + @Override public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException {} + @Override public int getNetworkTimeout() throws SQLException { return 0; } + } + + private static class TestDatabaseMetaData implements DatabaseMetaData { + @Override public T unwrap(Class iface) throws SQLException { return null; } + @Override public boolean isWrapperFor(Class iface) throws SQLException { return false; } + @Override public boolean allProceduresAreCallable() throws SQLException { return false; } + @Override public boolean allTablesAreSelectable() throws SQLException { return false; } + @Override public String getURL() throws SQLException { return null; } + @Override public String getUserName() throws SQLException { return null; } + @Override public boolean isReadOnly() throws SQLException { return false; } + @Override public boolean nullsAreSortedHigh() throws SQLException { return false; } + @Override public boolean nullsAreSortedLow() throws SQLException { return false; } + @Override public boolean nullsAreSortedAtStart() throws SQLException { return false; } + @Override public boolean nullsAreSortedAtEnd() throws SQLException { return false; } + @Override public String getDatabaseProductName() throws SQLException { return null; } + @Override public String getDatabaseProductVersion() throws SQLException { return null; } + @Override public String getDriverName() throws SQLException { return null; } + @Override public String getDriverVersion() throws SQLException { return null; } + @Override public int getDriverMajorVersion() { return 0; } + @Override public int getDriverMinorVersion() { return 0; } + @Override public boolean usesLocalFiles() throws SQLException { return false; } + @Override public boolean usesLocalFilePerTable() throws SQLException { return false; } + @Override public boolean supportsMixedCaseIdentifiers() throws SQLException { return false; } + @Override public boolean storesUpperCaseIdentifiers() throws SQLException { return false; } + @Override public boolean storesLowerCaseIdentifiers() throws SQLException { return false; } + @Override public boolean storesMixedCaseIdentifiers() throws SQLException { return false; } + @Override public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException { return false; } + @Override public boolean storesUpperCaseQuotedIdentifiers() throws SQLException { return false; } + @Override public boolean storesLowerCaseQuotedIdentifiers() throws SQLException { return false; } + @Override public boolean storesMixedCaseQuotedIdentifiers() throws SQLException { return false; } + @Override public String getIdentifierQuoteString() throws SQLException { return null; } + @Override public String getSQLKeywords() throws SQLException { return null; } + @Override public String getNumericFunctions() throws SQLException { return null; } + @Override public String getStringFunctions() throws SQLException { return null; } + @Override public String getSystemFunctions() throws SQLException { return null; } + @Override public String getTimeDateFunctions() throws SQLException { return null; } + @Override public String getSearchStringEscape() throws SQLException { return null; } + @Override public String getExtraNameCharacters() throws SQLException { return null; } + @Override public boolean supportsAlterTableWithAddColumn() throws SQLException { return false; } + @Override public boolean supportsAlterTableWithDropColumn() throws SQLException { return false; } + @Override public boolean supportsColumnAliasing() throws SQLException { return false; } + @Override public boolean nullPlusNonNullIsNull() throws SQLException { return false; } + @Override public boolean supportsConvert() throws SQLException { return false; } + @Override public boolean supportsConvert(int fromType, int toType) throws SQLException { return false; } + @Override public boolean supportsTableCorrelationNames() throws SQLException { return false; } + @Override public boolean supportsDifferentTableCorrelationNames() throws SQLException { return false; } + @Override public boolean supportsExpressionsInOrderBy() throws SQLException { return false; } + @Override public boolean supportsOrderByUnrelated() throws SQLException { return false; } + @Override public boolean supportsGroupBy() throws SQLException { return false; } + @Override public boolean supportsGroupByUnrelated() throws SQLException { return false; } + @Override public boolean supportsGroupByBeyondSelect() throws SQLException { return false; } + @Override public boolean supportsLikeEscapeClause() throws SQLException { return false; } + @Override public boolean supportsMultipleResultSets() throws SQLException { return false; } + @Override public boolean supportsMultipleTransactions() throws SQLException { return false; } + @Override public boolean supportsNonNullableColumns() throws SQLException { return false; } + @Override public boolean supportsMinimumSQLGrammar() throws SQLException { return false; } + @Override public boolean supportsCoreSQLGrammar() throws SQLException { return false; } + @Override public boolean supportsExtendedSQLGrammar() throws SQLException { return false; } + @Override public boolean supportsANSI92EntryLevelSQL() throws SQLException { return false; } + @Override public boolean supportsANSI92IntermediateSQL() throws SQLException { return false; } + @Override public boolean supportsANSI92FullSQL() throws SQLException { return false; } + @Override public boolean supportsIntegrityEnhancementFacility() throws SQLException { return false; } + @Override public boolean supportsOuterJoins() throws SQLException { return false; } + @Override public boolean supportsFullOuterJoins() throws SQLException { return false; } + @Override public boolean supportsLimitedOuterJoins() throws SQLException { return false; } + @Override public String getSchemaTerm() throws SQLException { return null; } + @Override public String getProcedureTerm() throws SQLException { return null; } + @Override public String getCatalogTerm() throws SQLException { return null; } + @Override public boolean isCatalogAtStart() throws SQLException { return false; } + @Override public String getCatalogSeparator() throws SQLException { return null; } + @Override public boolean supportsSchemasInDataManipulation() throws SQLException { return false; } + @Override public boolean supportsSchemasInProcedureCalls() throws SQLException { return false; } + @Override public boolean supportsSchemasInTableDefinitions() throws SQLException { return false; } + @Override public boolean supportsSchemasInIndexDefinitions() throws SQLException { return false; } + @Override public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException { return false; } + @Override public boolean supportsCatalogsInDataManipulation() throws SQLException { return false; } + @Override public boolean supportsCatalogsInProcedureCalls() throws SQLException { return false; } + @Override public boolean supportsCatalogsInTableDefinitions() throws SQLException { return false; } + @Override public boolean supportsCatalogsInIndexDefinitions() throws SQLException { return false; } + @Override public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException { return false; } + @Override public boolean supportsPositionedDelete() throws SQLException { return false; } + @Override public boolean supportsPositionedUpdate() throws SQLException { return false; } + @Override public boolean supportsSelectForUpdate() throws SQLException { return false; } + @Override public boolean supportsStoredProcedures() throws SQLException { return false; } + @Override public boolean supportsSubqueriesInComparisons() throws SQLException { return false; } + @Override public boolean supportsSubqueriesInExists() throws SQLException { return false; } + @Override public boolean supportsSubqueriesInIns() throws SQLException { return false; } + @Override public boolean supportsSubqueriesInQuantifieds() throws SQLException { return false; } + @Override public boolean supportsCorrelatedSubqueries() throws SQLException { return false; } + @Override public boolean supportsUnion() throws SQLException { return false; } + @Override public boolean supportsUnionAll() throws SQLException { return false; } + @Override public boolean supportsOpenCursorsAcrossCommit() throws SQLException { return false; } + @Override public boolean supportsOpenCursorsAcrossRollback() throws SQLException { return false; } + @Override public boolean supportsOpenStatementsAcrossCommit() throws SQLException { return false; } + @Override public boolean supportsOpenStatementsAcrossRollback() throws SQLException { return false; } + @Override public int getMaxBinaryLiteralLength() throws SQLException { return 0; } + @Override public int getMaxCharLiteralLength() throws SQLException { return 0; } + @Override public int getMaxColumnNameLength() throws SQLException { return 0; } + @Override public int getMaxColumnsInGroupBy() throws SQLException { return 0; } + @Override public int getMaxColumnsInIndex() throws SQLException { return 0; } + @Override public int getMaxColumnsInOrderBy() throws SQLException { return 0; } + @Override public int getMaxColumnsInSelect() throws SQLException { return 0; } + @Override public int getMaxColumnsInTable() throws SQLException { return 0; } + @Override public int getMaxConnections() throws SQLException { return 0; } + @Override public int getMaxCursorNameLength() throws SQLException { return 0; } + @Override public int getMaxIndexLength() throws SQLException { return 0; } + @Override public int getMaxSchemaNameLength() throws SQLException { return 0; } + @Override public int getMaxProcedureNameLength() throws SQLException { return 0; } + @Override public int getMaxCatalogNameLength() throws SQLException { return 0; } + @Override public int getMaxRowSize() throws SQLException { return 0; } + @Override public boolean doesMaxRowSizeIncludeBlobs() throws SQLException { return false; } + @Override public int getMaxStatementLength() throws SQLException { return 0; } + @Override public int getMaxStatements() throws SQLException { return 0; } + @Override public int getMaxTableNameLength() throws SQLException { return 0; } + @Override public int getMaxTablesInSelect() throws SQLException { return 0; } + @Override public int getMaxUserNameLength() throws SQLException { return 0; } + @Override public int getDefaultTransactionIsolation() throws SQLException { return 0; } + @Override public boolean supportsTransactions() throws SQLException { return false; } + @Override public boolean supportsTransactionIsolationLevel(int level) throws SQLException { return false; } + @Override public boolean supportsDataDefinitionAndDataManipulationTransactions() throws SQLException { return false; } + @Override public boolean supportsDataManipulationTransactionsOnly() throws SQLException { return false; } + @Override public boolean dataDefinitionCausesTransactionCommit() throws SQLException { return false; } + @Override public boolean dataDefinitionIgnoredInTransactions() throws SQLException { return false; } + @Override public ResultSet getProcedures(String catalog, String schemaPattern, String procedureNamePattern) throws SQLException { return null; } + @Override public ResultSet getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException { return null; } + @Override public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException { return null; } + @Override public ResultSet getSchemas() throws SQLException { return null; } + @Override public ResultSet getCatalogs() throws SQLException { return null; } + @Override public ResultSet getTableTypes() throws SQLException { return null; } + @Override public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException { return null; } + @Override public ResultSet getColumnPrivileges(String catalog, String schema, String table, String columnNamePattern) throws SQLException { return null; } + @Override public ResultSet getTablePrivileges(String catalog, String schemaPattern, String tableNamePattern) throws SQLException { return null; } + @Override public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) throws SQLException { return null; } + @Override public ResultSet getVersionColumns(String catalog, String schema, String table) throws SQLException { return null; } + @Override public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException { return null; } + @Override public ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException { return null; } + @Override public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException { return null; } + @Override public ResultSet getCrossReference(String parentCatalog, String parentSchema, String parentTable, String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException { return null; } + @Override public ResultSet getTypeInfo() throws SQLException { return null; } + @Override public ResultSet getIndexInfo(String catalog, String schema, String table, boolean unique, boolean approximate) throws SQLException { return null; } + @Override public boolean supportsResultSetType(int type) throws SQLException { return false; } + @Override public boolean supportsResultSetConcurrency(int type, int concurrency) throws SQLException { return false; } + @Override public boolean ownUpdatesAreVisible(int type) throws SQLException { return false; } + @Override public boolean ownDeletesAreVisible(int type) throws SQLException { return false; } + @Override public boolean ownInsertsAreVisible(int type) throws SQLException { return false; } + @Override public boolean othersUpdatesAreVisible(int type) throws SQLException { return false; } + @Override public boolean othersDeletesAreVisible(int type) throws SQLException { return false; } + @Override public boolean othersInsertsAreVisible(int type) throws SQLException { return false; } + @Override public boolean updatesAreDetected(int type) throws SQLException { return false; } + @Override public boolean deletesAreDetected(int type) throws SQLException { return false; } + @Override public boolean insertsAreDetected(int type) throws SQLException { return false; } + @Override public boolean supportsBatchUpdates() throws SQLException { return false; } + @Override public ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types) throws SQLException { return null; } + @Override public Connection getConnection() throws SQLException { return CONNECTION; } + @Override public boolean supportsSavepoints() throws SQLException { return false; } + @Override public boolean supportsNamedParameters() throws SQLException { return false; } + @Override public boolean supportsMultipleOpenResults() throws SQLException { return false; } + @Override public boolean supportsGetGeneratedKeys() throws SQLException { return false; } + @Override public ResultSet getSuperTypes(String catalog, String schemaPattern, String typeNamePattern) throws SQLException { return null; } + @Override public ResultSet getSuperTables(String catalog, String schemaPattern, String tableNamePattern) throws SQLException {return null;} + @Override public ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) throws SQLException { return null; } + @Override public boolean supportsResultSetHoldability(int holdability) throws SQLException { return false; } + @Override public int getResultSetHoldability() throws SQLException { return 0; } + @Override public int getDatabaseMajorVersion() throws SQLException { return 0; } + @Override public int getDatabaseMinorVersion() throws SQLException { return 0; } + @Override public int getJDBCMajorVersion() throws SQLException { return 0; } + @Override public int getJDBCMinorVersion() throws SQLException { return 0; } + @Override public int getSQLStateType() throws SQLException { return 0; } + @Override public boolean locatorsUpdateCopy() throws SQLException { return false; } + @Override public boolean supportsStatementPooling() throws SQLException { return false; } + @Override public RowIdLifetime getRowIdLifetime() throws SQLException { return null; } + @Override public ResultSet getSchemas(String catalog, String schemaPattern) throws SQLException { return null; } + @Override public boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException { return false; } + @Override public boolean autoCommitFailureClosesAllResultSets() throws SQLException { return false; } + @Override public ResultSet getClientInfoProperties() throws SQLException { return null; } + @Override public ResultSet getFunctions(String catalog, String schemaPattern, String functionNamePattern) throws SQLException { return null; } + @Override public ResultSet getFunctionColumns(String catalog, String schemaPattern, String functionNamePattern, String columnNamePattern) throws SQLException { return null; } + @Override public ResultSet getPseudoColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException { return null; } + @Override public boolean generatedKeyAlwaysReturned() throws SQLException { return false; } + } + +} diff --git a/test/utils/src/test/java/org/hibernate/tools/test/util/DummyConnectionProviderTest.java b/test/utils/src/test/java/org/hibernate/tools/test/util/DummyConnectionProviderTest.java new file mode 100644 index 0000000000..a7b84c1586 --- /dev/null +++ b/test/utils/src/test/java/org/hibernate/tools/test/util/DummyConnectionProviderTest.java @@ -0,0 +1,31 @@ +package org.hibernate.tools.test.util; + +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.fail; + +import org.hibernate.engine.jdbc.connections.spi.ConnectionProvider; +import org.junit.jupiter.api.Test; + +public class DummyConnectionProviderTest { + + private ConnectionProvider connectionProvider = new DummyConnectionProvider(); + + @Test + public void testGetConnection() { + try { + assertNotNull(connectionProvider.getConnection()); + } catch (Exception e) { + fail(); + } + } + + @Test + public void testCloseConnection() { + try { + connectionProvider.closeConnection(null); + } catch (Exception e) { + fail(); + } + } + +} From b03ab8fe589d6c1ad516f6f7ff9b6454250dd854 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 23 Sep 2021 17:01:51 +0200 Subject: [PATCH 402/560] HBX-2182: Review and adapt the tests to remove the stack traces caused by the dialect and/or connection not being specified - Refactor class 'org.hibernate.tools.test.util.DummyConnectionProvider' Signed-off-by: Koen Aers --- .../tools/test/util/DummyConnectionProvider.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/test/utils/src/main/java/org/hibernate/tools/test/util/DummyConnectionProvider.java b/test/utils/src/main/java/org/hibernate/tools/test/util/DummyConnectionProvider.java index 842fe7f927..f28ad44d6a 100644 --- a/test/utils/src/main/java/org/hibernate/tools/test/util/DummyConnectionProvider.java +++ b/test/utils/src/main/java/org/hibernate/tools/test/util/DummyConnectionProvider.java @@ -4,8 +4,6 @@ import java.sql.Blob; import java.sql.CallableStatement; import java.sql.Clob; -import java.sql.Connection; -import java.sql.DatabaseMetaData; import java.sql.NClob; import java.sql.PreparedStatement; import java.sql.ResultSet; @@ -27,14 +25,14 @@ public class DummyConnectionProvider extends UserSuppliedConnectionProviderImpl private static final long serialVersionUID = 1L; - private static Connection CONNECTION = new TestConnection(); - private static DatabaseMetaData DATABASE_META_DATA = new TestDatabaseMetaData(); + private static Connection CONNECTION = new Connection(); + private static DatabaseMetaData DATABASE_META_DATA = new DatabaseMetaData(); - @Override public Connection getConnection() throws SQLException { return CONNECTION; } + @Override public java.sql.Connection getConnection() throws SQLException { return CONNECTION; } - @Override public void closeConnection(Connection conn) throws SQLException {} + @Override public void closeConnection(java.sql.Connection conn) throws SQLException {} - private static class TestConnection implements Connection { + private static class Connection implements java.sql.Connection { @Override public T unwrap(Class iface) throws SQLException { return null; } @Override public boolean isWrapperFor(Class iface) throws SQLException { return false; } @Override public Statement createStatement() throws SQLException { return null; } @@ -91,7 +89,7 @@ private static class TestConnection implements Connection { @Override public int getNetworkTimeout() throws SQLException { return 0; } } - private static class TestDatabaseMetaData implements DatabaseMetaData { + private static class DatabaseMetaData implements java.sql.DatabaseMetaData { @Override public T unwrap(Class iface) throws SQLException { return null; } @Override public boolean isWrapperFor(Class iface) throws SQLException { return false; } @Override public boolean allProceduresAreCallable() throws SQLException { return false; } From 27e41bc6e930dffe802ff3678756a64c35575ce4 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 23 Sep 2021 17:16:27 +0200 Subject: [PATCH 403/560] HBX-2182: Review and adapt the tests to remove the stack traces caused by the dialect and/or connection not being specified - Rename class 'org.hibernate.tools.test.util.DummyConnectionProvider' to 'org.hibernate.tools.test.util.internal.ConnectionProvider' Signed-off-by: Koen Aers --- .../ConnectionProvider.java} | 4 ++-- .../org/hibernate/tools/test/util/HibernateUtilTest.java | 4 +++- .../ConnectionProviderTest.java} | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) rename test/utils/src/main/java/org/hibernate/tools/test/util/{DummyConnectionProvider.java => internal/ConnectionProvider.java} (99%) rename test/utils/src/test/java/org/hibernate/tools/test/util/{DummyConnectionProviderTest.java => internal/ConnectionProviderTest.java} (72%) diff --git a/test/utils/src/main/java/org/hibernate/tools/test/util/DummyConnectionProvider.java b/test/utils/src/main/java/org/hibernate/tools/test/util/internal/ConnectionProvider.java similarity index 99% rename from test/utils/src/main/java/org/hibernate/tools/test/util/DummyConnectionProvider.java rename to test/utils/src/main/java/org/hibernate/tools/test/util/internal/ConnectionProvider.java index f28ad44d6a..40ce5c809d 100644 --- a/test/utils/src/main/java/org/hibernate/tools/test/util/DummyConnectionProvider.java +++ b/test/utils/src/main/java/org/hibernate/tools/test/util/internal/ConnectionProvider.java @@ -1,4 +1,4 @@ -package org.hibernate.tools.test.util; +package org.hibernate.tools.test.util.internal; import java.sql.Array; import java.sql.Blob; @@ -21,7 +21,7 @@ import org.hibernate.engine.jdbc.connections.internal.UserSuppliedConnectionProviderImpl; -public class DummyConnectionProvider extends UserSuppliedConnectionProviderImpl { +public class ConnectionProvider extends UserSuppliedConnectionProviderImpl { private static final long serialVersionUID = 1L; diff --git a/test/utils/src/test/java/org/hibernate/tools/test/util/HibernateUtilTest.java b/test/utils/src/test/java/org/hibernate/tools/test/util/HibernateUtilTest.java index c93d8d3fa9..3036720e8a 100644 --- a/test/utils/src/test/java/org/hibernate/tools/test/util/HibernateUtilTest.java +++ b/test/utils/src/test/java/org/hibernate/tools/test/util/HibernateUtilTest.java @@ -35,6 +35,7 @@ import org.hibernate.mapping.Table; import org.hibernate.tool.api.metadata.MetadataDescriptor; import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; +import org.hibernate.tools.test.util.internal.ConnectionProvider; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; @@ -75,7 +76,8 @@ public void testInitializeConfiguration() { @Test public void testAddAnnotatedClass() { Properties properties = new Properties(); - properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.put(AvailableSettings.CONNECTION_PROVIDER, ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, null, properties); assertNull(metadataDescriptor diff --git a/test/utils/src/test/java/org/hibernate/tools/test/util/DummyConnectionProviderTest.java b/test/utils/src/test/java/org/hibernate/tools/test/util/internal/ConnectionProviderTest.java similarity index 72% rename from test/utils/src/test/java/org/hibernate/tools/test/util/DummyConnectionProviderTest.java rename to test/utils/src/test/java/org/hibernate/tools/test/util/internal/ConnectionProviderTest.java index a7b84c1586..337157884a 100644 --- a/test/utils/src/test/java/org/hibernate/tools/test/util/DummyConnectionProviderTest.java +++ b/test/utils/src/test/java/org/hibernate/tools/test/util/internal/ConnectionProviderTest.java @@ -1,4 +1,4 @@ -package org.hibernate.tools.test.util; +package org.hibernate.tools.test.util.internal; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.fail; @@ -6,9 +6,9 @@ import org.hibernate.engine.jdbc.connections.spi.ConnectionProvider; import org.junit.jupiter.api.Test; -public class DummyConnectionProviderTest { +public class ConnectionProviderTest { - private ConnectionProvider connectionProvider = new DummyConnectionProvider(); + private ConnectionProvider connectionProvider = new org.hibernate.tools.test.util.internal.ConnectionProvider(); @Test public void testGetConnection() { From 2a5f0efd64e3be2df06f41f2b6a63d327f33b6d8 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 24 Sep 2021 15:30:47 +0200 Subject: [PATCH 404/560] HBX-2182: Review and adapt the tests to remove the stack traces caused by the dialect and/or connection not being specified - Add test 'HibernateUtilTest#testConnectionProviderInstantiation()' and make inner class 'HibernateUtil.ConnectionProvider' a subclass of 'org.hibernate.tools.test.util.internal.ConnectionProvider' Signed-off-by: Koen Aers --- .../tools/test/util/HibernateUtil.java | 17 +++-------------- .../tools/test/util/HibernateUtilTest.java | 5 +++++ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/test/utils/src/main/java/org/hibernate/tools/test/util/HibernateUtil.java b/test/utils/src/main/java/org/hibernate/tools/test/util/HibernateUtil.java index e613bfe3dd..ed2b9c1897 100644 --- a/test/utils/src/main/java/org/hibernate/tools/test/util/HibernateUtil.java +++ b/test/utils/src/main/java/org/hibernate/tools/test/util/HibernateUtil.java @@ -2,16 +2,12 @@ import java.io.File; import java.lang.reflect.Field; -import java.sql.Connection; -import java.sql.DatabaseMetaData; -import java.sql.SQLException; import java.util.Iterator; import java.util.Properties; import org.hibernate.boot.Metadata; import org.hibernate.boot.MetadataSources; import org.hibernate.cfg.AvailableSettings; -import org.hibernate.engine.jdbc.connections.internal.UserSuppliedConnectionProviderImpl; import org.hibernate.mapping.ForeignKey; import org.hibernate.mapping.Table; import org.hibernate.tool.api.metadata.MetadataDescriptor; @@ -21,16 +17,11 @@ public class HibernateUtil { public static class Dialect extends org.hibernate.dialect.Dialect {} - public static class ConnectionProvider extends UserSuppliedConnectionProviderImpl { + public static class ConnectionProvider + extends org.hibernate.tools.test.util.internal.ConnectionProvider { private static final long serialVersionUID = 1L; - @Override - public Connection getConnection() throws SQLException { - return DATABASE_META_DATA.getConnection(); - } - @Override - public void closeConnection(Connection conn) throws SQLException {} } - + public static ForeignKey getForeignKey(Table table, String fkName) { ForeignKey result = null; Iterator iter = table.getForeignKeyIterator(); @@ -88,6 +79,4 @@ public static void addAnnotatedClass( } } - private static DatabaseMetaData DATABASE_META_DATA = new DummyDatabaseMetadata(); - } diff --git a/test/utils/src/test/java/org/hibernate/tools/test/util/HibernateUtilTest.java b/test/utils/src/test/java/org/hibernate/tools/test/util/HibernateUtilTest.java index 3036720e8a..3292845735 100644 --- a/test/utils/src/test/java/org/hibernate/tools/test/util/HibernateUtilTest.java +++ b/test/utils/src/test/java/org/hibernate/tools/test/util/HibernateUtilTest.java @@ -59,6 +59,11 @@ public void testDialectInstantiation() { assertNotNull(new HibernateUtil.Dialect()); } + @Test + public void testConnectionProviderInstantiation() { + assertNotNull(new HibernateUtil.ConnectionProvider()); + } + @Test public void testInitializeConfiguration() { Metadata metadata = HibernateUtil From efde5a13f82f792167d1260990dd4158709e00a2 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sun, 26 Sep 2021 08:35:35 +0200 Subject: [PATCH 405/560] HBX-2182: Review and adapt the tests to remove the stack traces caused by the dialect and/or connection not being specified - Use 'HibernateUtil.ConnectionPovider' as the connection povider in 'org.hibernate.tool.hbm2x.hbm2hbmxml.AbstractTest' Signed-off-by: Koen Aers --- .../hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/TestCase.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/TestCase.java index bc8816d69c..e32f31494b 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/TestCase.java @@ -117,7 +117,8 @@ public void testReadable() { srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/CarPart.hbm.xml")); Properties properties = new Properties(); - properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.put(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); assertNotNull(metadataDescriptor.createMetadata()); From a8ffc05503a96c96b925afeb3fc91831b2719ecf Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 27 Sep 2021 18:28:43 +0200 Subject: [PATCH 406/560] HBX-2182: Review and adapt the tests to remove the stack traces caused by the dialect and/or connection not being specified - Some cleanup in 'org.hibernate.tool.hbm2x.HibernateMappingExporterTest' Signed-off-by: Koen Aers --- .../tool/hbm2x/HibernateMappingExporterTest/TestCase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/HibernateMappingExporterTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/HibernateMappingExporterTest/TestCase.java index 89fdb1a1c0..fcddd3a60e 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/HibernateMappingExporterTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/HibernateMappingExporterTest/TestCase.java @@ -58,8 +58,8 @@ public void testStart() throws Exception { writer.write(FOO_HBM_XML); writer.close(); Properties properties = new Properties(); - properties.setProperty("hibernate.dialect", HibernateUtil.Dialect.class.getName()); - properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); + properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.put(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, new File[] { fooHbmXmlOrigin }, properties); final File outputDir = new File(outputFolder, "output"); From f2fbba1100345fc58a636d28ea4edae0b04c8ad4 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 28 Sep 2021 09:16:07 +0200 Subject: [PATCH 407/560] HBX-2182: Review and adapt the tests to remove the stack traces caused by the dialect and/or connection not being specified - Some cleanup in 'org.hibernate.tool.hbm2x.Hbm2JavaEqualsTest' Signed-off-by: Koen Aers --- .../org/hibernate/tool/hbm2x/Hbm2JavaEqualsTest/TestCase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaEqualsTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaEqualsTest/TestCase.java index 446a96b41e..9ba4dbf4d1 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaEqualsTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2JavaEqualsTest/TestCase.java @@ -85,7 +85,7 @@ public void setUp() throws Exception { fileWriter.close(); Properties properties = new Properties(); properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); - properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); + properties.put(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, new File[] { hbmXml }, properties); Exporter exporter = new POJOExporter(); From 70c142f0fa0bd632a35a2839c92682ae67516f6e Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 28 Sep 2021 10:19:56 +0200 Subject: [PATCH 408/560] HBX-2182: Review and adapt the tests to remove the stack traces caused by the dialect and/or connection not being specified - Some cleanup in 'org.hibernate.tool.hbm2x.DocExporterTest' Signed-off-by: Koen Aers --- .../java/org/hibernate/tool/hbm2x/DocExporterTest/TestCase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/DocExporterTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/DocExporterTest/TestCase.java index 174207fbfc..1d919af351 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/DocExporterTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/DocExporterTest/TestCase.java @@ -86,7 +86,7 @@ public void setUp() throws Exception { Properties properties = new Properties(); properties.put( "jdk5", "true"); // test generics properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); - properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); + properties.put(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); if(File.pathSeparator.equals(";")) { // to work around windows/jvm not seeming to respect executing just "dot" properties.put("dot.executable", System.getProperties().getProperty("dot.executable","dot.exe")); } else { From 8b1c797a39ada355e1c2f7f6e0ea174c963008ab Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 28 Sep 2021 11:43:35 +0200 Subject: [PATCH 409/560] HBX-2182: Review and adapt the tests to remove the stack traces caused by the dialect and/or connection not being specified - Some cleanup in 'org.hibernate.tool.hbm2x.Hbm2CfgTest' Signed-off-by: Koen Aers --- .../tool/hbm2x/Hbm2CfgTest/TestCase.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2CfgTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2CfgTest/TestCase.java index c94ca98e7e..927f38dfc0 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2CfgTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/Hbm2CfgTest/TestCase.java @@ -75,12 +75,12 @@ public void setUp() throws Exception { public void testMagicPropertyHandling() { HibernateConfigurationExporter exporter = new HibernateConfigurationExporter(); Properties properties = exporter.getProperties(); - properties.setProperty( "hibernate.basic", "aValue" ); - properties.setProperty( Environment.SESSION_FACTORY_NAME, "shouldNotShowUp"); - properties.setProperty( Environment.HBM2DDL_AUTO, "false"); - properties.setProperty( "hibernate.temp.use_jdbc_metadata_defaults", "false"); - properties.setProperty("hibernate.dialect", HibernateUtil.Dialect.class.getName()); - properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); + properties.put("hibernate.basic", "aValue" ); + properties.put(AvailableSettings.SESSION_FACTORY_NAME, "shouldNotShowUp"); + properties.put(AvailableSettings.HBM2DDL_AUTO, "false"); + properties.put("hibernate.temp.use_jdbc_metadata_defaults", "false"); + properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.put(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); exporter.setMetadataDescriptor(MetadataDescriptorFactory .createNativeDescriptor(null, null, properties)); exporter.setOutputDirectory(srcDir); @@ -97,9 +97,9 @@ public void testMagicPropertyHandling() { FileUtil.findFirstString("hibernate.temp.use_jdbc_metadata_defaults", file )); exporter = new HibernateConfigurationExporter(); properties = exporter.getProperties(); - properties.setProperty( Environment.HBM2DDL_AUTO, "validator"); - properties.setProperty("hibernate.dialect", HibernateUtil.Dialect.class.getName()); - properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); + properties.put(AvailableSettings.HBM2DDL_AUTO, "validator"); + properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.put(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); exporter.setMetadataDescriptor(MetadataDescriptorFactory .createNativeDescriptor(null, null, properties)); exporter.setOutputDirectory(srcDir); @@ -108,9 +108,9 @@ public void testMagicPropertyHandling() { FileUtil.findFirstString( Environment.HBM2DDL_AUTO, file )); exporter = new HibernateConfigurationExporter(); properties = exporter.getProperties(); - properties.setProperty( AvailableSettings.TRANSACTION_COORDINATOR_STRATEGY, "org.hibernate.console.FakeTransactionManagerLookup"); // Hack for seam-gen console configurations - properties.setProperty("hibernate.dialect", HibernateUtil.Dialect.class.getName()); - properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); + properties.put(AvailableSettings.TRANSACTION_COORDINATOR_STRATEGY, "org.hibernate.console.FakeTransactionManagerLookup"); // Hack for seam-gen console configurations + properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.put(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); exporter.setMetadataDescriptor(MetadataDescriptorFactory .createNativeDescriptor(null, null, properties)); exporter.setOutputDirectory(srcDir); From 4142f4897353038164a5ad374b2b4b0b4b47502e Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 28 Sep 2021 12:52:40 +0200 Subject: [PATCH 410/560] HBX-2182: Review and adapt the tests to remove the stack traces caused by the dialect and/or connection not being specified - Some cleanup in 'org.hibernate.tool.hbm2x.OtherCfg2HbmTest' Signed-off-by: Koen Aers --- .../org/hibernate/tool/hbm2x/OtherCfg2HbmTest/TestCase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/OtherCfg2HbmTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/OtherCfg2HbmTest/TestCase.java index 1abd0d18b1..dc28ef4e67 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/OtherCfg2HbmTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/OtherCfg2HbmTest/TestCase.java @@ -95,7 +95,7 @@ public void testFileExistence() { public void testReadable() { Properties properties = new Properties(); properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); - properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); + properties.put(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); File[] hbmFiles = new File[4]; hbmFiles[0] = new File(srcDir, "org/hibernate/tool/hbm2x/Customer.hbm.xml"); hbmFiles[1] = new File(srcDir, "org/hibernate/tool/hbm2x/LineItem.hbm.xml"); From 104ddf879dd069fe820667f0a87aa575563209f4 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 28 Sep 2021 15:56:51 +0200 Subject: [PATCH 411/560] HBX-2182: Review and adapt the tests to remove the stack traces caused by the dialect and/or connection not being specified - Some cleanup in 'org.hibernate.tool.hbm2x.CompositeElementTest' Signed-off-by: Koen Aers --- .../tool/hbm2x/hbm2hbmxml/CompositeElementTest/TestCase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/TestCase.java index 11e02382e8..7c37acee17 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/TestCase.java @@ -100,8 +100,8 @@ public void testReadable() { srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/CompositeElementTest/Glarch.hbm.xml")); Properties properties = new Properties(); - properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); - properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); + properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.put(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); assertNotNull(metadataDescriptor.createMetadata()); From 65df5d424edf160561d81dd048103878b7b95d45 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 28 Sep 2021 16:42:08 +0200 Subject: [PATCH 412/560] HBX-2182: Review and adapt the tests to remove the stack traces caused by the dialect and/or connection not being specified - Some cleanup in 'org.hibernate.tool.hbm2x.ManyToManyTest' Signed-off-by: Koen Aers --- .../tool/hbm2x/hbm2hbmxml/ManyToManyTest/TestCase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/TestCase.java index 79683801a6..1b228d9418 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/TestCase.java @@ -106,8 +106,8 @@ public void testReadable() { srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/ManyToManyTest/Group.hbm.xml")); Properties properties = new Properties(); - properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); - properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); + properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.put(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); assertNotNull(metadataDescriptor.createMetadata()); From d3608ca653ec755ff78840e9f62671f2eb2f33db Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 28 Sep 2021 18:49:48 +0200 Subject: [PATCH 413/560] HBX-2182: Review and adapt the tests to remove the stack traces caused by the dialect and/or connection not being specified - Some cleanup in 'org.hibernate.tool.hbm2x.ListArrayTest' Signed-off-by: Koen Aers --- .../tool/hbm2x/hbm2hbmxml/ListArrayTest/TestCase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/TestCase.java index e2c7653aec..b48b729fdb 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/TestCase.java @@ -97,8 +97,8 @@ public void testReadable() { srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/ListArrayTest/Glarch.hbm.xml")); Properties properties = new Properties(); - properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); - properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); + properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.put(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); assertNotNull(metadataDescriptor.createMetadata()); From 293187079d77861e7789ca83ce89fd889e2632b7 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 29 Sep 2021 08:23:41 +0200 Subject: [PATCH 414/560] HBX-2182: Review and adapt the tests to remove the stack traces caused by the dialect and/or connection not being specified - Some cleanup in 'org.hibernate.tool.hbm2x.hbm2hbmxml.SetElementTest' Signed-off-by: Koen Aers --- .../tool/hbm2x/hbm2hbmxml/SetElementTest/TestCase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/SetElementTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/SetElementTest/TestCase.java index e1d27781d8..d8a178f62f 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/SetElementTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/SetElementTest/TestCase.java @@ -91,8 +91,8 @@ public void testReadable() { srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/SetElementTest/Search.hbm.xml"); Properties properties = new Properties(); - properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); - properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); + properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.put(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); File[] files = new File[] { searchHbmXml }; MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files, properties); From de49a9b8da82a741e0f96a06c646f2cb9477234f Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 29 Sep 2021 09:45:51 +0200 Subject: [PATCH 415/560] HBX-2182: Review and adapt the tests to remove the stack traces caused by the dialect and/or connection not being specified - Some cleanup in 'org.hibernate.tool.hbm2x.hbm2hbmxml.JoinTest' Signed-off-by: Koen Aers --- .../hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/TestCase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/TestCase.java index 0ad2fa6579..201d9dec1a 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/TestCase.java @@ -77,8 +77,8 @@ public void testReadable() { srcDir, "/org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Child.hbm.xml")); Properties properties = new Properties(); - properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); - properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); + properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.put(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); assertNotNull(metadataDescriptor.createMetadata()); From a6f3a0564f4ad40a895f6b53cc2b7bc3b010c997 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 29 Sep 2021 11:04:25 +0200 Subject: [PATCH 416/560] HBX-2182: Review and adapt the tests to remove the stack traces caused by the dialect and/or connection not being specified - Some cleanup in 'org.hibernate.tool.hbm2x.hbm2hbmxml.OneToOneTest' Signed-off-by: Koen Aers --- .../tool/hbm2x/hbm2hbmxml/OneToOneTest/TestCase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/TestCase.java index f83415b5bf..925d60215f 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/TestCase.java @@ -107,8 +107,8 @@ public void testReadable() { srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/OneToOneTest/Address.hbm.xml"); Properties properties = new Properties(); - properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); - properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); + properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.put(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); File[] files = new File[] { personHbmXml, addressHbmXml }; MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files, properties); From f78b2fedc7dbbb2acde3f83a12f1f3547fbd919c Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 29 Sep 2021 12:10:37 +0200 Subject: [PATCH 417/560] HBX-2182: Review and adapt the tests to remove the stack traces caused by the dialect and/or connection not being specified - Some cleanup in 'org.hibernate.tool.hbm2x.hbm2hbmxml.IdBagTest' Signed-off-by: Koen Aers --- .../hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/TestCase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/TestCase.java index 82717cb357..4353ebfa21 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/TestCase.java @@ -110,8 +110,8 @@ public void testReadable() { srcDir, "/org/hibernate/tool/hbm2x/hbm2hbmxml/IdBagTest/Group.hbm.xml")); Properties properties = new Properties(); - properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); - properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); + properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.put(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); assertNotNull(metadataDescriptor.createMetadata()); From 7cd8c528f9376e28e772aeaeb145b8f0a50411f4 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 29 Sep 2021 14:11:59 +0200 Subject: [PATCH 418/560] HBX-2182: Review and adapt the tests to remove the stack traces caused by the dialect and/or connection not being specified - Some cleanup in 'org.hibernate.tool.hbm2x.hbm2hbmxml.MapAndAnyTest' Signed-off-by: Koen Aers --- .../tool/hbm2x/hbm2hbmxml/MapAndAnyTest/TestCase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/TestCase.java index 32a999fd29..441740e60f 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/TestCase.java @@ -118,8 +118,8 @@ public void testReadable() { srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/MapAndAnyTest/PropertySet.hbm.xml")); Properties properties = new Properties(); - properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); - properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); + properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.put(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[4]), properties); assertNotNull(metadataDescriptor.createMetadata()); From 0a92904c2b0a6209f5679a2f6775876471738ebe Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 29 Sep 2021 14:56:57 +0200 Subject: [PATCH 419/560] HBX-2182: Review and adapt the tests to remove the stack traces caused by the dialect and/or connection not being specified - Some cleanup in 'org.hibernate.tool.hbm2x.hbm2hbmxml.DynamicComponentTest' Signed-off-by: Koen Aers --- .../tool/hbm2x/hbm2hbmxml/DynamicComponentTest/TestCase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/TestCase.java index f584648c05..20f5f26bca 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/TestCase.java @@ -99,8 +99,8 @@ public void testReadable() { srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/DynamicComponentTest/Glarch.hbm.xml")); Properties properties = new Properties(); - properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); - properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); + properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.put(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); assertNotNull(metadataDescriptor.createMetadata()); From e45576e465b3384d6f9932bdcb3d366c2413bcb8 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 30 Sep 2021 09:26:22 +0200 Subject: [PATCH 420/560] HBX-2182: Review and adapt the tests to remove the stack traces caused by the dialect and/or connection not being specified - Some cleanup in 'org.hibernate.tool.hbm2x.hbm2hbmxml.BackrefTest' Signed-off-by: Koen Aers --- .../hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/TestCase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/TestCase.java index b8816ebfd9..9c3b4039c3 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/TestCase.java @@ -106,8 +106,8 @@ public void testReadable() { srcDir, "org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/CarPart.hbm.xml")); Properties properties = new Properties(); - properties.setProperty(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); - properties.setProperty(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + properties.put(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); + properties.put(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); MetadataDescriptor metadataDescriptor = MetadataDescriptorFactory .createNativeDescriptor(null, files.toArray(new File[2]), properties); assertNotNull(metadataDescriptor.createMetadata()); From 38c56c0026d755bbe0423642741b0900337c6681 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 30 Sep 2021 09:51:09 +0200 Subject: [PATCH 421/560] HBX-2182: Review and adapt the tests to remove the stack traces caused by the dialect and/or connection not being specified - Use 'HibernateUtil.ConnectionPovider' as the connection povider in 'org.hibernate.tool.ide.completion.ModelCompletion' Signed-off-by: Koen Aers --- .../tool/ide/completion/ModelCompletion/TestCase.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/ide/completion/ModelCompletion/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/ide/completion/ModelCompletion/TestCase.java index 9731afe5f3..18afff6f67 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/ide/completion/ModelCompletion/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/ide/completion/ModelCompletion/TestCase.java @@ -679,7 +679,8 @@ protected int getCaretPosition(String str) { private Metadata buildMetadata() { StandardServiceRegistryBuilder ssrb = new StandardServiceRegistryBuilder(); - ssrb.applySetting(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + ssrb.applySetting(AvailableSettings.DIALECT, HibernateUtil.Dialect.class.getName()); + ssrb.applySetting(AvailableSettings.CONNECTION_PROVIDER, HibernateUtil.ConnectionProvider.class.getName()); MetadataSources metadataSources = new MetadataSources() .addInputStream(getClass().getResourceAsStream("Product.hbm.xml")) .addInputStream(getClass().getResourceAsStream("Store.hbm.xml")) From b9ad855bf8e11694b8cb1d84dd019ebe02b9d3ab Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 30 Sep 2021 16:57:13 +0200 Subject: [PATCH 422/560] HBX-2224: Update Hibernate Core dependency to version 5.6.0.CR1 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5c57d45584..f2e4d78c3e 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ 1.7 1.4.200 5.1.2.Final - 5.6.0.Beta2 + 5.6.0.CR1 2.5.2 8.0.1 2.2 From 05c405b81b856124cdf2eb729ebf149adb619aa1 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 1 Oct 2021 09:18:11 +0200 Subject: [PATCH 423/560] HBX-2225: Update version identifier to 5.6.0.CR1 Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 6e047b626c..91535eca42 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.0-SNAPSHOT + 5.6.0.CR1 hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index e6569eb993..bc03da0d57 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.0-SNAPSHOT"; + public static final String VERSION = "5.6.0.CR1"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index b9f63b32b6..1473bd2378 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.0-SNAPSHOT + 5.6.0.CR1 hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index f2e4d78c3e..901fc58904 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.0-SNAPSHOT + 5.6.0.CR1 pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 2af710f81a..950dc62b94 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.CR1 hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 1573138b50..3cc9fb8608 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.CR1 hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index b771c2cc15..17b25a52fc 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.CR1 hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 3d49ad61ab..e4b733c974 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.CR1 hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 4d36616c70..c48f0d2bb1 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.CR1 hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index b29bafd3de..9cfeb96801 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.CR1 hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index e4f92d085b..f12ede6816 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.CR1 hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 5e8104c126..dd74d3c4b4 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.CR1 hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 84715f8d59..6c778e3fd4 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.0-SNAPSHOT + 5.6.0.CR1 hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 1034335c09..4355bf90d8 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.CR1 hibernate-tools-tests-utils From 0a4cb6fcceaf2dd0ae0acdad119daf06f99c069f Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 12 Oct 2021 13:26:32 +0200 Subject: [PATCH 424/560] HBX-2226: Update version identifier to 5.6.0-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 91535eca42..6e047b626c 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.0.CR1 + 5.6.0-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index bc03da0d57..e6569eb993 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.0.CR1"; + public static final String VERSION = "5.6.0-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 1473bd2378..b9f63b32b6 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.0.CR1 + 5.6.0-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 901fc58904..f2e4d78c3e 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.0.CR1 + 5.6.0-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 950dc62b94..2af710f81a 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.CR1 + 5.6.0-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 3cc9fb8608..1573138b50 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.CR1 + 5.6.0-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 17b25a52fc..b771c2cc15 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.CR1 + 5.6.0-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index e4b733c974..3d49ad61ab 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.CR1 + 5.6.0-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index c48f0d2bb1..4d36616c70 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.CR1 + 5.6.0-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 9cfeb96801..b29bafd3de 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.CR1 + 5.6.0-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index f12ede6816..e4f92d085b 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.CR1 + 5.6.0-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index dd74d3c4b4..5e8104c126 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.CR1 + 5.6.0-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 6c778e3fd4..84715f8d59 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.0.CR1 + 5.6.0-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 4355bf90d8..1034335c09 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.CR1 + 5.6.0-SNAPSHOT hibernate-tools-tests-utils From 5828c962e9f11d8af28bc5044dfd0353820db56d Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 4 Oct 2021 10:57:36 +0200 Subject: [PATCH 425/560] HBX-2228: Add a 'mysql' test profile Signed-off-by: Koen Aers --- test/pom.xml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/test/pom.xml b/test/pom.xml index 84715f8d59..8adfb7b24e 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -50,6 +50,14 @@ h2 + + hsql + + utils + common + hsql + + mssql @@ -58,14 +66,14 @@ mssql - - hsql - - utils - common - hsql - - + + mysql + + utils + common + mysql + + oracle From 5b9c79306f82110e1b22325847f3132ec434172c Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 4 Oct 2021 18:29:58 +0200 Subject: [PATCH 426/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Perform changes in module 'test/mysql' Signed-off-by: Koen Aers --- pom.xml | 2 +- test/mysql/pom.xml | 10 ++--- .../DefaultDatabaseCollector/TestCase.java | 44 ++++++++++--------- .../hbm2x/DefaultSchemaCatalog/TestCase.java | 39 ++++++++-------- .../tool/test/db/mysql/TestSuite.java | 35 +++++++++++---- .../src/test/resources/hibernate.properties | 4 +- 6 files changed, 79 insertions(+), 55 deletions(-) rename test/mysql/src/{main => test}/java/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/TestCase.java (77%) rename test/mysql/src/{main => test}/java/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/TestCase.java (80%) diff --git a/pom.xml b/pom.xml index f2e4d78c3e..0fb278d09a 100644 --- a/pom.xml +++ b/pom.xml @@ -55,7 +55,7 @@ 1.2.0 4.13.2 5.7.2 - 6.0.6 + 8.0.22 19.3.0.0 9.2.1.jre8 diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index b29bafd3de..1e5e85e93e 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -16,11 +16,7 @@ Hibernate Tools MySQL Tests Project - - junit - junit - - + mysql mysql-connector-java @@ -28,6 +24,10 @@ org.hibernate hibernate-tools-tests-common + + org.junit.jupiter + junit-jupiter-engine + diff --git a/test/mysql/src/main/java/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/TestCase.java b/test/mysql/src/test/java/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/TestCase.java similarity index 77% rename from test/mysql/src/main/java/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/TestCase.java rename to test/mysql/src/test/java/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/TestCase.java index c3b9eca2e8..87e2fe2153 100644 --- a/test/mysql/src/main/java/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/TestCase.java +++ b/test/mysql/src/test/java/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/TestCase.java @@ -10,6 +10,11 @@ ******************************************************************************/ package org.hibernate.tool.hbm2x.DefaultDatabaseCollector; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -35,11 +40,10 @@ import org.hibernate.service.ServiceRegistry; import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** * @author Dmitry Geraskov @@ -47,18 +51,18 @@ */ public class TestCase { - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } // TODO Reenable this test (HBX-1401) - @Ignore + @Disabled @Test public void testReadOnlySpecificSchema() { OverrideRepository or = new OverrideRepository(); @@ -68,7 +72,7 @@ public void testReadOnlySpecificSchema() { .createJdbcDescriptor(res, null, true) .createMetadata(); List
tables = getTables(metadata); - Assert.assertEquals(2,tables.size()); + assertEquals(2,tables.size()); Table catchild = (Table) tables.get(0); Table catmaster = (Table) tables.get(1); if(catchild.getName().equals("cat.master")) { @@ -77,8 +81,8 @@ public void testReadOnlySpecificSchema() { } TableIdentifier masterid = TableIdentifier.create(catmaster); TableIdentifier childid = TableIdentifier.create(catchild); - Assert.assertEquals(new TableIdentifier(null, "cat.cat", "cat.child"), childid); - Assert.assertEquals(new TableIdentifier(null, "cat.cat", "cat.master"), masterid); + assertEquals(new TableIdentifier(null, "cat.cat", "cat.child"), childid); + assertEquals(new TableIdentifier(null, "cat.cat", "cat.master"), masterid); } @Test @@ -88,9 +92,9 @@ public void testNeedQuote() { ssrb.applySettings(properties); ServiceRegistry serviceRegistry = ssrb.build(); MetaDataDialect realMetaData = MetaDataDialectFactory.createMetaDataDialect( serviceRegistry.getService(JdbcServices.class).getDialect(), properties); - Assert.assertTrue("The name must be quoted!", realMetaData.needQuote("cat.cat")); - Assert.assertTrue("The name must be quoted!", realMetaData.needQuote("cat.child")); - Assert.assertTrue("The name must be quoted!", realMetaData.needQuote("cat.master")); + assertTrue(realMetaData.needQuote("cat.cat"), "The name must be quoted!"); + assertTrue(realMetaData.needQuote("cat.child"), "The name must be quoted!"); + assertTrue(realMetaData.needQuote("cat.master"), "The name must be quoted!"); } /** @@ -102,7 +106,7 @@ public void testNeedQuote() { * but getTable uses non-quoted names ) */ // TODO Reenable this test (HBX-1401) - @Ignore + @Disabled @Test public void testQuotedNamesAndDefaultDatabaseCollector() { Properties properties = Environment.getProperties(); @@ -117,11 +121,11 @@ properties, new DefaultReverseEngineeringStrategy(), DatabaseCollector dc = new DefaultDatabaseCollector(reader.getMetaDataDialect()); reader.readDatabaseSchema( dc, null, "cat.cat" ); String defaultCatalog = properties.getProperty(AvailableSettings.DEFAULT_CATALOG); - Assert.assertNotNull("The table should be found", dc.getTable("cat.cat", defaultCatalog, "cat.child")); - Assert.assertNotNull("The table should be found", dc.getTable("cat.cat", defaultCatalog, "cat.master")); - Assert.assertNull("Quoted names should not return the table", dc.getTable(quote("cat.cat"), defaultCatalog, quote("cat.child"))); - Assert.assertNull("Quoted names should not return the table", dc.getTable(quote("cat.cat"), defaultCatalog, quote("cat.master"))); - Assert.assertEquals("Foreign key 'masterref' was filtered!", 1, dc.getOneToManyCandidates().size()); + assertNotNull(dc.getTable("cat.cat", defaultCatalog, "cat.child"), "The table should be found"); + assertNotNull(dc.getTable("cat.cat", defaultCatalog, "cat.master"), "The table should be found"); + assertNull(dc.getTable(quote("cat.cat"), defaultCatalog, quote("cat.child")), "Quoted names should not return the table"); + assertNull(dc.getTable(quote("cat.cat"), defaultCatalog, quote("cat.master")), "Quoted names should not return the table"); + assertEquals(1, dc.getOneToManyCandidates().size(), "Foreign key 'masterref' was filtered!"); } private static String quote(String name) { diff --git a/test/mysql/src/main/java/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/TestCase.java b/test/mysql/src/test/java/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/TestCase.java similarity index 80% rename from test/mysql/src/main/java/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/TestCase.java rename to test/mysql/src/test/java/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/TestCase.java index 054736c384..87359d00d7 100644 --- a/test/mysql/src/main/java/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/TestCase.java +++ b/test/mysql/src/test/java/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/TestCase.java @@ -4,6 +4,9 @@ */ package org.hibernate.tool.hbm2x.DefaultSchemaCatalog; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.fail; + import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; @@ -21,12 +24,10 @@ import org.hibernate.mapping.Table; import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; - +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; /** @@ -36,17 +37,17 @@ */ public class TestCase { - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } - @Ignore + @Disabled @Test public void testReadOnlySpecificSchema() { OverrideRepository or = new OverrideRepository(); @@ -56,7 +57,7 @@ public void testReadOnlySpecificSchema() { .createJdbcDescriptor(res, null, true) .createMetadata(); List
tables = getTables(metadata); - Assert.assertEquals(2,tables.size()); + assertEquals(2,tables.size()); Table catchild = (Table) tables.get(0); Table catmaster = (Table) tables.get(1); if(catchild.getName().equals("CATMASTER")) { @@ -65,11 +66,11 @@ public void testReadOnlySpecificSchema() { } TableIdentifier masterid = TableIdentifier.create(catmaster); TableIdentifier childid = TableIdentifier.create(catchild); - Assert.assertEquals(new TableIdentifier(null, "OVRTEST", "CATMASTER"), masterid); - Assert.assertEquals(new TableIdentifier(null, "OVRTEST", "CATCHILD"), childid); + assertEquals(new TableIdentifier(null, "OVRTEST", "CATMASTER"), masterid); + assertEquals(new TableIdentifier(null, "OVRTEST", "CATCHILD"), childid); } - @Ignore + @Disabled @Test public void testOverlapping() { OverrideRepository or = new OverrideRepository(); @@ -86,12 +87,12 @@ public void testOverlapping() { Table element = iter.next(); boolean added = tables.add(TableIdentifier.create(element)); if(!added) - Assert.fail("duplicate table found for " + element); + fail("duplicate table found for " + element); } - Assert.assertEquals(4,tables.size()); + assertEquals(4,tables.size()); } - @Ignore + @Disabled @Test public void testUseDefault() { Properties properties = new Properties(); @@ -101,7 +102,7 @@ public void testUseDefault() { .createJdbcDescriptor(null, properties, true) .createMetadata(); List
tables = getTables(metadata); - Assert.assertEquals(2,tables.size()); + assertEquals(2,tables.size()); Table catchild = (Table) tables.get(0); Table catmaster = (Table) tables.get(1); if(catchild.getName().equals("CATMASTER")) { @@ -110,8 +111,8 @@ public void testUseDefault() { } TableIdentifier masterid = TableIdentifier.create(catmaster); TableIdentifier childid = TableIdentifier.create(catchild); - Assert.assertEquals("jdbcreader has not nulled out according to default schema", new TableIdentifier(null, null, "CATMASTER"), masterid); - Assert.assertEquals("jdbcreader has not nulled out according to default schema", new TableIdentifier(null, null, "CATCHILD"), childid); + assertEquals(new TableIdentifier(null, null, "CATMASTER"), masterid, "jdbcreader has not nulled out according to default schema"); + assertEquals(new TableIdentifier(null, null, "CATCHILD"), childid, "jdbcreader has not nulled out according to default schema"); } private List
getTables(Metadata metadata) { diff --git a/test/mysql/src/test/java/org/hibernate/tool/test/db/mysql/TestSuite.java b/test/mysql/src/test/java/org/hibernate/tool/test/db/mysql/TestSuite.java index 93d88907ff..79cc65bedd 100644 --- a/test/mysql/src/test/java/org/hibernate/tool/test/db/mysql/TestSuite.java +++ b/test/mysql/src/test/java/org/hibernate/tool/test/db/mysql/TestSuite.java @@ -1,11 +1,30 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2004-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.test.db.mysql; -import org.hibernate.tools.test.util.DbSuite; -import org.junit.runner.RunWith; -import org.junit.runners.Suite.SuiteClasses; +import org.hibernate.tool.test.db.DbTestSuite; +import org.junit.jupiter.api.Nested; -@RunWith(DbSuite.class) -@SuiteClasses({ - org.hibernate.tool.test.db.CommonTestSuite.class -}) -public class TestSuite {} +public class TestSuite { + + @Nested + public class SqlServerTestSuite extends DbTestSuite {} + +} diff --git a/test/mysql/src/test/resources/hibernate.properties b/test/mysql/src/test/resources/hibernate.properties index 0cebc65bb3..c10d836970 100644 --- a/test/mysql/src/test/resources/hibernate.properties +++ b/test/mysql/src/test/resources/hibernate.properties @@ -1,7 +1,7 @@ -hibernate.dialect org.hibernate.dialect.MySQL5InnoDBDialect +hibernate.dialect org.hibernate.dialect.MySQLDialect hibernate.connection.driver_class com.mysql.cj.jdbc.Driver hibernate.connection.username root hibernate.connection.password P@55w0rd -hibernate.connection.url jdbc:mysql://localhost:3306/htt?useSSL=false +hibernate.connection.url jdbc:mysql://localhost:3306/htt?useSSL=false&allowPublicKeyRetrieval=true hibernate.default_catalog htt From 4af1302bd47f83b0f92a0740357c1f3321612741 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 5 Oct 2021 08:49:25 +0200 Subject: [PATCH 427/560] HBX-2229: Remove the dependency on 'com.microsoft.sqlserver.mssql-jdbc' from module 'org.hibernate.tool.hibernate-tools-tests-utils' Signed-off-by: Koen Aers --- test/utils/pom.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 1034335c09..5d5adf0999 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -25,10 +25,6 @@ com.h2database h2 - - - com.microsoft.sqlserver - mssql-jdbc org.hibernate From 3113cfe76554418dd2880b2c4144df5b6a3c7ecd Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 6 Oct 2021 18:56:45 +0200 Subject: [PATCH 428/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Move content of 'src/main/' to 'src/test/' in module 'test/h2' and remove unneeded dependencies on 'junit.junit' and 'org.junit.vintage.junit-vintage-engine' Signed-off-by: Koen Aers --- .../org/hibernate/tool/jdbc2cfg/Identity/create.sql | 0 .../org/hibernate/tool/jdbc2cfg/Identity/drop.sql | 0 test/oracle/pom.xml | 8 -------- 3 files changed, 8 deletions(-) rename test/h2/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql (100%) rename test/h2/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql (100%) diff --git a/test/h2/src/main/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql b/test/h2/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql similarity index 100% rename from test/h2/src/main/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql rename to test/h2/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql diff --git a/test/h2/src/main/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql b/test/h2/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql similarity index 100% rename from test/h2/src/main/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql rename to test/h2/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 5e8104c126..2249489cc7 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -16,10 +16,6 @@ Hibernate Tools Oracle Tests Project - - junit - junit - com.oracle.ojdbc ojdbc8 @@ -32,10 +28,6 @@ org.junit.jupiter junit-jupiter-engine - - org.junit.vintage - junit-vintage-engine - From 0a2441f70f7752712ab1c2aa57c773c04fe61494 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 6 Oct 2021 19:44:28 +0200 Subject: [PATCH 429/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Move content of 'src/main/' to 'src/test/' in module 'test/hsql' Signed-off-by: Koen Aers --- .../resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename test/hsql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql (100%) rename test/hsql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql (100%) diff --git a/test/hsql/src/main/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql b/test/hsql/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql similarity index 100% rename from test/hsql/src/main/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql rename to test/hsql/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql diff --git a/test/hsql/src/main/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql b/test/hsql/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql similarity index 100% rename from test/hsql/src/main/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql rename to test/hsql/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql From fe4afbf12b9a0139cda4e4fa0140ad1b7aab0bc1 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 6 Oct 2021 20:13:42 +0200 Subject: [PATCH 430/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Move content of 'src/main/' to 'src/test/' in module 'test/mssql' Signed-off-by: Koen Aers --- .../resources/org/hibernate/tool/ant/AntHibernateTool/create.sql | 0 .../resources/org/hibernate/tool/ant/AntHibernateTool/drop.sql | 0 .../resources/org/hibernate/tool/ant/Cfg2HbmNoError/create.sql | 0 .../resources/org/hibernate/tool/ant/Cfg2HbmNoError/drop.sql | 0 .../tool/ant/Cfg2HbmWithCustomReverseNamingStrategy/create.sql | 0 .../tool/ant/Cfg2HbmWithCustomReverseNamingStrategy/drop.sql | 0 .../org/hibernate/tool/ant/Cfg2HbmWithPackageName/create.sql | 0 .../org/hibernate/tool/ant/Cfg2HbmWithPackageName/drop.sql | 0 .../ant/Cfg2HbmWithPackageNameAndReverseNamingStrategy/create.sql | 0 .../ant/Cfg2HbmWithPackageNameAndReverseNamingStrategy/drop.sql | 0 .../resources/org/hibernate/tool/ant/EJB3Configuration/create.sql | 0 .../resources/org/hibernate/tool/ant/EJB3Configuration/drop.sql | 0 .../org/hibernate/tool/ant/JDBCConfigWithRevEngXml/create.sql | 0 .../org/hibernate/tool/ant/JDBCConfigWithRevEngXml/drop.sql | 0 .../resources/org/hibernate/tool/ant/JDBCConfiguration/create.sql | 0 .../resources/org/hibernate/tool/ant/JDBCConfiguration/drop.sql | 0 .../resources/org/hibernate/tool/ant/JPABogusPUnit/create.sql | 0 .../resources/org/hibernate/tool/ant/JPABogusPUnit/drop.sql | 0 .../resources/org/hibernate/tool/ant/JPAPUnit/create.sql | 0 .../resources/org/hibernate/tool/ant/JPAPUnit/drop.sql | 0 .../org/hibernate/tool/ant/JPAPropertyOverridesPUnit/create.sql | 0 .../org/hibernate/tool/ant/JPAPropertyOverridesPUnit/drop.sql | 0 .../resources/org/hibernate/tool/ant/Query/create.sql | 0 .../resources/org/hibernate/tool/ant/Query/drop.sql | 0 .../resources/org/hibernate/tool/cfg/DriverMetaData/create.sql | 0 .../resources/org/hibernate/tool/cfg/DriverMetaData/drop.sql | 0 .../org/hibernate/tool/cfg/JDBCMetaDataConfiguration/create.sql | 0 .../org/hibernate/tool/cfg/JDBCMetaDataConfiguration/drop.sql | 0 .../resources/org/hibernate/tool/hbm2x/CachedMetaData/create.sql | 0 .../resources/org/hibernate/tool/hbm2x/CachedMetaData/drop.sql | 0 .../org/hibernate/tool/hbm2x/DefaultDatabaseCollector/create.sql | 0 .../org/hibernate/tool/hbm2x/DefaultDatabaseCollector/drop.sql | 0 .../org/hibernate/tool/hbm2x/DefaultSchemaCatalog/create.sql | 0 .../org/hibernate/tool/hbm2x/DefaultSchemaCatalog/drop.sql | 0 .../org/hibernate/tool/hbm2x/GenerateFromJDBC/create.sql | 0 .../resources/org/hibernate/tool/hbm2x/GenerateFromJDBC/drop.sql | 0 .../tool/hbm2x/GenerateFromJDBCWithJavaKeyword/create.sql | 0 .../hibernate/tool/hbm2x/GenerateFromJDBCWithJavaKeyword/drop.sql | 0 .../org/hibernate/tool/hbm2x/IncrementalSchemaReading/create.sql | 0 .../org/hibernate/tool/hbm2x/IncrementalSchemaReading/drop.sql | 0 .../org/hibernate/tool/hbm2x/JdbcHbm2JavaEjb3/create.sql | 0 .../resources/org/hibernate/tool/hbm2x/JdbcHbm2JavaEjb3/drop.sql | 0 .../org/hibernate/tool/hbm2x/query/QueryExporterTest/create.sql | 0 .../org/hibernate/tool/hbm2x/query/QueryExporterTest/drop.sql | 0 .../org/hibernate/tool/hbmlint/SchemaAnalyzer/create.sql | 0 .../resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/drop.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/AutoQuote/create.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/AutoQuote/drop.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/Basic/create.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/Basic/drop.sql | 0 .../org/hibernate/tool/jdbc2cfg/BasicMultiSchema/create.sql | 0 .../org/hibernate/tool/jdbc2cfg/BasicMultiSchema/drop.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/CompositeId/create.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/CompositeId/data.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/CompositeId/drop.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/ForeignKeys/create.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/ForeignKeys/drop.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/Index/create.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/Index/drop.sql | 0 .../org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/create.sql | 0 .../org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/data.sql | 0 .../org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/drop.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/ManyToMany/create.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/ManyToMany/drop.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/MetaData/create.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/MetaData/drop.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/NoPrimaryKey/create.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/NoPrimaryKey/drop.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/OneToOne/create.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/OneToOne/drop.sql | 0 .../org/hibernate/tool/jdbc2cfg/OverrideBinder/create.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/drop.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/Performance/create.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/Performance/drop.sql | 0 .../org/hibernate/tool/jdbc2cfg/PersistentClasses/create.sql | 0 .../org/hibernate/tool/jdbc2cfg/PersistentClasses/drop.sql | 0 .../org/hibernate/tool/jdbc2cfg/RevEngForeignKey/create.sql | 0 .../org/hibernate/tool/jdbc2cfg/RevEngForeignKey/drop.sql | 0 .../org/hibernate/tool/jdbc2cfg/SearchEscapeString/create.sql | 0 .../org/hibernate/tool/jdbc2cfg/SearchEscapeString/drop.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/Versioning/create.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/Versioning/drop.sql | 0 .../resources/org/hibernate/tool/stat/Statistics/create.sql | 0 .../resources/org/hibernate/tool/stat/Statistics/drop.sql | 0 86 files changed, 0 insertions(+), 0 deletions(-) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/AntHibernateTool/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/AntHibernateTool/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/Cfg2HbmNoError/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/Cfg2HbmNoError/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/Cfg2HbmWithCustomReverseNamingStrategy/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/Cfg2HbmWithCustomReverseNamingStrategy/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/Cfg2HbmWithPackageName/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/Cfg2HbmWithPackageName/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/Cfg2HbmWithPackageNameAndReverseNamingStrategy/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/Cfg2HbmWithPackageNameAndReverseNamingStrategy/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/EJB3Configuration/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/EJB3Configuration/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/JDBCConfigWithRevEngXml/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/JDBCConfigWithRevEngXml/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/JDBCConfiguration/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/JDBCConfiguration/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/JPABogusPUnit/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/JPABogusPUnit/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/JPAPUnit/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/JPAPUnit/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/JPAPropertyOverridesPUnit/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/JPAPropertyOverridesPUnit/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/Query/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/ant/Query/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/cfg/DriverMetaData/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/cfg/DriverMetaData/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/cfg/JDBCMetaDataConfiguration/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/cfg/JDBCMetaDataConfiguration/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/hbm2x/CachedMetaData/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/hbm2x/CachedMetaData/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/hbm2x/GenerateFromJDBC/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/hbm2x/GenerateFromJDBC/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/hbm2x/GenerateFromJDBCWithJavaKeyword/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/hbm2x/GenerateFromJDBCWithJavaKeyword/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/hbm2x/IncrementalSchemaReading/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/hbm2x/IncrementalSchemaReading/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/hbm2x/JdbcHbm2JavaEjb3/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/hbm2x/JdbcHbm2JavaEjb3/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/hbm2x/query/QueryExporterTest/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/hbm2x/query/QueryExporterTest/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/AutoQuote/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/AutoQuote/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/Basic/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/Basic/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/CompositeId/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/CompositeId/data.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/CompositeId/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/ForeignKeys/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/ForeignKeys/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/Index/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/Index/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/data.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/ManyToMany/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/ManyToMany/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/MetaData/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/MetaData/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/NoPrimaryKey/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/NoPrimaryKey/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/OneToOne/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/OneToOne/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/Performance/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/Performance/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/PersistentClasses/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/PersistentClasses/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/SearchEscapeString/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/SearchEscapeString/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/Versioning/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/Versioning/drop.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/stat/Statistics/create.sql (100%) rename test/mssql/src/{main => test}/resources/org/hibernate/tool/stat/Statistics/drop.sql (100%) diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/AntHibernateTool/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/AntHibernateTool/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/AntHibernateTool/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/AntHibernateTool/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/AntHibernateTool/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/AntHibernateTool/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/AntHibernateTool/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/AntHibernateTool/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/Cfg2HbmNoError/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/Cfg2HbmNoError/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/Cfg2HbmNoError/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/Cfg2HbmNoError/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/Cfg2HbmNoError/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/Cfg2HbmNoError/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/Cfg2HbmNoError/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/Cfg2HbmNoError/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/Cfg2HbmWithCustomReverseNamingStrategy/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/Cfg2HbmWithCustomReverseNamingStrategy/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/Cfg2HbmWithCustomReverseNamingStrategy/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/Cfg2HbmWithCustomReverseNamingStrategy/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/Cfg2HbmWithCustomReverseNamingStrategy/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/Cfg2HbmWithCustomReverseNamingStrategy/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/Cfg2HbmWithCustomReverseNamingStrategy/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/Cfg2HbmWithCustomReverseNamingStrategy/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/Cfg2HbmWithPackageName/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/Cfg2HbmWithPackageName/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/Cfg2HbmWithPackageName/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/Cfg2HbmWithPackageName/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/Cfg2HbmWithPackageName/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/Cfg2HbmWithPackageName/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/Cfg2HbmWithPackageName/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/Cfg2HbmWithPackageName/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/Cfg2HbmWithPackageNameAndReverseNamingStrategy/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/Cfg2HbmWithPackageNameAndReverseNamingStrategy/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/Cfg2HbmWithPackageNameAndReverseNamingStrategy/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/Cfg2HbmWithPackageNameAndReverseNamingStrategy/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/Cfg2HbmWithPackageNameAndReverseNamingStrategy/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/Cfg2HbmWithPackageNameAndReverseNamingStrategy/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/Cfg2HbmWithPackageNameAndReverseNamingStrategy/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/Cfg2HbmWithPackageNameAndReverseNamingStrategy/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/EJB3Configuration/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/EJB3Configuration/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/EJB3Configuration/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/EJB3Configuration/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/EJB3Configuration/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/EJB3Configuration/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/EJB3Configuration/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/EJB3Configuration/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/JDBCConfigWithRevEngXml/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/JDBCConfigWithRevEngXml/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/JDBCConfigWithRevEngXml/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/JDBCConfigWithRevEngXml/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/JDBCConfigWithRevEngXml/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/JDBCConfigWithRevEngXml/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/JDBCConfigWithRevEngXml/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/JDBCConfigWithRevEngXml/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/JDBCConfiguration/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/JDBCConfiguration/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/JDBCConfiguration/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/JDBCConfiguration/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/JDBCConfiguration/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/JDBCConfiguration/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/JDBCConfiguration/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/JDBCConfiguration/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/JPABogusPUnit/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/JPABogusPUnit/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/JPABogusPUnit/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/JPABogusPUnit/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/JPABogusPUnit/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/JPABogusPUnit/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/JPABogusPUnit/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/JPABogusPUnit/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/JPAPUnit/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/JPAPUnit/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/JPAPUnit/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/JPAPUnit/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/JPAPUnit/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/JPAPUnit/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/JPAPUnit/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/JPAPUnit/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/JPAPropertyOverridesPUnit/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/JPAPropertyOverridesPUnit/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/JPAPropertyOverridesPUnit/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/JPAPropertyOverridesPUnit/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/JPAPropertyOverridesPUnit/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/JPAPropertyOverridesPUnit/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/JPAPropertyOverridesPUnit/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/JPAPropertyOverridesPUnit/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/Query/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/Query/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/Query/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/Query/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/ant/Query/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/ant/Query/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/ant/Query/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/ant/Query/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/cfg/DriverMetaData/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/cfg/DriverMetaData/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/cfg/DriverMetaData/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/cfg/DriverMetaData/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/cfg/DriverMetaData/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/cfg/DriverMetaData/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/cfg/DriverMetaData/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/cfg/DriverMetaData/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/cfg/JDBCMetaDataConfiguration/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/cfg/JDBCMetaDataConfiguration/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/cfg/JDBCMetaDataConfiguration/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/cfg/JDBCMetaDataConfiguration/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/cfg/JDBCMetaDataConfiguration/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/cfg/JDBCMetaDataConfiguration/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/cfg/JDBCMetaDataConfiguration/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/cfg/JDBCMetaDataConfiguration/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/hbm2x/CachedMetaData/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/hbm2x/CachedMetaData/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/hbm2x/CachedMetaData/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/hbm2x/CachedMetaData/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/hbm2x/CachedMetaData/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/hbm2x/CachedMetaData/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/hbm2x/CachedMetaData/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/hbm2x/CachedMetaData/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/hbm2x/GenerateFromJDBC/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/hbm2x/GenerateFromJDBC/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/hbm2x/GenerateFromJDBC/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/hbm2x/GenerateFromJDBC/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/hbm2x/GenerateFromJDBC/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/hbm2x/GenerateFromJDBC/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/hbm2x/GenerateFromJDBC/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/hbm2x/GenerateFromJDBC/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/hbm2x/GenerateFromJDBCWithJavaKeyword/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/hbm2x/GenerateFromJDBCWithJavaKeyword/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/hbm2x/GenerateFromJDBCWithJavaKeyword/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/hbm2x/GenerateFromJDBCWithJavaKeyword/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/hbm2x/GenerateFromJDBCWithJavaKeyword/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/hbm2x/GenerateFromJDBCWithJavaKeyword/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/hbm2x/GenerateFromJDBCWithJavaKeyword/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/hbm2x/GenerateFromJDBCWithJavaKeyword/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/hbm2x/IncrementalSchemaReading/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/hbm2x/IncrementalSchemaReading/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/hbm2x/IncrementalSchemaReading/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/hbm2x/IncrementalSchemaReading/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/hbm2x/IncrementalSchemaReading/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/hbm2x/IncrementalSchemaReading/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/hbm2x/IncrementalSchemaReading/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/hbm2x/IncrementalSchemaReading/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/hbm2x/JdbcHbm2JavaEjb3/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/hbm2x/JdbcHbm2JavaEjb3/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/hbm2x/JdbcHbm2JavaEjb3/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/hbm2x/JdbcHbm2JavaEjb3/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/hbm2x/JdbcHbm2JavaEjb3/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/hbm2x/JdbcHbm2JavaEjb3/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/hbm2x/JdbcHbm2JavaEjb3/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/hbm2x/JdbcHbm2JavaEjb3/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/hbm2x/query/QueryExporterTest/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/hbm2x/query/QueryExporterTest/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/hbm2x/query/QueryExporterTest/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/hbm2x/query/QueryExporterTest/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/hbm2x/query/QueryExporterTest/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/hbm2x/query/QueryExporterTest/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/hbm2x/query/QueryExporterTest/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/hbm2x/query/QueryExporterTest/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/AutoQuote/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/AutoQuote/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/AutoQuote/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/AutoQuote/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/AutoQuote/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/AutoQuote/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/AutoQuote/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/AutoQuote/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/Basic/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/Basic/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/Basic/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/Basic/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/Basic/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/Basic/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/Basic/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/Basic/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/CompositeId/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/CompositeId/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/CompositeId/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/CompositeId/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/CompositeId/data.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/CompositeId/data.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/CompositeId/data.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/CompositeId/data.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/CompositeId/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/CompositeId/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/CompositeId/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/CompositeId/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/ForeignKeys/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/ForeignKeys/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/ForeignKeys/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/ForeignKeys/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/ForeignKeys/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/ForeignKeys/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/ForeignKeys/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/ForeignKeys/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/Index/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/Index/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/Index/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/Index/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/Index/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/Index/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/Index/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/Index/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/data.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/data.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/data.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/data.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/ManyToMany/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/ManyToMany/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/ManyToMany/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/ManyToMany/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/ManyToMany/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/ManyToMany/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/ManyToMany/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/ManyToMany/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/MetaData/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/MetaData/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/MetaData/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/MetaData/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/MetaData/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/MetaData/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/MetaData/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/MetaData/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/NoPrimaryKey/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/NoPrimaryKey/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/NoPrimaryKey/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/NoPrimaryKey/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/NoPrimaryKey/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/NoPrimaryKey/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/NoPrimaryKey/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/NoPrimaryKey/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/OneToOne/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/OneToOne/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/OneToOne/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/OneToOne/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/OneToOne/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/OneToOne/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/OneToOne/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/OneToOne/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/Performance/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/Performance/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/Performance/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/Performance/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/Performance/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/Performance/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/Performance/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/Performance/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/PersistentClasses/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/PersistentClasses/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/PersistentClasses/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/PersistentClasses/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/PersistentClasses/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/PersistentClasses/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/PersistentClasses/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/PersistentClasses/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/SearchEscapeString/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/SearchEscapeString/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/SearchEscapeString/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/SearchEscapeString/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/SearchEscapeString/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/SearchEscapeString/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/SearchEscapeString/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/SearchEscapeString/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/Versioning/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/Versioning/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/Versioning/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/Versioning/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/Versioning/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/Versioning/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/jdbc2cfg/Versioning/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/jdbc2cfg/Versioning/drop.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/stat/Statistics/create.sql b/test/mssql/src/test/resources/org/hibernate/tool/stat/Statistics/create.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/stat/Statistics/create.sql rename to test/mssql/src/test/resources/org/hibernate/tool/stat/Statistics/create.sql diff --git a/test/mssql/src/main/resources/org/hibernate/tool/stat/Statistics/drop.sql b/test/mssql/src/test/resources/org/hibernate/tool/stat/Statistics/drop.sql similarity index 100% rename from test/mssql/src/main/resources/org/hibernate/tool/stat/Statistics/drop.sql rename to test/mssql/src/test/resources/org/hibernate/tool/stat/Statistics/drop.sql From 6d72169e2cb81b0969c8d7a93dbf5a2b4b3045ab Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 7 Oct 2021 12:05:57 +0200 Subject: [PATCH 431/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Move content of 'src/main/' to 'src/test/' in module 'test/mysql' Signed-off-by: Koen Aers --- .../org/hibernate/tool/hbm2x/DefaultDatabaseCollector/create.sql | 0 .../org/hibernate/tool/hbm2x/DefaultDatabaseCollector/drop.sql | 0 .../hibernate/tool/hbmlint/SchemaAnalyzer/SchemaIssues.hbm.xml | 0 .../org/hibernate/tool/hbmlint/SchemaAnalyzer/create.sql | 0 .../resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/drop.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/AutoQuote/create.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/AutoQuote/drop.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql | 0 .../org/hibernate/tool/jdbc2cfg/RevEngForeignKey/drop.sql | 0 10 files changed, 0 insertions(+), 0 deletions(-) rename test/mysql/src/{main => test}/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/create.sql (100%) rename test/mysql/src/{main => test}/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/drop.sql (100%) rename test/mysql/src/{main => test}/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/SchemaIssues.hbm.xml (100%) rename test/mysql/src/{main => test}/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/create.sql (100%) rename test/mysql/src/{main => test}/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/drop.sql (100%) rename test/mysql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/AutoQuote/create.sql (100%) rename test/mysql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/AutoQuote/drop.sql (100%) rename test/mysql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql (100%) rename test/mysql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql (100%) rename test/mysql/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/drop.sql (100%) diff --git a/test/mysql/src/main/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/create.sql b/test/mysql/src/test/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/create.sql similarity index 100% rename from test/mysql/src/main/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/create.sql rename to test/mysql/src/test/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/create.sql diff --git a/test/mysql/src/main/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/drop.sql b/test/mysql/src/test/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/drop.sql similarity index 100% rename from test/mysql/src/main/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/drop.sql rename to test/mysql/src/test/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/drop.sql diff --git a/test/mysql/src/main/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/SchemaIssues.hbm.xml b/test/mysql/src/test/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/SchemaIssues.hbm.xml similarity index 100% rename from test/mysql/src/main/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/SchemaIssues.hbm.xml rename to test/mysql/src/test/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/SchemaIssues.hbm.xml diff --git a/test/mysql/src/main/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/create.sql b/test/mysql/src/test/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/create.sql similarity index 100% rename from test/mysql/src/main/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/create.sql rename to test/mysql/src/test/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/create.sql diff --git a/test/mysql/src/main/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/drop.sql b/test/mysql/src/test/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/drop.sql similarity index 100% rename from test/mysql/src/main/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/drop.sql rename to test/mysql/src/test/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/drop.sql diff --git a/test/mysql/src/main/resources/org/hibernate/tool/jdbc2cfg/AutoQuote/create.sql b/test/mysql/src/test/resources/org/hibernate/tool/jdbc2cfg/AutoQuote/create.sql similarity index 100% rename from test/mysql/src/main/resources/org/hibernate/tool/jdbc2cfg/AutoQuote/create.sql rename to test/mysql/src/test/resources/org/hibernate/tool/jdbc2cfg/AutoQuote/create.sql diff --git a/test/mysql/src/main/resources/org/hibernate/tool/jdbc2cfg/AutoQuote/drop.sql b/test/mysql/src/test/resources/org/hibernate/tool/jdbc2cfg/AutoQuote/drop.sql similarity index 100% rename from test/mysql/src/main/resources/org/hibernate/tool/jdbc2cfg/AutoQuote/drop.sql rename to test/mysql/src/test/resources/org/hibernate/tool/jdbc2cfg/AutoQuote/drop.sql diff --git a/test/mysql/src/main/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql b/test/mysql/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql similarity index 100% rename from test/mysql/src/main/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql rename to test/mysql/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql diff --git a/test/mysql/src/main/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql b/test/mysql/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql similarity index 100% rename from test/mysql/src/main/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql rename to test/mysql/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql diff --git a/test/mysql/src/main/resources/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/drop.sql b/test/mysql/src/test/resources/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/drop.sql similarity index 100% rename from test/mysql/src/main/resources/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/drop.sql rename to test/mysql/src/test/resources/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/drop.sql From 13f42d8d8341025804579e8bfa18466d9c7de4e8 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 7 Oct 2021 13:43:39 +0200 Subject: [PATCH 432/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Move content of 'src/main/' to 'src/test/' in module 'test/oracle' Signed-off-by: Koen Aers --- .../java/org/hibernate/tool/jdbc2cfg/Views/TestCase.java | 0 .../resources/org/hibernate/cfg/reveng/dialect/create.sql | 0 .../resources/org/hibernate/cfg/reveng/dialect/drop.sql | 0 .../org/hibernate/tool/hbm2x/DefaultDatabaseCollector/create.sql | 0 .../org/hibernate/tool/hbm2x/DefaultDatabaseCollector/drop.sql | 0 .../org/hibernate/tool/hbm2x/DefaultSchemaCatalog/create.sql | 0 .../org/hibernate/tool/hbm2x/DefaultSchemaCatalog/drop.sql | 0 .../hibernate/tool/hbmlint/SchemaAnalyzer/SchemaIssues.hbm.xml | 0 .../org/hibernate/tool/jdbc2cfg/BasicMultiSchema/create.sql | 0 .../org/hibernate/tool/jdbc2cfg/BasicMultiSchema/drop.sql | 0 .../org/hibernate/tool/jdbc2cfg/CompositeIdOrder/create.sql | 0 .../org/hibernate/tool/jdbc2cfg/CompositeIdOrder/drop.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql | 0 .../org/hibernate/tool/jdbc2cfg/PersistentClasses/create.sql | 0 .../org/hibernate/tool/jdbc2cfg/TernarySchema/create.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/TernarySchema/drop.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/Views/create.sql | 0 .../resources/org/hibernate/tool/jdbc2cfg/Views/drop.sql | 0 19 files changed, 0 insertions(+), 0 deletions(-) rename test/oracle/src/{main => test}/java/org/hibernate/tool/jdbc2cfg/Views/TestCase.java (100%) rename test/oracle/src/{main => test}/resources/org/hibernate/cfg/reveng/dialect/create.sql (100%) rename test/oracle/src/{main => test}/resources/org/hibernate/cfg/reveng/dialect/drop.sql (100%) rename test/oracle/src/{main => test}/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/create.sql (100%) rename test/oracle/src/{main => test}/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/drop.sql (100%) rename test/oracle/src/{main => test}/resources/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/create.sql (100%) rename test/oracle/src/{main => test}/resources/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/drop.sql (100%) rename test/oracle/src/{main => test}/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/SchemaIssues.hbm.xml (100%) rename test/oracle/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/create.sql (100%) rename test/oracle/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/drop.sql (100%) rename test/oracle/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/CompositeIdOrder/create.sql (100%) rename test/oracle/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/CompositeIdOrder/drop.sql (100%) rename test/oracle/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql (100%) rename test/oracle/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql (100%) rename test/oracle/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/PersistentClasses/create.sql (100%) rename test/oracle/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/TernarySchema/create.sql (100%) rename test/oracle/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/TernarySchema/drop.sql (100%) rename test/oracle/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/Views/create.sql (100%) rename test/oracle/src/{main => test}/resources/org/hibernate/tool/jdbc2cfg/Views/drop.sql (100%) diff --git a/test/oracle/src/main/java/org/hibernate/tool/jdbc2cfg/Views/TestCase.java b/test/oracle/src/test/java/org/hibernate/tool/jdbc2cfg/Views/TestCase.java similarity index 100% rename from test/oracle/src/main/java/org/hibernate/tool/jdbc2cfg/Views/TestCase.java rename to test/oracle/src/test/java/org/hibernate/tool/jdbc2cfg/Views/TestCase.java diff --git a/test/oracle/src/main/resources/org/hibernate/cfg/reveng/dialect/create.sql b/test/oracle/src/test/resources/org/hibernate/cfg/reveng/dialect/create.sql similarity index 100% rename from test/oracle/src/main/resources/org/hibernate/cfg/reveng/dialect/create.sql rename to test/oracle/src/test/resources/org/hibernate/cfg/reveng/dialect/create.sql diff --git a/test/oracle/src/main/resources/org/hibernate/cfg/reveng/dialect/drop.sql b/test/oracle/src/test/resources/org/hibernate/cfg/reveng/dialect/drop.sql similarity index 100% rename from test/oracle/src/main/resources/org/hibernate/cfg/reveng/dialect/drop.sql rename to test/oracle/src/test/resources/org/hibernate/cfg/reveng/dialect/drop.sql diff --git a/test/oracle/src/main/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/create.sql b/test/oracle/src/test/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/create.sql similarity index 100% rename from test/oracle/src/main/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/create.sql rename to test/oracle/src/test/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/create.sql diff --git a/test/oracle/src/main/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/drop.sql b/test/oracle/src/test/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/drop.sql similarity index 100% rename from test/oracle/src/main/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/drop.sql rename to test/oracle/src/test/resources/org/hibernate/tool/hbm2x/DefaultDatabaseCollector/drop.sql diff --git a/test/oracle/src/main/resources/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/create.sql b/test/oracle/src/test/resources/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/create.sql similarity index 100% rename from test/oracle/src/main/resources/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/create.sql rename to test/oracle/src/test/resources/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/create.sql diff --git a/test/oracle/src/main/resources/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/drop.sql b/test/oracle/src/test/resources/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/drop.sql similarity index 100% rename from test/oracle/src/main/resources/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/drop.sql rename to test/oracle/src/test/resources/org/hibernate/tool/hbm2x/DefaultSchemaCatalog/drop.sql diff --git a/test/oracle/src/main/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/SchemaIssues.hbm.xml b/test/oracle/src/test/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/SchemaIssues.hbm.xml similarity index 100% rename from test/oracle/src/main/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/SchemaIssues.hbm.xml rename to test/oracle/src/test/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/SchemaIssues.hbm.xml diff --git a/test/oracle/src/main/resources/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/create.sql b/test/oracle/src/test/resources/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/create.sql similarity index 100% rename from test/oracle/src/main/resources/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/create.sql rename to test/oracle/src/test/resources/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/create.sql diff --git a/test/oracle/src/main/resources/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/drop.sql b/test/oracle/src/test/resources/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/drop.sql similarity index 100% rename from test/oracle/src/main/resources/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/drop.sql rename to test/oracle/src/test/resources/org/hibernate/tool/jdbc2cfg/BasicMultiSchema/drop.sql diff --git a/test/oracle/src/main/resources/org/hibernate/tool/jdbc2cfg/CompositeIdOrder/create.sql b/test/oracle/src/test/resources/org/hibernate/tool/jdbc2cfg/CompositeIdOrder/create.sql similarity index 100% rename from test/oracle/src/main/resources/org/hibernate/tool/jdbc2cfg/CompositeIdOrder/create.sql rename to test/oracle/src/test/resources/org/hibernate/tool/jdbc2cfg/CompositeIdOrder/create.sql diff --git a/test/oracle/src/main/resources/org/hibernate/tool/jdbc2cfg/CompositeIdOrder/drop.sql b/test/oracle/src/test/resources/org/hibernate/tool/jdbc2cfg/CompositeIdOrder/drop.sql similarity index 100% rename from test/oracle/src/main/resources/org/hibernate/tool/jdbc2cfg/CompositeIdOrder/drop.sql rename to test/oracle/src/test/resources/org/hibernate/tool/jdbc2cfg/CompositeIdOrder/drop.sql diff --git a/test/oracle/src/main/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql b/test/oracle/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql similarity index 100% rename from test/oracle/src/main/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql rename to test/oracle/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql diff --git a/test/oracle/src/main/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql b/test/oracle/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql similarity index 100% rename from test/oracle/src/main/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql rename to test/oracle/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/drop.sql diff --git a/test/oracle/src/main/resources/org/hibernate/tool/jdbc2cfg/PersistentClasses/create.sql b/test/oracle/src/test/resources/org/hibernate/tool/jdbc2cfg/PersistentClasses/create.sql similarity index 100% rename from test/oracle/src/main/resources/org/hibernate/tool/jdbc2cfg/PersistentClasses/create.sql rename to test/oracle/src/test/resources/org/hibernate/tool/jdbc2cfg/PersistentClasses/create.sql diff --git a/test/oracle/src/main/resources/org/hibernate/tool/jdbc2cfg/TernarySchema/create.sql b/test/oracle/src/test/resources/org/hibernate/tool/jdbc2cfg/TernarySchema/create.sql similarity index 100% rename from test/oracle/src/main/resources/org/hibernate/tool/jdbc2cfg/TernarySchema/create.sql rename to test/oracle/src/test/resources/org/hibernate/tool/jdbc2cfg/TernarySchema/create.sql diff --git a/test/oracle/src/main/resources/org/hibernate/tool/jdbc2cfg/TernarySchema/drop.sql b/test/oracle/src/test/resources/org/hibernate/tool/jdbc2cfg/TernarySchema/drop.sql similarity index 100% rename from test/oracle/src/main/resources/org/hibernate/tool/jdbc2cfg/TernarySchema/drop.sql rename to test/oracle/src/test/resources/org/hibernate/tool/jdbc2cfg/TernarySchema/drop.sql diff --git a/test/oracle/src/main/resources/org/hibernate/tool/jdbc2cfg/Views/create.sql b/test/oracle/src/test/resources/org/hibernate/tool/jdbc2cfg/Views/create.sql similarity index 100% rename from test/oracle/src/main/resources/org/hibernate/tool/jdbc2cfg/Views/create.sql rename to test/oracle/src/test/resources/org/hibernate/tool/jdbc2cfg/Views/create.sql diff --git a/test/oracle/src/main/resources/org/hibernate/tool/jdbc2cfg/Views/drop.sql b/test/oracle/src/test/resources/org/hibernate/tool/jdbc2cfg/Views/drop.sql similarity index 100% rename from test/oracle/src/main/resources/org/hibernate/tool/jdbc2cfg/Views/drop.sql rename to test/oracle/src/test/resources/org/hibernate/tool/jdbc2cfg/Views/drop.sql From 2ecbef8f9fed0ca1ed9ecdce79b7b867cdd14181 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 7 Oct 2021 14:11:42 +0200 Subject: [PATCH 433/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Remove use of 'org.junit.Assert' from class 'org.hibernate.tools.test.util.ConnectionLeakUtil' Signed-off-by: Koen Aers --- .../org/hibernate/tools/test/util/ConnectionLeakUtil.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/utils/src/main/java/org/hibernate/tools/test/util/ConnectionLeakUtil.java b/test/utils/src/main/java/org/hibernate/tools/test/util/ConnectionLeakUtil.java index 82858df7ef..37d6200b84 100644 --- a/test/utils/src/main/java/org/hibernate/tools/test/util/ConnectionLeakUtil.java +++ b/test/utils/src/main/java/org/hibernate/tools/test/util/ConnectionLeakUtil.java @@ -6,7 +6,7 @@ import java.sql.SQLException; import java.sql.Statement; -import org.junit.Assert; +import org.opentest4j.AssertionFailedError; public class ConnectionLeakUtil { @@ -26,7 +26,9 @@ public void initialize() { public void assertNoLeaks() { int leaked = getLeakedConnectionCount(); - Assert.assertTrue(leaked + " connections are leaked.", leaked == 0); + if (leaked != 0) { + throw new AssertionFailedError(leaked + " connections are leaked."); + } } private int getLeakedConnectionCount() { From b74a5779eae97d7ae199e8c6844f8f829847d456 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 7 Oct 2021 14:35:20 +0200 Subject: [PATCH 434/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Rewrite class 'org.hibernate.tool.test.db.oracle.TestSuite' to use Jupiter Signed-off-by: Koen Aers --- .../tool/test/db/oracle/TestSuite.java | 40 ++++++++++++++----- .../tool/test/db/oracle/TestSuiteJupiter.java | 30 -------------- .../src/test/resources/hibernate.properties | 22 +++++++++- 3 files changed, 50 insertions(+), 42 deletions(-) delete mode 100644 test/oracle/src/test/java/org/hibernate/tool/test/db/oracle/TestSuiteJupiter.java diff --git a/test/oracle/src/test/java/org/hibernate/tool/test/db/oracle/TestSuite.java b/test/oracle/src/test/java/org/hibernate/tool/test/db/oracle/TestSuite.java index c0aec0a645..981e42f16f 100644 --- a/test/oracle/src/test/java/org/hibernate/tool/test/db/oracle/TestSuite.java +++ b/test/oracle/src/test/java/org/hibernate/tool/test/db/oracle/TestSuite.java @@ -1,14 +1,32 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2017-2021 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.hibernate.tool.test.db.oracle; -import org.hibernate.tools.test.util.DbSuite; -import org.junit.runner.RunWith; -import org.junit.runners.Suite.SuiteClasses; +import org.hibernate.tool.test.db.DbTestSuite; +import org.junit.jupiter.api.Nested; -@RunWith(DbSuite.class) -@SuiteClasses({ - org.hibernate.cfg.reveng.dialect.TestCase.class, - org.hibernate.tool.jdbc2cfg.CompositeIdOrder.TestCase.class, - org.hibernate.tool.jdbc2cfg.Views.TestCase.class, - org.hibernate.tool.test.db.CommonTestSuite.class -}) -public class TestSuite {} +public class TestSuite { + + @Nested public class OracleTestSuite extends DbTestSuite {} + @Nested public class DialectTestCase extends org.hibernate.cfg.reveng.dialect.TestCase {} + @Nested public class CompositeOrderTestCase extends org.hibernate.tool.jdbc2cfg.CompositeIdOrder.TestCase {} + @Nested public class ViewsTestCase extends org.hibernate.tool.jdbc2cfg.Views.TestCase {} + +} diff --git a/test/oracle/src/test/java/org/hibernate/tool/test/db/oracle/TestSuiteJupiter.java b/test/oracle/src/test/java/org/hibernate/tool/test/db/oracle/TestSuiteJupiter.java deleted file mode 100644 index e7e9c740ef..0000000000 --- a/test/oracle/src/test/java/org/hibernate/tool/test/db/oracle/TestSuiteJupiter.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Hibernate Tools, Tooling for your Hibernate Projects - * - * Copyright 2004-2021 Red Hat, Inc. - * - * Licensed under the GNU Lesser General Public License (LGPL), - * version 2.1 or later (the "License"). - * You may not use this file except in compliance with the License. - * You may read the licence in the 'lgpl.txt' file in the root folder of - * project or obtain a copy at - * - * http://www.gnu.org/licenses/lgpl-2.1.html - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.hibernate.tool.test.db.oracle; - -import org.hibernate.tool.test.db.DbTestSuite; -import org.junit.jupiter.api.Nested; - -public class TestSuiteJupiter { - - @Nested - public class OracleTestSuite extends DbTestSuite {} - -} diff --git a/test/oracle/src/test/resources/hibernate.properties b/test/oracle/src/test/resources/hibernate.properties index 0bd7042c6a..8c5eaae5d7 100644 --- a/test/oracle/src/test/resources/hibernate.properties +++ b/test/oracle/src/test/resources/hibernate.properties @@ -1,7 +1,27 @@ +# +# Hibernate Tools, Tooling for your Hibernate Projects +# +# Copyright 2017-2020 Red Hat, Inc. +# +# Licensed under the GNU Lesser General Public License (LGPL), +# version 2.1 or later (the "License"). +# You may not use this file except in compliance with the License. +# You may read the licence in the 'lgpl.txt' file in the root folder of +# project or obtain a copy at +# +# http://www.gnu.org/licenses/lgpl-2.1.html +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + hibernate.dialect org.hibernate.dialect.Oracle12cDialect hibernate.connection.driver_class oracle.jdbc.driver.OracleDriver hibernate.connection.username HTT hibernate.connection.password HTT -hibernate.connection.url jdbc:oracle:thin:@//localhost:1521/ORCLPDB1.localdomain +hibernate.connection.url jdbc:oracle:thin:@//localhost:1521/xe.oracle.docker hibernate.default_schema HTT From f835fb63fd1adbadd8acba08119068811b71b75a Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 8 Oct 2021 08:55:41 +0200 Subject: [PATCH 435/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Remove unused class 'org.hibernate.tools.test.util.DbSuite' and test class 'org.hibernate.tools.test.util.DbSuiteTest' Signed-off-by: Koen Aers --- .../hibernate/tools/test/util/DbSuite.java | 60 ------ .../tools/test/util/DbSuiteTest.java | 171 ------------------ 2 files changed, 231 deletions(-) delete mode 100644 test/utils/src/main/java/org/hibernate/tools/test/util/DbSuite.java delete mode 100644 test/utils/src/test/java/org/hibernate/tools/test/util/DbSuiteTest.java diff --git a/test/utils/src/main/java/org/hibernate/tools/test/util/DbSuite.java b/test/utils/src/main/java/org/hibernate/tools/test/util/DbSuite.java deleted file mode 100644 index a14671a4bf..0000000000 --- a/test/utils/src/main/java/org/hibernate/tools/test/util/DbSuite.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.hibernate.tools.test.util; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Inherited; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import org.junit.runner.Runner; -import org.junit.runner.notification.RunNotifier; -import org.junit.runners.Suite; -import org.junit.runners.model.InitializationError; -import org.junit.runners.model.RunnerBuilder; - -public class DbSuite extends Suite { - - public static final String SQL_SCRIPT_ROOT = "org.hibernate.tools.test.db.sqlScriptRoot"; - - @Retention(RetentionPolicy.RUNTIME) - @Target(ElementType.TYPE) - @Inherited - public @interface SqlScriptRoot { - public String value(); - } - - boolean ignore = false; - String sqlScriptRoot; - - public DbSuite(Class klass, RunnerBuilder builder) throws InitializationError { - super(klass, builder); - ignore = !JdbcUtil.isDatabaseOnline(); - setSqlScriptRoot(klass); - } - - @Override - protected void runChild(Runner runner, final RunNotifier notifier) { - if (!ignore) { - if (sqlScriptRoot != null) { - System.setProperty( - SQL_SCRIPT_ROOT, - sqlScriptRoot); - } - runner.run(notifier); - if (sqlScriptRoot != null) { - System.getProperties().remove( - SQL_SCRIPT_ROOT); - } - } else { - notifier.fireTestIgnored(getDescription()); - } - } - - private void setSqlScriptRoot(Class klass) { - SqlScriptRoot annotation = klass.getAnnotation(SqlScriptRoot.class); - if (annotation != null) { - sqlScriptRoot = annotation.value(); - } - } - -} diff --git a/test/utils/src/test/java/org/hibernate/tools/test/util/DbSuiteTest.java b/test/utils/src/test/java/org/hibernate/tools/test/util/DbSuiteTest.java deleted file mode 100644 index 11e6986817..0000000000 --- a/test/utils/src/test/java/org/hibernate/tools/test/util/DbSuiteTest.java +++ /dev/null @@ -1,171 +0,0 @@ -package org.hibernate.tools.test.util; - -import java.io.File; -import java.io.FileWriter; -import java.net.URL; -import java.net.URLClassLoader; -import java.util.Properties; - -import org.hibernate.tools.test.util.DbSuite.SqlScriptRoot; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; -import org.junit.runner.Description; -import org.junit.runner.RunWith; -import org.junit.runner.Runner; -import org.junit.runner.notification.RunListener; -import org.junit.runner.notification.RunNotifier; -import org.junit.runners.Suite.SuiteClasses; -import org.junit.runners.model.RunnerBuilder; - - -public class DbSuiteTest { - - private class DummyRunner extends Runner { - @Override - public Description getDescription() { - return Description.EMPTY; - } - @Override - public void run(RunNotifier notifier) { - sqlScriptRoot = System.getProperty(DbSuite.SQL_SCRIPT_ROOT); - notifier.fireTestStarted(getDescription());; - } - } - - private class DummyListener extends RunListener { - boolean isStarted = false; - boolean isIgnored = false; - public void testStarted(Description description) throws Exception { - isStarted = true; - } - public void testIgnored(Description description) throws Exception { - isIgnored = true; - } - } - - public class DummyTest { - @Test - public void testDummy() { - Assert.assertTrue(true); - } - } - - @RunWith(DbSuite.class) - @SuiteClasses(DummyTest.class) - public class FirstSuite {} - - @RunWith(DbSuite.class) - @SuiteClasses(DummyTest.class) - @SqlScriptRoot("foo.bar") - public class SecondSuite {} - - private class TestRunnerBuilder extends RunnerBuilder { - @Override - public Runner runnerForClass(Class testClass) throws Throwable { - return null; - } - } - - private DbSuite dbSuite; - private String sqlScriptRoot = null; - - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); - - @Before - public void setUp() throws Exception { - createHibernateProperties("sa", "", "jdbc:h2:mem:test"); - setUpClassLoader(); - } - - @After - public void tearDown() throws Exception { - restoreClassLoader(); - } - - @Test - public void testDbSuiteConstruction() throws Exception { - dbSuite = new DbSuite(FirstSuite.class, new TestRunnerBuilder()); - Assert.assertNull(dbSuite.sqlScriptRoot); - Assert.assertFalse(dbSuite.ignore); - dbSuite = new DbSuite(SecondSuite.class, new TestRunnerBuilder()); - Assert.assertEquals("foo.bar", dbSuite.sqlScriptRoot); - Assert.assertFalse(dbSuite.ignore); - new File(temporaryFolder.getRoot(), "hibernate.properties").delete(); - createHibernateProperties("foo", "bar", "jdbc:sqlserver://org.foo.bar:1433"); - dbSuite = new DbSuite(FirstSuite.class, new TestRunnerBuilder()); - Assert.assertNull(dbSuite.sqlScriptRoot); - Assert.assertTrue(dbSuite.ignore); - dbSuite = new DbSuite(SecondSuite.class, new TestRunnerBuilder()); - Assert.assertEquals("foo.bar", dbSuite.sqlScriptRoot); - Assert.assertTrue(dbSuite.ignore); - } - - @Test - public void testRunChild() throws Exception { - dbSuite = new DbSuite(FirstSuite.class, new TestRunnerBuilder()); - Runner runner = new DummyRunner(); - RunNotifier notifier = new RunNotifier(); - DummyListener listener = new DummyListener(); - notifier.addListener(listener); - dbSuite.ignore = true; - listener.isStarted = false; - listener.isIgnored = false; - dbSuite.runChild(runner, notifier); - Assert.assertFalse(listener.isStarted); - Assert.assertTrue(listener.isIgnored); - dbSuite.ignore = false; - dbSuite.sqlScriptRoot = null; - listener.isStarted = false; - listener.isIgnored = false; - dbSuite.runChild(runner, notifier); - Assert.assertTrue(listener.isStarted); - Assert.assertFalse(listener.isIgnored); - Assert.assertNull(sqlScriptRoot); - dbSuite.ignore = false; - dbSuite.sqlScriptRoot = "foo.bar"; - listener.isStarted = false; - listener.isIgnored = false; - dbSuite.runChild(runner, notifier); - Assert.assertTrue(listener.isStarted); - Assert.assertFalse(listener.isIgnored); - Assert.assertEquals("foo.bar", sqlScriptRoot); - } - - private void createHibernateProperties( - String user, - String password, - String url) - throws Exception { - Properties properties = new Properties(); - properties.put("hibernate.connection.username", user); - properties.put("hibernate.connection.password", password); - properties.put("hibernate.connection.url", url); - File outputFolder = temporaryFolder.getRoot(); - File propertiesFile = new File(outputFolder, "hibernate.properties"); - FileWriter writer = new FileWriter(propertiesFile); - properties.store(writer, null); - writer.close(); - } - - private void setUpClassLoader() throws Exception { - ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader(); - Thread.currentThread().setContextClassLoader( - new URLClassLoader( - new URL[] { temporaryFolder.getRoot().toURI().toURL() }, - currentClassLoader)); - } - - private void restoreClassLoader() { - URLClassLoader currentClassLoader = - (URLClassLoader)Thread.currentThread().getContextClassLoader(); - Thread.currentThread().setContextClassLoader(currentClassLoader.getParent()); - } - - - -} From 164df110d92e33ffccc4d7bc912c39b82d5c792c Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 8 Oct 2021 11:12:36 +0200 Subject: [PATCH 436/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Remove unused class 'org.hibernate.tool.test.db.CommonTestSuite' Signed-off-by: Koen Aers --- .../tool/test/db/CommonTestSuite.java | 60 ------------------- 1 file changed, 60 deletions(-) delete mode 100644 test/common/src/main/java/org/hibernate/tool/test/db/CommonTestSuite.java diff --git a/test/common/src/main/java/org/hibernate/tool/test/db/CommonTestSuite.java b/test/common/src/main/java/org/hibernate/tool/test/db/CommonTestSuite.java deleted file mode 100644 index 828096dd0f..0000000000 --- a/test/common/src/main/java/org/hibernate/tool/test/db/CommonTestSuite.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.hibernate.tool.test.db; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; -import org.junit.runners.Suite.SuiteClasses; - -@RunWith(Suite.class) -@SuiteClasses({ - org.hibernate.tool.ant.AntHibernateTool.TestCase.class, - org.hibernate.tool.ant.Cfg2HbmNoError.TestCase.class, - org.hibernate.tool.ant.Cfg2HbmWithCustomReverseNamingStrategy.TestCase.class, - org.hibernate.tool.ant.Cfg2HbmWithInvalidReverseNamingStrategy.TestCase.class, - org.hibernate.tool.ant.Cfg2HbmWithPackageName.TestCase.class, - org.hibernate.tool.ant.Cfg2HbmWithPackageNameAndReverseNamingStrategy.TestCase.class, - org.hibernate.tool.ant.EJB3Configuration.TestCase.class, - org.hibernate.tool.ant.GenericExport.TestCase.class, - org.hibernate.tool.ant.Hbm2JavaConfiguration.TestCase.class, - org.hibernate.tool.ant.HbmLint.TestCase.class, - org.hibernate.tool.ant.JDBCConfiguration.TestCase.class, - org.hibernate.tool.ant.JDBCConfigWithRevEngXml.TestCase.class, - org.hibernate.tool.ant.JPABogusPUnit.TestCase.class, - org.hibernate.tool.ant.JPAPropertyOverridesPUnit.TestCase.class, - org.hibernate.tool.ant.JPAPUnit.TestCase.class, - org.hibernate.tool.ant.Properties.TestCase.class, - org.hibernate.tool.ant.Query.TestCase.class, - org.hibernate.tool.ant.SchemaExportWarning.TestCase.class, - org.hibernate.tool.cfg.DriverMetaData.TestCase.class, - org.hibernate.tool.cfg.JDBCMetaDataConfiguration.TestCase.class, - org.hibernate.tool.hbm2x.CachedMetaData.TestCase.class, - org.hibernate.tool.hbm2x.DefaultDatabaseCollector.TestCase.class, - org.hibernate.tool.hbm2x.DefaultSchemaCatalog.TestCase.class, - org.hibernate.tool.hbm2x.GenerateFromJDBC.TestCase.class, - org.hibernate.tool.hbm2x.GenerateFromJDBCWithJavaKeyword.TestCase.class, - org.hibernate.tool.hbm2x.JdbcHbm2JavaEjb3.TestCase.class, - org.hibernate.tool.hbm2x.IncrementalSchemaReading.TestCase.class, - org.hibernate.tool.hbm2x.query.QueryExporterTest.TestCase.class, - org.hibernate.tool.hbmlint.HbmLintTest.TestCase.class, - org.hibernate.tool.hbmlint.SchemaAnalyzer.TestCase.class, - org.hibernate.tool.jdbc2cfg.AutoQuote.TestCase.class, - org.hibernate.tool.jdbc2cfg.Basic.TestCase.class, - org.hibernate.tool.jdbc2cfg.BasicMultiSchema.TestCase.class, - org.hibernate.tool.jdbc2cfg.CompositeId.TestCase.class, - org.hibernate.tool.jdbc2cfg.ForeignKeys.TestCase.class, - org.hibernate.tool.jdbc2cfg.Identity.TestCase.class, - org.hibernate.tool.jdbc2cfg.Index.TestCase.class, - org.hibernate.tool.jdbc2cfg.KeyPropertyCompositeId.TestCase.class, - org.hibernate.tool.jdbc2cfg.ManyToMany.TestCase.class, - org.hibernate.tool.jdbc2cfg.MetaData.TestCase.class, - org.hibernate.tool.jdbc2cfg.NoPrimaryKey.TestCase.class, - org.hibernate.tool.jdbc2cfg.OneToOne.TestCase.class, - org.hibernate.tool.jdbc2cfg.OverrideBinder.TestCase.class, - org.hibernate.tool.jdbc2cfg.Performance.TestCase.class, - org.hibernate.tool.jdbc2cfg.PersistentClasses.TestCase.class, - org.hibernate.tool.jdbc2cfg.RevEngForeignKey.TestCase.class, - org.hibernate.tool.jdbc2cfg.SearchEscapeString.TestCase.class, - org.hibernate.tool.jdbc2cfg.TernarySchema.TestCase.class, - org.hibernate.tool.jdbc2cfg.Versioning.TestCase.class, - org.hibernate.tool.stat.Statistics.TestCase.class -}) -public class CommonTestSuite {} From b72917c4c07ce7ef1bfc1ed7a5d81ea2ec3af012 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 8 Oct 2021 11:37:17 +0200 Subject: [PATCH 437/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Refactor test class 'org.hibernate.tool.jdbc2cfg.Views.TestCase' in module 'test/oracle' Signed-off-by: Koen Aers --- .../tool/jdbc2cfg/Views/TestCase.java | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/test/oracle/src/test/java/org/hibernate/tool/jdbc2cfg/Views/TestCase.java b/test/oracle/src/test/java/org/hibernate/tool/jdbc2cfg/Views/TestCase.java index cade7f0a1e..7e561c89c3 100644 --- a/test/oracle/src/test/java/org/hibernate/tool/jdbc2cfg/Views/TestCase.java +++ b/test/oracle/src/test/java/org/hibernate/tool/jdbc2cfg/Views/TestCase.java @@ -4,6 +4,11 @@ */ package org.hibernate.tool.jdbc2cfg.Views; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.sql.SQLException; import org.hibernate.boot.Metadata; @@ -12,10 +17,9 @@ import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; import org.hibernate.tools.test.util.HibernateUtil; import org.hibernate.tools.test.util.JdbcUtil; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; @@ -27,7 +31,7 @@ public class TestCase { private Metadata metadata; - @Before + @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); metadata = MetadataDescriptorFactory @@ -35,7 +39,7 @@ public void setUp() { .createMetadata(); } - @After + @AfterEach public void tearDown() { JdbcUtil.dropDatabase(this); } @@ -44,19 +48,19 @@ public void tearDown() { public void testViewAndSynonyms() throws SQLException { PersistentClass classMapping = metadata.getEntityBinding("Basicview"); - Assert.assertNotNull(classMapping); + assertNotNull(classMapping); classMapping = metadata.getEntityBinding("Weirdname"); - Assert.assertTrue("If this is not-null synonyms apparently work!",classMapping==null); + assertTrue(classMapping==null, "If this is not-null synonyms apparently work!"); // get comments Table table = HibernateUtil.getTable(metadata, "BASIC"); - Assert.assertEquals("a basic comment", table.getComment()); - Assert.assertEquals("a solid key", table.getPrimaryKey().getColumn(0).getComment()); + assertEquals("a basic comment", table.getComment()); + assertEquals("a solid key", table.getPrimaryKey().getColumn(0).getComment()); table = HibernateUtil.getTable(metadata, "MULTIKEYED"); - Assert.assertNull(table.getComment()); - Assert.assertNull(table.getColumn(0).getComment()); + assertNull(table.getComment()); + assertNull(table.getColumn(0).getComment()); } From 0acab81058985a619176d3d42a6f87a186c787b7 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 8 Oct 2021 12:53:44 +0200 Subject: [PATCH 438/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Remove dependencies on 'junit.junit' and 'org.junit.vintage.junit-vintage-engine' from module 'test/utils' Signed-off-by: Koen Aers --- test/utils/pom.xml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 5d5adf0999..855316fd49 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -17,11 +17,6 @@ Hibernate Tools Test Utilities Project - - junit - junit - compile - com.h2database h2 @@ -35,10 +30,6 @@ junit-jupiter-engine compile - - org.junit.vintage - junit-vintage-engine - From 8ab9a3d08f53ac6adefb0d74c7818227e33eb047 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 8 Oct 2021 13:24:02 +0200 Subject: [PATCH 439/560] HBX-2184: Replace JUnit4 tests with JUnit Jupiter tests - Remove dependencies on 'junit.junit' and 'org.junit.vintage.junit-vintage-engine' from parent module Signed-off-by: Koen Aers --- pom.xml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/pom.xml b/pom.xml index 0fb278d09a..b5ed6793fb 100644 --- a/pom.xml +++ b/pom.xml @@ -53,7 +53,6 @@ 8.0.1 2.2 1.2.0 - 4.13.2 5.7.2 8.0.22 19.3.0.0 @@ -107,11 +106,6 @@ ${jaxen.version} runtime - - junit - junit - ${junit.version} - mysql mysql-connector-java @@ -165,12 +159,6 @@ ${junit-jupiter.version} test - - org.junit.vintage - junit-vintage-engine - ${junit-jupiter.version} - test - From 21ada6d558c99f55b7e14077067c560f2ec32535 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 8 Oct 2021 15:08:29 +0200 Subject: [PATCH 440/560] HBX-2230: Adapt the tests that fail when run on the GitHub workflows - Adapt 'org.hibernate.tool.jdbc2cfg.Versioning.TestCase#testGenerateMappings()' Signed-off-by: Koen Aers --- .../org/hibernate/tool/jdbc2cfg/Versioning/TestCase.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Versioning/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Versioning/TestCase.java index 5018f56dda..bfecce9759 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Versioning/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Versioning/TestCase.java @@ -89,10 +89,10 @@ public void testGenerateMappings() { exporter.setOutputDirectory(testFolder); exporter.start(); File[] files = new File[4]; - files[0] = new File(testFolder, "Withversion.hbm.xml"); - files[1] = new File(testFolder, "Noversion.hbm.xml"); - files[2] = new File(testFolder, "Withrealtimestamp.hbm.xml"); - files[3] = new File(testFolder, "Withfaketimestamp.hbm.xml"); + files[0] = new File(testFolder, "WithVersion.hbm.xml"); + files[1] = new File(testFolder, "NoVersion.hbm.xml"); + files[2] = new File(testFolder, "WithRealTimestamp.hbm.xml"); + files[3] = new File(testFolder, "WithFakeTimestamp.hbm.xml"); Metadata metadata = MetadataDescriptorFactory .createNativeDescriptor(null, files, null) .createMetadata(); From e32a115345e96d438de8c04b499624537a393e25 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 8 Oct 2021 15:54:43 +0200 Subject: [PATCH 441/560] HBX-2230: Adapt the tests that fail when run on the GitHub workflows - Adapt 'org.hibernate.tool.jdbc2cfg.KeyPropertyCompositeId.TestCase#testGeneration()' Signed-off-by: Koen Aers --- .../tool/jdbc2cfg/KeyPropertyCompositeId/TestCase.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/TestCase.java index a323b0b06d..064deca7a4 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/KeyPropertyCompositeId/TestCase.java @@ -179,12 +179,12 @@ public void testGeneration() throws Exception { URL[] urls = new URL[] { temporaryFolder.toURI().toURL() }; URLClassLoader ucl = new URLClassLoader(urls, Thread.currentThread().getContextClassLoader()); File[] files = new File[6]; - files[0] = new File(temporaryFolder, "Simplecustomerorder.hbm.xml"); - files[1] = new File(temporaryFolder, "Simplelineitem.hbm.xml"); + files[0] = new File(temporaryFolder, "SimpleCustomerOrder.hbm.xml"); + files[1] = new File(temporaryFolder, "SimpleLineItem.hbm.xml"); files[2] = new File(temporaryFolder, "Product.hbm.xml"); files[3] = new File(temporaryFolder, "Customer.hbm.xml"); - files[4] = new File(temporaryFolder, "Lineitem.hbm.xml"); - files[5] = new File(temporaryFolder, "Customerorder.hbm.xml"); + files[4] = new File(temporaryFolder, "LineItem.hbm.xml"); + files[5] = new File(temporaryFolder, "CustomerOrder.hbm.xml"); Thread.currentThread().setContextClassLoader(ucl); SessionFactory factory = MetadataDescriptorFactory .createNativeDescriptor(null, files, null) From da81c5f2007c41421f9eeed916a6dabcfa74e125 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 8 Oct 2021 17:29:12 +0200 Subject: [PATCH 442/560] HBX-2230: Adapt the tests that fail when run on the GitHub workflows - Adapt 'org.hibernate.tool.jdbc2cfg.CompositeId.TestCase' Signed-off-by: Koen Aers --- .../org/hibernate/tool/jdbc2cfg/CompositeId/TestCase.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/CompositeId/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/CompositeId/TestCase.java index bd655b3f39..08fb245e6d 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/CompositeId/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/CompositeId/TestCase.java @@ -197,12 +197,12 @@ public void testGeneration() throws Exception { urls, Thread.currentThread().getContextClassLoader()); File[] files = new File[6]; - files[0] = new File(temporaryFolder, "Simplecustomerorder.hbm.xml"); - files[1] = new File(temporaryFolder, "Simplelineitem.hbm.xml"); + files[0] = new File(temporaryFolder, "SimpleCustomerOrder.hbm.xml"); + files[1] = new File(temporaryFolder, "SimpleLineItem.hbm.xml"); files[2] = new File(temporaryFolder, "Product.hbm.xml"); files[3] = new File(temporaryFolder, "Customer.hbm.xml"); - files[4] = new File(temporaryFolder, "Lineitem.hbm.xml"); - files[5] = new File(temporaryFolder, "Customerorder.hbm.xml"); + files[4] = new File(temporaryFolder, "LineItem.hbm.xml"); + files[5] = new File(temporaryFolder, "CustomerOrder.hbm.xml"); Thread.currentThread().setContextClassLoader(ucl); SessionFactory factory = MetadataDescriptorFactory .createNativeDescriptor(null, files, null) From 4e4f43451f19f0cf711b5c31618d360c7fa65879 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 8 Oct 2021 17:53:57 +0200 Subject: [PATCH 443/560] HBX-2230: Adapt the tests that fail when run on the GitHub workflows - Adapt 'org.hibernate.tool.hbm2x.GenericExporterTest.TestCase#testFreeMarkerSyntaxFailureExpected()' Signed-off-by: Koen Aers --- .../tool/hbm2x/GenericExporterTest/TestCase.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/GenericExporterTest/TestCase.java b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/GenericExporterTest/TestCase.java index 465dd32c4a..a99a929429 100644 --- a/test/nodb/src/test/java/org/hibernate/tool/hbm2x/GenericExporterTest/TestCase.java +++ b/test/nodb/src/test/java/org/hibernate/tool/hbm2x/GenericExporterTest/TestCase.java @@ -102,10 +102,10 @@ public void testFreeMarkerSyntaxFailureExpected() { ge.setFilePattern("{class-name}.ftltest"); ge.start(); JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "Author.ftltest" ) ); - JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "Article.ftlTest" ) ); - JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "BaseHelloWorld.ftlTest" ) ); - JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "HelloUniverse.ftlTest" ) ); - JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "UniversalAddress.ftlTest" ) ); + JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "Article.ftltest" ) ); + JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "BaseHelloWorld.ftltest" ) ); + JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "HelloUniverse.ftltest" ) ); + JUnitUtil.assertIsNonEmptyFile(new File(outputDir, "UniversalAddress.ftltest" ) ); } @Test From 9a2dc948e5c7c3200eef9e73f9022313a2a32fa6 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 8 Oct 2021 13:53:35 +0200 Subject: [PATCH 444/560] HBX-2185: Create GitHub yaml file to build and test automatically when opening PR Signed-off-by: Koen Aers --- .github/workflows/build_test.yml | 36 +++++++++++++++++++ .github/workflows/publish_reports.yml | 50 +++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 .github/workflows/build_test.yml create mode 100644 .github/workflows/publish_reports.yml diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml new file mode 100644 index 0000000000..54fba73b5e --- /dev/null +++ b/.github/workflows/build_test.yml @@ -0,0 +1,36 @@ +name: Build and Test + +on: + pull_request + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout PR Branch + uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + + - name: Setup Java 8 + uses: actions/setup-java@v1 + with: + java-version: 8 + java-package: jdk + architecture: x64 + + - name: Build and Test + uses: GabrielBB/xvfb-action@v1 + with: + run: mvn clean install -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true + + - name: Archive Test Artifacts + uses: actions/upload-artifact@v2 + with: + name: test-reports + path: | + **/*target/surefire-reports/ + **/*.log + diff --git a/.github/workflows/publish_reports.yml b/.github/workflows/publish_reports.yml new file mode 100644 index 0000000000..f67be72b62 --- /dev/null +++ b/.github/workflows/publish_reports.yml @@ -0,0 +1,50 @@ +name: Publish Reports + +on: + workflow_run: + workflows: ["Build and Test"] + types: + - completed + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Download artifacts + uses: actions/github-script@v3.1.0 + with: + script: | + var artifacts = await github.actions.listWorkflowRunArtifacts({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: ${{github.event.workflow_run.id}}, + }); + for (var artifact of artifacts.data.artifacts) { + if (artifact.name.endsWith('test-reports')) { + var zipfile = await github.actions.downloadArtifact({ + owner: context.repo.owner, + repo: context.repo.repo, + artifact_id: artifact.id, + archive_format: 'zip', + }); + var fs = require('fs'); + var path = require('path'); + var pathFile = path.format({ + root: '${{github.workspace}}/', + name: artifact.name, + ext: '.zip' + }); + fs.writeFileSync(pathFile, Buffer.from(zipfile.data)); + } + } + - name: Unzip artifacts + run: | + find . -name '*.zip' -exec sh -c 'unzip -d "${1%.*}" "$1"' _ {} \; + - name: Publish aggregated tests reports + uses: scacap/action-surefire-report@v1 + with: + github_token: ${{secrets.GITHUB_TOKEN}} + report_paths: '${{github.workspace}}/*test-reports/**/TEST-*.xml' + commit: ${{github.event.workflow_run.head_sha}} + From 98705fb74a829d7832f4b9ac3c330ea66cb0e359 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 13 Oct 2021 14:50:24 +0200 Subject: [PATCH 445/560] HBX-2231: Update Hibernate ORM Dependency to Version 5.6.0.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b5ed6793fb..f206b5b4d9 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ 1.7 1.4.200 5.1.2.Final - 5.6.0.CR1 + 5.6.0.Final 2.5.2 8.0.1 2.2 From de45a8dc4077798ae593d256f94631daffb57486 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 13 Oct 2021 15:38:35 +0200 Subject: [PATCH 446/560] HBX-2233: Update version identifier to 5.6.0.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 6e047b626c..c8bf4e7f15 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.0-SNAPSHOT + 5.6.0.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index e6569eb993..934a474d30 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.0-SNAPSHOT"; + public static final String VERSION = "5.6.0.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index b9f63b32b6..1d8d0072ec 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.0-SNAPSHOT + 5.6.0.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index f206b5b4d9..37000c0ba3 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.0-SNAPSHOT + 5.6.0.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 2af710f81a..1d989cf9d8 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 1573138b50..654030030e 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index b771c2cc15..9854ba22d8 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 3d49ad61ab..086b3421ee 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 4d36616c70..ad81543f8e 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 1e5e85e93e..31ad5a2c34 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index e4f92d085b..74a015a1db 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 2249489cc7..5e0d5ba036 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 8adfb7b24e..4836b0e5fe 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.0-SNAPSHOT + 5.6.0.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 855316fd49..1daa3919af 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0-SNAPSHOT + 5.6.0.Final hibernate-tools-tests-utils From 1dc3295ee30c0fbe1b491da48eec3addd1f2d26c Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 14 Oct 2021 10:29:43 +0200 Subject: [PATCH 447/560] HBX-2235: Update version identifier to 5.6.1-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index c8bf4e7f15..9cfb54d908 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.0.Final + 5.6.1-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 934a474d30..6a05bc5fc9 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.0.Final"; + public static final String VERSION = "5.6.1-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 1d8d0072ec..eeda46db7d 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.0.Final + 5.6.1-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 37000c0ba3..e9a2596725 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.0.Final + 5.6.1-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 1d989cf9d8..4c11517d61 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Final + 5.6.1-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 654030030e..d485f27386 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Final + 5.6.1-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 9854ba22d8..080d5ea24b 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Final + 5.6.1-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 086b3421ee..484d1dd43e 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Final + 5.6.1-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index ad81543f8e..a2d9b567ee 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Final + 5.6.1-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 31ad5a2c34..49571b09d3 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Final + 5.6.1-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 74a015a1db..705a780e53 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Final + 5.6.1-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 5e0d5ba036..3c1f066e20 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Final + 5.6.1-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 4836b0e5fe..dd8f908bd4 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.0.Final + 5.6.1-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 1daa3919af..22a9781a2a 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.0.Final + 5.6.1-SNAPSHOT hibernate-tools-tests-utils From b14eadce9dd7acae67caee03f7083ccce041598b Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 3 Nov 2021 10:07:14 +0100 Subject: [PATCH 448/560] HBX-2248: Make sure the 'embed-xml' attribute is not generated in the HBM files Signed-off-by: Koen Aers --- .../tool/hbm2x/xml/AbstractXMLPrettyPrinterStrategy.java | 4 +++- .../hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/Car.hbm.xml | 2 +- .../hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/Car.hbm.xml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/main/src/main/java/org/hibernate/tool/hbm2x/xml/AbstractXMLPrettyPrinterStrategy.java b/main/src/main/java/org/hibernate/tool/hbm2x/xml/AbstractXMLPrettyPrinterStrategy.java index e73fa3adab..7016d9df05 100644 --- a/main/src/main/java/org/hibernate/tool/hbm2x/xml/AbstractXMLPrettyPrinterStrategy.java +++ b/main/src/main/java/org/hibernate/tool/hbm2x/xml/AbstractXMLPrettyPrinterStrategy.java @@ -19,7 +19,9 @@ public abstract class AbstractXMLPrettyPrinterStrategy implements XMLPrettyPrinterStrategy { protected Document newDocument(String xml, String encoding) throws SAXException, IOException, ParserConfigurationException { - final Document document = DocumentBuilderFactory.newInstance() + final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); + final Document document = dbf .newDocumentBuilder() .parse(new InputSource(new ByteArrayInputStream(xml.getBytes(encoding)))); document.normalize(); diff --git a/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/Car.hbm.xml b/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/Car.hbm.xml index 53074aa846..5ef3000e29 100644 --- a/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/Car.hbm.xml +++ b/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/AbstractTest/Car.hbm.xml @@ -12,7 +12,7 @@ - + diff --git a/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/Car.hbm.xml b/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/Car.hbm.xml index b3f575dc55..a79f26cbd2 100644 --- a/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/Car.hbm.xml +++ b/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/BackrefTest/Car.hbm.xml @@ -12,7 +12,7 @@ - + From 4774a6d3019345e658d69f77fffe1f24fc7d09dc Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 3 Nov 2021 15:59:43 +0100 Subject: [PATCH 449/560] HBX-2239: Update Hibernate ORM Dependency to Version 5.6.1.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e9a2596725..25b58e9dc7 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ 1.7 1.4.200 5.1.2.Final - 5.6.0.Final + 5.6.1.Final 2.5.2 8.0.1 2.2 From 23da963a20c4a33487d16e104d72df5d0e5a2df3 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 3 Nov 2021 19:24:34 +0100 Subject: [PATCH 450/560] HBX-2246: Update version identifier to 5.6.1.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 9cfb54d908..ec52af2eab 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.1-SNAPSHOT + 5.6.1.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 6a05bc5fc9..0bd584056c 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.1-SNAPSHOT"; + public static final String VERSION = "5.6.1.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index eeda46db7d..fba83b37d4 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.1-SNAPSHOT + 5.6.1.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 25b58e9dc7..8a3404dd84 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.1-SNAPSHOT + 5.6.1.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 4c11517d61..62b9dd8be0 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.1-SNAPSHOT + 5.6.1.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index d485f27386..9218e0d83b 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.1-SNAPSHOT + 5.6.1.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 080d5ea24b..660339c138 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.1-SNAPSHOT + 5.6.1.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 484d1dd43e..805c09ce5b 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.1-SNAPSHOT + 5.6.1.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index a2d9b567ee..7ce80b9f0e 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.1-SNAPSHOT + 5.6.1.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 49571b09d3..25b1244792 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.1-SNAPSHOT + 5.6.1.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 705a780e53..b7864b47e2 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.1-SNAPSHOT + 5.6.1.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 3c1f066e20..eff2131c02 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.1-SNAPSHOT + 5.6.1.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index dd8f908bd4..0b48f3c151 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.1-SNAPSHOT + 5.6.1.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 22a9781a2a..a07695e8a5 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.1-SNAPSHOT + 5.6.1.Final hibernate-tools-tests-utils From 9f9eb6f59052c83326308c523794d797d8408796 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 4 Nov 2021 11:27:39 +0100 Subject: [PATCH 451/560] HBX-2247: Update version identifier to 5.6.2-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index ec52af2eab..4ead4603bb 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.1.Final + 5.6.2-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 0bd584056c..94c3c25016 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.1.Final"; + public static final String VERSION = "5.6.2-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index fba83b37d4..51b08556c4 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.1.Final + 5.6.2-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 8a3404dd84..0f5cc0afe7 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.1.Final + 5.6.2-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 62b9dd8be0..473e372752 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.1.Final + 5.6.2-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 9218e0d83b..8a948ffbc5 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.1.Final + 5.6.2-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 660339c138..7a8e41a7d9 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.1.Final + 5.6.2-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 805c09ce5b..da8fe2b5c0 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.1.Final + 5.6.2-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 7ce80b9f0e..8b4f324367 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.1.Final + 5.6.2-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 25b1244792..3d7a54148c 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.1.Final + 5.6.2-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index b7864b47e2..b400f30236 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.1.Final + 5.6.2-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index eff2131c02..ecce96b9ce 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.1.Final + 5.6.2-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 0b48f3c151..f6f44a76d8 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.1.Final + 5.6.2-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index a07695e8a5..9e79cb01fa 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.1.Final + 5.6.2-SNAPSHOT hibernate-tools-tests-utils From 06a9ecab369f15e74b5b5c402c234654a60ce08f Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 30 Nov 2021 10:10:41 +0100 Subject: [PATCH 452/560] HBX-2252: Update dependency on jboss-parent to version 39 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0f5cc0afe7..f4af98d5e5 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.jboss jboss-parent - 38 + 39 org.hibernate From e14aa1095ee8b730c9eb7a6e319bf2658f1e435e Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 1 Dec 2021 13:22:59 +0100 Subject: [PATCH 453/560] HBX-2257: Update dependency on ant to version 1.10.12 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f4af98d5e5..039c9a3560 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,7 @@ - 1.10.11 + 1.10.12 4.4 2.3.31 From a405a8b032e75c9045dc00b56a5fec68d0066dd0 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 2 Dec 2021 17:13:41 +0100 Subject: [PATCH 454/560] HBX-2259: Update dependency on junit-jupiter to version 5.8.2 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 039c9a3560..2fe4b71fe1 100644 --- a/pom.xml +++ b/pom.xml @@ -53,7 +53,7 @@ 8.0.1 2.2 1.2.0 - 5.7.2 + 5.8.2 8.0.22 19.3.0.0 9.2.1.jre8 From 419386fa8eaeba5a1fd0be20d4759b1b5ce1487c Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 7 Jan 2022 11:53:13 +0100 Subject: [PATCH 455/560] HBX-2264: Update version identifier to 5.6.2.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 4ead4603bb..c593e5053e 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.2-SNAPSHOT + 5.6.2.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 94c3c25016..ae3ad54121 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.2-SNAPSHOT"; + public static final String VERSION = "5.6.2.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 51b08556c4..ac392c61e4 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.2-SNAPSHOT + 5.6.2.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 2fe4b71fe1..3af59adc23 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.2-SNAPSHOT + 5.6.2.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 473e372752..97b59b9409 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.2-SNAPSHOT + 5.6.2.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 8a948ffbc5..ae97782d7c 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.2-SNAPSHOT + 5.6.2.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 7a8e41a7d9..12c7e4f6fb 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.2-SNAPSHOT + 5.6.2.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index da8fe2b5c0..e9a9f081b8 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.2-SNAPSHOT + 5.6.2.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 8b4f324367..fc86a52e4b 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.2-SNAPSHOT + 5.6.2.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 3d7a54148c..310a84ede1 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.2-SNAPSHOT + 5.6.2.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index b400f30236..0c8db5e93d 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.2-SNAPSHOT + 5.6.2.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index ecce96b9ce..73c2c91c29 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.2-SNAPSHOT + 5.6.2.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index f6f44a76d8..e1b26c13c3 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.2-SNAPSHOT + 5.6.2.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 9e79cb01fa..c7ac8ae80b 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.2-SNAPSHOT + 5.6.2.Final hibernate-tools-tests-utils From d080fbc06d6086d03aa26454219356760ff2c4bb Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 7 Jan 2022 13:18:16 +0100 Subject: [PATCH 456/560] HBX-2265: Update version identifier to 5.6.3-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index c593e5053e..7f31de2474 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.2.Final + 5.6.3-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index ae3ad54121..5bc6f3a956 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.2.Final"; + public static final String VERSION = "5.6.3-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index ac392c61e4..4fe0887416 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.2.Final + 5.6.3-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 3af59adc23..3357808122 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.2.Final + 5.6.3-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 97b59b9409..5fcabfcd23 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.2.Final + 5.6.3-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index ae97782d7c..b91b62c13d 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.2.Final + 5.6.3-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 12c7e4f6fb..8fa2816f32 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.2.Final + 5.6.3-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index e9a9f081b8..041429beb4 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.2.Final + 5.6.3-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index fc86a52e4b..55612cf7bc 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.2.Final + 5.6.3-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 310a84ede1..487c48adba 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.2.Final + 5.6.3-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 0c8db5e93d..b830e03d74 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.2.Final + 5.6.3-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 73c2c91c29..7721a70034 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.2.Final + 5.6.3-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index e1b26c13c3..04339ec6a3 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.2.Final + 5.6.3-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index c7ac8ae80b..3849739128 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.2.Final + 5.6.3-SNAPSHOT hibernate-tools-tests-utils From fc0eca9f076db0fe114e625f23dadbaaced3cd0c Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 21 Jan 2022 11:51:43 +0100 Subject: [PATCH 457/560] HBX-2266: Update Hibernate ORM Dependency to Version 5.6.3.Final Signed-off-by: Koen Aers --- .../detector/SchemaByMetaDataDetector.java | 60 +++++++++++++++++-- pom.xml | 2 +- 2 files changed, 57 insertions(+), 5 deletions(-) diff --git a/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java b/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java index d9074051ed..cb7bcd7689 100644 --- a/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java +++ b/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java @@ -1,5 +1,6 @@ package org.hibernate.tool.hbmlint.detector; +import java.lang.reflect.Field; import java.util.Collections; import java.util.Iterator; import java.util.List; @@ -10,6 +11,7 @@ import org.hibernate.HibernateException; import org.hibernate.MappingException; import org.hibernate.boot.Metadata; +import org.hibernate.boot.model.relational.QualifiedName; import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.cfg.AvailableSettings; import org.hibernate.cfg.Environment; @@ -24,7 +26,11 @@ import org.hibernate.engine.jdbc.spi.JdbcServices; import org.hibernate.engine.spi.Mapping; import org.hibernate.id.IdentifierGenerator; +import org.hibernate.id.MultipleHiLoPerTableGenerator; import org.hibernate.id.PersistentIdentifierGenerator; +import org.hibernate.id.SequenceGenerator; +import org.hibernate.id.enhanced.SequenceStyleGenerator; +import org.hibernate.id.enhanced.TableGenerator; import org.hibernate.internal.util.StringHelper; import org.hibernate.mapping.Collection; import org.hibernate.mapping.Column; @@ -88,7 +94,7 @@ public void visitGenerators(IssueCollector collector) { // TODO: move this check into something that could check per class or collection instead. while ( iter.hasNext() ) { PersistentIdentifierGenerator generator = (PersistentIdentifierGenerator) iter.next(); - Object key = generator.generatorKey(); + Object key = getGeneratorKey(generator); if ( !isSequence(key, sequences) && !isTable( key ) ) { collector.reportIssue( new Issue( "MISSING_ID_GENERATOR", Issue.HIGH_PRIORITY, "Missing sequence or table: " + key)); } @@ -218,7 +224,6 @@ private void setSchemaSelection(Table table) { * @return iterator over all the IdentifierGenerator's found in the entitymodel and return a list of unique IdentifierGenerators * @throws MappingException */ - @SuppressWarnings("deprecation") private Iterator iterateGenerators() throws MappingException { TreeMap generators = @@ -244,7 +249,7 @@ private Iterator iterateGenerators() throws MappingExceptio ); if ( ig instanceof PersistentIdentifierGenerator ) { - generators.put( ( (PersistentIdentifierGenerator) ig ).generatorKey(), ig ); + generators.put( getGeneratorKey( (PersistentIdentifierGenerator) ig ), ig ); } } @@ -266,7 +271,7 @@ private Iterator iterateGenerators() throws MappingExceptio ); if ( ig instanceof PersistentIdentifierGenerator ) { - generators.put( ( (PersistentIdentifierGenerator) ig ).generatorKey(), ig ); + generators.put( getGeneratorKey( (PersistentIdentifierGenerator) ig ), ig ); } } @@ -274,5 +279,52 @@ private Iterator iterateGenerators() throws MappingExceptio return generators.values().iterator(); } + + private String getGeneratorKey(PersistentIdentifierGenerator ig) { + String result = null; + if (ig instanceof MultipleHiLoPerTableGenerator) { + result = getKeyForMultipleHiloPerTableGenerator((MultipleHiLoPerTableGenerator)ig); + } else if (ig instanceof SequenceGenerator) { + result = getKeyForSequenceGenerator((SequenceGenerator)ig); + } else if (ig instanceof SequenceStyleGenerator) { + result = getKeyForSequenceStyleGenerator((SequenceStyleGenerator)ig); + } else if (ig instanceof TableGenerator) { + result = getKeyForTableGenerator((TableGenerator)ig); + } + return result; + } + + private String getKeyForMultipleHiloPerTableGenerator(MultipleHiLoPerTableGenerator ig) { + String result = null; + try { + Field field = MultipleHiLoPerTableGenerator.class.getDeclaredField("tableName"); + field.setAccessible(true); + result = (String)field.get(ig); + } catch (Throwable t) { + throw new RuntimeException(t); + } + return result; + } + + private String getKeyForSequenceGenerator(SequenceGenerator ig) { + String result = null; + try { + Field field = SequenceGenerator.class.getDeclaredField("logicalQualifiedSequenceName"); + field.setAccessible(true); + QualifiedName name = (QualifiedName)field.get(ig); + result = name.render(); + } catch (Throwable t) { + throw new RuntimeException(t); + } + return result; + } + + private String getKeyForSequenceStyleGenerator(SequenceStyleGenerator ig) { + return ig.getDatabaseStructure().getPhysicalName().render(); + } + + private String getKeyForTableGenerator(TableGenerator ig) { + return ig.getTableName(); + } } diff --git a/pom.xml b/pom.xml index 3357808122..0ac9910ed3 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ 1.7 1.4.200 5.1.2.Final - 5.6.1.Final + 5.6.3.Final 2.5.2 8.0.1 2.2 From e61a5ff9ee204b320b241c09ba6abf34d87e64fa Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 21 Jan 2022 12:07:02 +0100 Subject: [PATCH 458/560] HBX-2286: Update version identifier to 5.6.3.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 7f31de2474..1fd0dab334 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.3-SNAPSHOT + 5.6.3.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 5bc6f3a956..c2af675414 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.3-SNAPSHOT"; + public static final String VERSION = "5.6.3.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 4fe0887416..7d2ba64fc7 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.3-SNAPSHOT + 5.6.3.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 0ac9910ed3..da432d0be7 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.3-SNAPSHOT + 5.6.3.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 5fcabfcd23..787df3e32f 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.3-SNAPSHOT + 5.6.3.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index b91b62c13d..c3748887c7 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.3-SNAPSHOT + 5.6.3.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 8fa2816f32..8357bf57ab 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.3-SNAPSHOT + 5.6.3.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 041429beb4..fd548383f6 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.3-SNAPSHOT + 5.6.3.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 55612cf7bc..289ed5e66d 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.3-SNAPSHOT + 5.6.3.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 487c48adba..f135a19d22 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.3-SNAPSHOT + 5.6.3.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index b830e03d74..7df383bec1 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.3-SNAPSHOT + 5.6.3.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 7721a70034..bac936dca0 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.3-SNAPSHOT + 5.6.3.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 04339ec6a3..f493447139 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.3-SNAPSHOT + 5.6.3.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 3849739128..6ad9e91a50 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.3-SNAPSHOT + 5.6.3.Final hibernate-tools-tests-utils From 7655c7a94c594d820188b57f046d8b327d70cac8 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 21 Jan 2022 12:39:18 +0100 Subject: [PATCH 459/560] HBX-2287: Update version identifier to 5.6.4-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 1fd0dab334..764d4f8f5c 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.3.Final + 5.6.4-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index c2af675414..6b0061a772 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.3.Final"; + public static final String VERSION = "5.6.4-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 7d2ba64fc7..19041d5f0b 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.3.Final + 5.6.4-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index da432d0be7..45b2440957 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.3.Final + 5.6.4-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 787df3e32f..6abee31021 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.3.Final + 5.6.4-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index c3748887c7..67aff6ee50 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.3.Final + 5.6.4-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 8357bf57ab..33b92d75f5 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.3.Final + 5.6.4-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index fd548383f6..cd68b83a4a 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.3.Final + 5.6.4-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 289ed5e66d..f25f881a0a 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.3.Final + 5.6.4-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index f135a19d22..92e817e372 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.3.Final + 5.6.4-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 7df383bec1..3350f9205e 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.3.Final + 5.6.4-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index bac936dca0..5f62a9f32b 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.3.Final + 5.6.4-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index f493447139..129972e107 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.3.Final + 5.6.4-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 6ad9e91a50..14fdaa1ff4 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.3.Final + 5.6.4-SNAPSHOT hibernate-tools-tests-utils From bb515233a0975201c439e157e4a8245e2bf04e19 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 31 Jan 2022 12:28:40 +0100 Subject: [PATCH 460/560] HBX-2291: Update Hibernate ORM Dependency to Version 5.6.4.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 45b2440957..9bcfb2214a 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ 1.7 1.4.200 5.1.2.Final - 5.6.3.Final + 5.6.4.Final 2.5.2 8.0.1 2.2 From a136ca00f004806e869a05a8be72a8e21f8b60a1 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 31 Jan 2022 13:23:24 +0100 Subject: [PATCH 461/560] HBX-2292: Update version identifier to 5.6.4.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 764d4f8f5c..66c5aec928 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.4-SNAPSHOT + 5.6.4.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 6b0061a772..8b7c554639 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.4-SNAPSHOT"; + public static final String VERSION = "5.6.4.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 19041d5f0b..5ba8c6a617 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.4-SNAPSHOT + 5.6.4.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 9bcfb2214a..bc35a09b5b 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.4-SNAPSHOT + 5.6.4.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 6abee31021..8f212c3977 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.4-SNAPSHOT + 5.6.4.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 67aff6ee50..9cec08258a 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.4-SNAPSHOT + 5.6.4.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 33b92d75f5..28d4c9aec0 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.4-SNAPSHOT + 5.6.4.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index cd68b83a4a..02c24bb5e2 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.4-SNAPSHOT + 5.6.4.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index f25f881a0a..711f176bb0 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.4-SNAPSHOT + 5.6.4.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 92e817e372..bda7add3c3 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.4-SNAPSHOT + 5.6.4.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 3350f9205e..7fcf973ed9 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.4-SNAPSHOT + 5.6.4.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 5f62a9f32b..30bea8e37d 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.4-SNAPSHOT + 5.6.4.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 129972e107..f8d90d79da 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.4-SNAPSHOT + 5.6.4.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 14fdaa1ff4..64c04d2b88 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.4-SNAPSHOT + 5.6.4.Final hibernate-tools-tests-utils From 25909a9baa6e39d0098d36107c8cdf2e242cbb6a Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 31 Jan 2022 13:42:59 +0100 Subject: [PATCH 462/560] HBX-2293: Update version identifier to 5.6.5-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 66c5aec928..fb0750f221 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.4.Final + 5.6.5-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 8b7c554639..6561a4974b 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.4.Final"; + public static final String VERSION = "5.6.5-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 5ba8c6a617..10c4ec471b 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.4.Final + 5.6.5-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index bc35a09b5b..0859eb3741 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.4.Final + 5.6.5-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 8f212c3977..62b0c4c436 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.4.Final + 5.6.5-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 9cec08258a..d3296cbcd8 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.4.Final + 5.6.5-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 28d4c9aec0..b3a43fe267 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.4.Final + 5.6.5-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 02c24bb5e2..c5789918bb 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.4.Final + 5.6.5-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 711f176bb0..1e558a0059 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.4.Final + 5.6.5-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index bda7add3c3..864e92d40e 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.4.Final + 5.6.5-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 7fcf973ed9..e10bfb1360 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.4.Final + 5.6.5-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 30bea8e37d..bb525b3a34 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.4.Final + 5.6.5-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index f8d90d79da..0d09c6244e 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.4.Final + 5.6.5-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 64c04d2b88..c8b9ec4898 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.4.Final + 5.6.5-SNAPSHOT hibernate-tools-tests-utils From 73f5e3ea80431b08d428bccce29c2c0b23ecbb14 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 3 Feb 2022 09:16:46 +0100 Subject: [PATCH 463/560] HBX-2300: Update the dependency for H2 to 2.x.x - Adapt the returned table type from 'BASE TABLE' to 'TABLE' Signed-off-by: Koen Aers --- .../hibernate/cfg/reveng/dialect/H2MetaDataDialect.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main/src/main/java/org/hibernate/cfg/reveng/dialect/H2MetaDataDialect.java b/main/src/main/java/org/hibernate/cfg/reveng/dialect/H2MetaDataDialect.java index 663f27e600..b3775f49c2 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/dialect/H2MetaDataDialect.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/dialect/H2MetaDataDialect.java @@ -35,6 +35,14 @@ public H2MetaDataDialect() { } } + protected void putTableType(Map element, ResultSet tableRs) throws SQLException { + String tableType = tableRs.getString("TABLE_TYPE"); + if ("BASE TABLE".equals(tableType)) { + tableType = "TABLE"; + } + element.put("TABLE_TYPE", tableType); + } + protected void putTablePart(Map element, ResultSet tableRs) throws SQLException { super.putTablePart( element, tableRs ); if ( !understandsCatalogName ) { From 24f6e28eaba4788f3243cab6e798e1749a5ee35d Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 3 Feb 2022 09:37:11 +0100 Subject: [PATCH 464/560] HBX-2300: Update the dependency for H2 to 2.x.x - Isolate SQL string for the 1.x.xxx versions Signed-off-by: Koen Aers --- .../cfg/reveng/dialect/H2MetaDataDialect.java | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/main/src/main/java/org/hibernate/cfg/reveng/dialect/H2MetaDataDialect.java b/main/src/main/java/org/hibernate/cfg/reveng/dialect/H2MetaDataDialect.java index b3775f49c2..a915feb8c1 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/dialect/H2MetaDataDialect.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/dialect/H2MetaDataDialect.java @@ -19,6 +19,24 @@ */ public class H2MetaDataDialect extends JDBCMetaDataDialect { + private static final String H2_1_X_SQL = + "SELECT " + + " idx.TABLE_CATALOG TABLE_CAT, " + + " idx.TABLE_SCHEMA TABLE_SCHEM, " + + " idx.TABLE_NAME, " + + " idx.COLUMN_NAME, " + + " cols.COLUMN_DEFAULT COLUMN_DEFAULT " + + "FROM " + + " INFORMATION_SCHEMA.INDEXES idx, " + + " INFORMATION_SCHEMA.COLUMNS cols " + + "WHERE " + + " idx.TABLE_CATALOG = cols.TABLE_CATALOG AND " + + " idx.TABLE_SCHEMA = cols.TABLE_SCHEMA AND " + + " idx.TABLE_NAME = cols.TABLE_NAME AND " + + " idx.PRIMARY_KEY = TRUE AND " + + " COLUMN_DEFAULT like '%NEXT VALUE FOR%' "; + + private static boolean understandsCatalogName = true; public H2MetaDataDialect() { @@ -65,14 +83,7 @@ public Iterator> getSuggestedPrimaryKeyStrategyName(String c log.debug("geSuggestedPrimaryKeyStrategyName(" + catalog + "." + schema + "." + table + ")"); - String sql = "SELECT idx.TABLE_CATALOG TABLE_CAT, idx.TABLE_SCHEMA TABLE_SCHEM, idx.TABLE_NAME, idx.COLUMN_NAME, cols.COLUMN_DEFAULT COLUMN_DEFAULT FROM " + - "INFORMATION_SCHEMA.INDEXES idx, INFORMATION_SCHEMA.COLUMNS cols " + - "WHERE " + - "idx.TABLE_CATALOG = cols.TABLE_CATALOG " + - "and idx.TABLE_SCHEMA = cols.TABLE_SCHEMA " + - "and idx.TABLE_NAME = cols.TABLE_NAME " + - "AND idx.PRIMARY_KEY = TRUE " + - "AND COLUMN_DEFAULT like '%NEXT VALUE FOR%' "; + String sql = H2_1_X_SQL; if(catalog!=null) { sql += "AND idx.TABLE_CATALOG like '" + catalog + "' "; } From c3449e9b8ac14974f20c664c0539e7bf331ea5c4 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 4 Feb 2022 09:23:16 +0100 Subject: [PATCH 465/560] HBX-2300: Update the dependency for H2 to 2.x.x - Add switch to change the suggested primary key strategy query depending on version 1.x or 2.x Signed-off-by: Koen Aers --- .../cfg/reveng/dialect/H2MetaDataDialect.java | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/main/src/main/java/org/hibernate/cfg/reveng/dialect/H2MetaDataDialect.java b/main/src/main/java/org/hibernate/cfg/reveng/dialect/H2MetaDataDialect.java index a915feb8c1..fc52df079b 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/dialect/H2MetaDataDialect.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/dialect/H2MetaDataDialect.java @@ -19,7 +19,7 @@ */ public class H2MetaDataDialect extends JDBCMetaDataDialect { - private static final String H2_1_X_SQL = + private static final String SPKSQ_H2_1_X = "SELECT " + " idx.TABLE_CATALOG TABLE_CAT, " + " idx.TABLE_SCHEMA TABLE_SCHEM, " + @@ -34,11 +34,29 @@ public class H2MetaDataDialect extends JDBCMetaDataDialect { " idx.TABLE_SCHEMA = cols.TABLE_SCHEMA AND " + " idx.TABLE_NAME = cols.TABLE_NAME AND " + " idx.PRIMARY_KEY = TRUE AND " + - " COLUMN_DEFAULT like '%NEXT VALUE FOR%' "; - + " COLUMN_DEFAULT like '%NEXT VALUE FOR%' "; + + private static final String SPKSQ_H2_2_X = + "SELECT " + + " idx.TABLE_CATALOG TABLE_CAT, " + + " idx.TABLE_SCHEMA TABLE_SCHEM, " + + " idx.TABLE_NAME, " + + " cols.COLUMN_NAME, " + + " cols.COLUMN_DEFAULT " + + "FROM " + + " INFORMATION_SCHEMA.INDEXES idx, " + + " INFORMATION_SCHEMA.COLUMNS cols " + + "WHERE " + + " idx.TABLE_CATALOG = cols.TABLE_CATALOG AND " + + " idx.TABLE_SCHEMA = cols.TABLE_SCHEMA AND " + + " idx.TABLE_NAME = cols.TABLE_NAME AND " + + " idx.INDEX_TYPE_NAME = 'PRIMARY KEY' AND " + + " cols.COLUMN_DEFAULT LIKE '%NEXT VALUE FOR%'"; private static boolean understandsCatalogName = true; + private String suggested_primary_key_strategy_query = null; + public H2MetaDataDialect() { super(); try { @@ -47,6 +65,7 @@ public H2MetaDataDialect() { if ( build.intValue() < 55 ) { understandsCatalogName = false; } + suggested_primary_key_strategy_query = build.intValue() > 200 ? SPKSQ_H2_2_X : SPKSQ_H2_1_X; } catch( Throwable e ) { // ignore (probably H2 not in the classpath) @@ -83,7 +102,7 @@ public Iterator> getSuggestedPrimaryKeyStrategyName(String c log.debug("geSuggestedPrimaryKeyStrategyName(" + catalog + "." + schema + "." + table + ")"); - String sql = H2_1_X_SQL; + String sql = suggested_primary_key_strategy_query; if(catalog!=null) { sql += "AND idx.TABLE_CATALOG like '" + catalog + "' "; } From 8ffd3a77903d5d393a3679a5698092962a4cc325 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 4 Feb 2022 10:50:16 +0100 Subject: [PATCH 466/560] HBX-2300: Update the dependency for H2 to 2.x.x - Add 'dbtimestamp' as possible column name for auto detection for optimistic lock (as 'timestamp' is a reserved word for H2 2.x) Signed-off-by: Koen Aers --- .../hibernate/cfg/reveng/DefaultReverseEngineeringStrategy.java | 1 + 1 file changed, 1 insertion(+) diff --git a/main/src/main/java/org/hibernate/cfg/reveng/DefaultReverseEngineeringStrategy.java b/main/src/main/java/org/hibernate/cfg/reveng/DefaultReverseEngineeringStrategy.java index 8805261f3e..fb4718468b 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/DefaultReverseEngineeringStrategy.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/DefaultReverseEngineeringStrategy.java @@ -32,6 +32,7 @@ public class DefaultReverseEngineeringStrategy implements ReverseEngineeringStra AUTO_OPTIMISTICLOCK_COLUMNS = new HashSet(); AUTO_OPTIMISTICLOCK_COLUMNS.add("version"); AUTO_OPTIMISTICLOCK_COLUMNS.add("timestamp"); + AUTO_OPTIMISTICLOCK_COLUMNS.add("dbtimestamp"); } From bab56d94df7b0f429b20f2859834e05fb3a10e4f Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 4 Feb 2022 11:43:55 +0100 Subject: [PATCH 467/560] HBX-2300: Update the dependency for H2 to 2.x.x - Use 'ONE', 'TWO' and 'DBTIMESTAMP' instead of 'FIRST', 'SECOND' and 'TIMESTAMP' in DB creation script for test class 'org.hibernate.tool.jdbc2cfg.Versioning.TestCase' (as 'SECOND' and 'TIMESTAMP' are reserved words in H2 2.x) Signed-off-by: Koen Aers --- .../org/hibernate/tool/jdbc2cfg/Versioning/create.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/Versioning/create.sql b/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/Versioning/create.sql index d8a2f6776c..03b653a3ab 100644 --- a/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/Versioning/create.sql +++ b/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/Versioning/create.sql @@ -1,4 +1,4 @@ -CREATE TABLE WITH_VERSION (FIRST INT, SECOND INT, VERSION INT, NAME VARCHAR(256), PRIMARY KEY (FIRST)) -CREATE TABLE NO_VERSION (FIRST INT, SECOND INT, NAME VARCHAR(256), PRIMARY KEY (SECOND)) -CREATE TABLE WITH_REAL_TIMESTAMP (FIRST INT, SECOND INT, TIMESTAMP TIMESTAMP, NAME VARCHAR(256), PRIMARY KEY (FIRST)) -CREATE TABLE WITH_FAKE_TIMESTAMP (FIRST INT, SECOND INT, TIMESTAMP INT, NAME VARCHAR(256), PRIMARY KEY (FIRST)) +CREATE TABLE WITH_VERSION (ONE INT, TWO INT, VERSION INT, NAME VARCHAR(256), PRIMARY KEY (ONE)) +CREATE TABLE NO_VERSION (ONE INT, TWO INT, NAME VARCHAR(256), PRIMARY KEY (TWO)) +CREATE TABLE WITH_REAL_TIMESTAMP (ONE INT, TWO INT, DBTIMESTAMP TIMESTAMP, NAME VARCHAR(256), PRIMARY KEY (ONE)) +CREATE TABLE WITH_FAKE_TIMESTAMP (ONE INT, TWO INT, DBTIMESTAMP INT, NAME VARCHAR(256), PRIMARY KEY (ONE)) From a1ef1cd38f0d541746e79df9b573586c2d0aa7e5 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 4 Feb 2022 12:03:29 +0100 Subject: [PATCH 468/560] HBX-2300: Update the dependency for H2 to 2.x.x - Use 'ONE', 'TWO' and 'THREE' instead of 'FIRST', 'SECOND' and 'THIRD' in DB creation script for test class 'org.hibernate.tool.jdbc2cfg.Index.TestCase' (as 'SECOND' is a reserved word in H2 2.x) Signed-off-by: Koen Aers --- .../java/org/hibernate/tool/jdbc2cfg/Index/TestCase.java | 4 ++-- .../resources/org/hibernate/tool/jdbc2cfg/Index/create.sql | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Index/TestCase.java b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Index/TestCase.java index b0cd021d46..0f1ac69acd 100644 --- a/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Index/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/jdbc2cfg/Index/TestCase.java @@ -101,10 +101,10 @@ public void testWithIndex() { Column col1 = cols.next(); Column col2 = cols.next(); assertEquals( - JdbcUtil.toIdentifier(this, "FIRST"), + JdbcUtil.toIdentifier(this, "ONE"), JdbcUtil.toIdentifier(this, col1.getName())); assertEquals( - JdbcUtil.toIdentifier(this, "THIRD"), + JdbcUtil.toIdentifier(this, "THREE"), JdbcUtil.toIdentifier(this, col2.getName())); Column example = new Column(); example.setName(col2.getName() ); diff --git a/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/Index/create.sql b/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/Index/create.sql index 1fd5c554cf..d9a9acb5a0 100644 --- a/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/Index/create.sql +++ b/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/Index/create.sql @@ -1,3 +1,3 @@ -CREATE TABLE WITH_INDEX (FIRST INT, SECOND INT, THIRD INT) -CREATE INDEX MY_INDEX ON WITH_INDEX(FIRST,THIRD) -CREATE UNIQUE INDEX OTHER_IDX on WITH_INDEX(THIRD) +CREATE TABLE WITH_INDEX (ONE INT, TWO INT, THREE INT) +CREATE INDEX MY_INDEX ON WITH_INDEX(ONE,THREE) +CREATE UNIQUE INDEX OTHER_IDX on WITH_INDEX(THREE) From a516411a70b097ff8f456d8a0f9a1dfa3d1d67c5 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 4 Feb 2022 12:19:24 +0100 Subject: [PATCH 469/560] HBX-2300: Update the dependency for H2 to 2.x.x - Use 'ONE' and 'TWO' instead of 'FIRST' and 'SECOND' in DB creation script for test class 'org.hibernate.tool.cfg.JDBCMetaDataConfiguration.TestCase' (as 'SECOND' is a reserved word in H2 2.x) Signed-off-by: Koen Aers --- .../tool/cfg/JDBCMetaDataConfiguration/create.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/common/src/main/resources/org/hibernate/tool/cfg/JDBCMetaDataConfiguration/create.sql b/test/common/src/main/resources/org/hibernate/tool/cfg/JDBCMetaDataConfiguration/create.sql index d8a2f6776c..daee2519a0 100644 --- a/test/common/src/main/resources/org/hibernate/tool/cfg/JDBCMetaDataConfiguration/create.sql +++ b/test/common/src/main/resources/org/hibernate/tool/cfg/JDBCMetaDataConfiguration/create.sql @@ -1,4 +1,4 @@ -CREATE TABLE WITH_VERSION (FIRST INT, SECOND INT, VERSION INT, NAME VARCHAR(256), PRIMARY KEY (FIRST)) -CREATE TABLE NO_VERSION (FIRST INT, SECOND INT, NAME VARCHAR(256), PRIMARY KEY (SECOND)) -CREATE TABLE WITH_REAL_TIMESTAMP (FIRST INT, SECOND INT, TIMESTAMP TIMESTAMP, NAME VARCHAR(256), PRIMARY KEY (FIRST)) -CREATE TABLE WITH_FAKE_TIMESTAMP (FIRST INT, SECOND INT, TIMESTAMP INT, NAME VARCHAR(256), PRIMARY KEY (FIRST)) +CREATE TABLE WITH_VERSION (ONE INT, TWO INT, VERSION INT, NAME VARCHAR(256), PRIMARY KEY (ONE)) +CREATE TABLE NO_VERSION (ONE INT, TWO INT, NAME VARCHAR(256), PRIMARY KEY (TWO)) +CREATE TABLE WITH_REAL_TIMESTAMP (ONE INT, TWO INT, TIMESTAMP TIMESTAMP, NAME VARCHAR(256), PRIMARY KEY (ONE)) +CREATE TABLE WITH_FAKE_TIMESTAMP (ONE INT, TWO INT, TIMESTAMP INT, NAME VARCHAR(256), PRIMARY KEY (ONE)) From c0a54ff8c3219ed2036f9bb55c5a37df8afeeaa6 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 4 Feb 2022 13:39:06 +0100 Subject: [PATCH 470/560] HBX-2300: Update the dependency for H2 to 2.x.x - Make sure the MetaDataDialect that is used in test class 'org.hibernate.tool.hbm2x.IncrementalSchemaReading.TestCase' delegates to the proper database MetaDataDialect Signed-off-by: Koen Aers --- .../IncrementalSchemaReading/TestCase.java | 62 +++++++++++++------ 1 file changed, 43 insertions(+), 19 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/hbm2x/IncrementalSchemaReading/TestCase.java b/test/common/src/main/java/org/hibernate/tool/hbm2x/IncrementalSchemaReading/TestCase.java index 52bd3a0420..7e23a6943f 100644 --- a/test/common/src/main/java/org/hibernate/tool/hbm2x/IncrementalSchemaReading/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/hbm2x/IncrementalSchemaReading/TestCase.java @@ -24,22 +24,27 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertSame; +import java.lang.reflect.InvocationHandler; +import java.lang.reflect.Method; +import java.lang.reflect.Proxy; import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import java.util.Map; import java.util.Properties; import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.cfg.AvailableSettings; import org.hibernate.cfg.Environment; import org.hibernate.cfg.JDBCReaderFactory; +import org.hibernate.cfg.MetaDataDialectFactory; import org.hibernate.cfg.reveng.DatabaseCollector; import org.hibernate.cfg.reveng.DefaultDatabaseCollector; import org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy; import org.hibernate.cfg.reveng.JDBCReader; import org.hibernate.cfg.reveng.SchemaSelection; -import org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect; +import org.hibernate.cfg.reveng.dialect.MetaDataDialect; +import org.hibernate.dialect.Dialect; +import org.hibernate.engine.jdbc.spi.JdbcServices; import org.hibernate.mapping.Table; import org.hibernate.service.ServiceRegistry; import org.hibernate.tool.hbmlint.detector.TableSelectorStrategy; @@ -58,18 +63,8 @@ public class TestCase { private Properties properties = null; private String defaultSchema = null; private String defaultCatalog = null; + private List gottenTables = new ArrayList(); - public class MockedMetaDataDialect extends JDBCMetaDataDialect { - List gottenTables = new ArrayList(); - public Iterator> getTables(String catalog, String schema, String table) { - gottenTables.add(table); - return super.getTables( catalog, schema, table == null ? "%" : table ); - } - public Iterator> getColumns(String catalog, String schema, String table, String column) { - return super.getColumns(catalog, schema, table == null ? "%" : table, column == null ? "%" : column); - } - } - @BeforeEach public void setUp() { JdbcUtil.createDatabase(this); @@ -89,7 +84,9 @@ public void testReadSchemaIncremental() { builder.applySettings(properties); ServiceRegistry serviceRegistry = builder.build(); TableSelectorStrategy tss = new TableSelectorStrategy(new DefaultReverseEngineeringStrategy()); - MockedMetaDataDialect mockedMetaDataDialect = new MockedMetaDataDialect(); + Dialect dialect = serviceRegistry.getService(JdbcServices.class).getDialect(); + MetaDataDialect mockedMetaDataDialect = createMockedMetaDataDialect( + MetaDataDialectFactory.fromDialect(dialect)); JDBCReader reader = JDBCReaderFactory.newJDBCReader( properties, tss, mockedMetaDataDialect, serviceRegistry); tss.addSchemaSelection( new SchemaSelection(null,null, "CHILD") ); @@ -97,8 +94,8 @@ public void testReadSchemaIncremental() { DatabaseCollector dc = new DefaultDatabaseCollector(reader.getMetaDataDialect()); reader.readDatabaseSchema( dc, null, null ); - assertEquals(mockedMetaDataDialect.gottenTables.size(),1); - assertEquals(mockedMetaDataDialect.gottenTables.get(0),"CHILD"); + assertEquals(gottenTables.size(),1); + assertEquals(gottenTables.get(0),"CHILD"); Iterator
iterator = dc.iterateTables(); Table firstChild = iterator.next(); @@ -110,11 +107,11 @@ public void testReadSchemaIncremental() { tss.clearSchemaSelections(); tss.addSchemaSelection( new SchemaSelection(null, null, "MASTER") ); - mockedMetaDataDialect.gottenTables.clear(); + gottenTables.clear(); reader.readDatabaseSchema( dc, null, null ); - assertEquals(mockedMetaDataDialect.gottenTables.size(),1); - assertEquals(mockedMetaDataDialect.gottenTables.get(0),"MASTER"); + assertEquals(gottenTables.size(),1); + assertEquals(gottenTables.get(0),"MASTER"); iterator = dc.iterateTables(); @@ -147,4 +144,31 @@ public void testReadSchemaIncremental() { 0); } + private MetaDataDialect createMockedMetaDataDialect(MetaDataDialect delegate) { + return (MetaDataDialect)Proxy.newProxyInstance( + getClass().getClassLoader(), + new Class[] { MetaDataDialect.class }, + new InvocationHandler() { + @Override + public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { + if ("getTables".equals(method.getName())) { + gottenTables.add((String)args[2]); + return delegate.getTables( + (String)args[0], + (String)args[1], + args[2] == null ? "%" : (String)args[2]); + } else if ("getColumns".equals(method.getName())) { + return delegate.getColumns( + (String)args[0], + (String)args[1], + args[2] == null ? "%" : (String)args[2], + args[3] == null ? "%" : (String)args[3]); + } else { + return method.invoke(delegate, args); + + } + } + }); + } + } From 2aa917c8207518d499fcda062583d4e7783e3f28 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 4 Feb 2022 16:19:07 +0100 Subject: [PATCH 471/560] HBX-2300: Update the dependency for H2 to 2.x.x - Adapt the suggested primary key strategy SQL strings Signed-off-by: Koen Aers --- .../cfg/reveng/dialect/H2MetaDataDialect.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/main/src/main/java/org/hibernate/cfg/reveng/dialect/H2MetaDataDialect.java b/main/src/main/java/org/hibernate/cfg/reveng/dialect/H2MetaDataDialect.java index fc52df079b..729c578d5e 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/dialect/H2MetaDataDialect.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/dialect/H2MetaDataDialect.java @@ -7,7 +7,6 @@ import java.util.Iterator; import java.util.Map; -import org.hibernate.internal.util.StringHelper; import org.hibernate.tool.util.ReflectHelper; @@ -24,8 +23,7 @@ public class H2MetaDataDialect extends JDBCMetaDataDialect { " idx.TABLE_CATALOG TABLE_CAT, " + " idx.TABLE_SCHEMA TABLE_SCHEM, " + " idx.TABLE_NAME, " + - " idx.COLUMN_NAME, " + - " cols.COLUMN_DEFAULT COLUMN_DEFAULT " + + " idx.COLUMN_NAME " + "FROM " + " INFORMATION_SCHEMA.INDEXES idx, " + " INFORMATION_SCHEMA.COLUMNS cols " + @@ -34,24 +32,25 @@ public class H2MetaDataDialect extends JDBCMetaDataDialect { " idx.TABLE_SCHEMA = cols.TABLE_SCHEMA AND " + " idx.TABLE_NAME = cols.TABLE_NAME AND " + " idx.PRIMARY_KEY = TRUE AND " + - " COLUMN_DEFAULT like '%NEXT VALUE FOR%' "; + " cols.COLUMN_DEFAULT like '%NEXT VALUE FOR%' "; private static final String SPKSQ_H2_2_X = "SELECT " + " idx.TABLE_CATALOG TABLE_CAT, " + " idx.TABLE_SCHEMA TABLE_SCHEM, " + " idx.TABLE_NAME, " + - " cols.COLUMN_NAME, " + - " cols.COLUMN_DEFAULT " + + " cols.COLUMN_NAME " + "FROM " + " INFORMATION_SCHEMA.INDEXES idx, " + + " INFORMATION_SCHEMA.INDEX_COLUMNS idx_cols, " + " INFORMATION_SCHEMA.COLUMNS cols " + "WHERE " + " idx.TABLE_CATALOG = cols.TABLE_CATALOG AND " + " idx.TABLE_SCHEMA = cols.TABLE_SCHEMA AND " + " idx.TABLE_NAME = cols.TABLE_NAME AND " + " idx.INDEX_TYPE_NAME = 'PRIMARY KEY' AND " + - " cols.COLUMN_DEFAULT LIKE '%NEXT VALUE FOR%'"; + " cols.COLUMN_NAME = idx_cols.COLUMN_NAME AND " + + " cols.IS_IDENTITY = 'YES'"; private static boolean understandsCatalogName = true; @@ -121,8 +120,7 @@ public Iterator> getSuggestedPrimaryKeyStrategyName(String c protected Map convertRow(ResultSet tableRs) throws SQLException { element.clear(); putTablePart( element, tableRs ); - String string = tableRs.getString("COLUMN_DEFAULT"); - element.put("HIBERNATE_STRATEGY", StringHelper.isEmpty( string )?null:"identity"); + element.put("HIBERNATE_STRATEGY", "identity"); return element; } protected Throwable handleSQLException(SQLException e) { From 2c02a37fc1e91920286149666be379166358ead3 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 4 Feb 2022 16:54:42 +0100 Subject: [PATCH 472/560] HBX-2300: Update the dependency for H2 to 2.x.x - Use 'IDENTITY' as the type in the DB creation script for test class 'org.hibernate.tool.jdbc2cfg.Identity.TestCase' Signed-off-by: Koen Aers --- .../resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/h2/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql b/test/h2/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql index 7f6a6095ce..99a63b36da 100644 --- a/test/h2/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql +++ b/test/h2/src/test/resources/org/hibernate/tool/jdbc2cfg/Identity/create.sql @@ -1,2 +1,2 @@ -CREATE TABLE `autoinc` (`id` int(11) NOT NULL identity, `data` varchar(100) default NULL, PRIMARY KEY (`id`)) -CREATE TABLE `noautoinc` (`id` int(11) NOT NULL, `data` varchar(100) default NULL, PRIMARY KEY (`id`)) +CREATE TABLE `autoinc` (`id` IDENTITY NOT NULL, `data` varchar(100) default NULL, PRIMARY KEY (`id`)) +CREATE TABLE `noautoinc` (`id` int NOT NULL, `data` varchar(100) default NULL, PRIMARY KEY (`id`)) From c5275009897eb0b9a5cabbba32f95d89013a83b2 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 4 Feb 2022 18:58:47 +0100 Subject: [PATCH 473/560] HBX-2300: Update the dependency for H2 to 2.x.x - Create and call method 'JDBCMetaDataDialect#putTableType(...)' Signed-off-by: Koen Aers --- .../hibernate/cfg/reveng/dialect/JDBCMetaDataDialect.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main/src/main/java/org/hibernate/cfg/reveng/dialect/JDBCMetaDataDialect.java b/main/src/main/java/org/hibernate/cfg/reveng/dialect/JDBCMetaDataDialect.java index bec184a2d5..1f10c5fdcb 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/dialect/JDBCMetaDataDialect.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/dialect/JDBCMetaDataDialect.java @@ -32,7 +32,7 @@ public Iterator> getTables(String xcatalog, String xschema, S protected Map convertRow(ResultSet tableResultSet) throws SQLException { element.clear(); putTablePart( element, tableResultSet ); - element.put("TABLE_TYPE", tableResultSet.getString("TABLE_TYPE")); + putTableType(element, tableResultSet); element.put("REMARKS", tableResultSet.getString("REMARKS")); return element; } @@ -88,6 +88,10 @@ protected void putTablePart(Map element, ResultSet tableRs) thro element.put("TABLE_CAT", tableRs.getString("TABLE_CAT")); } + protected void putTableType(Map element, ResultSet tableRs) throws SQLException { + element.put("TABLE_TYPE", tableRs.getString("TABLE_TYPE")); + } + public Iterator> getColumns(final String xcatalog, final String xschema, final String xtable, String xcolumn) { try { final String catalog = caseForSearch( xcatalog ); From 5f0b668ac70f774d35733f94773e916c8b8c9a49 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sun, 6 Feb 2022 08:25:59 +0100 Subject: [PATCH 474/560] HBX-2300: Update the dependency for H2 to 2.x.x - Update dependency to version 2.0.202 and adapt class 'org.hibernate.tools.test.util.ConnectionLeakUtil' Signed-off-by: Koen Aers --- pom.xml | 2 +- .../java/org/hibernate/tools/test/util/ConnectionLeakUtil.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0859eb3741..2f355e2d27 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ 2.3.31 1.7 - 1.4.200 + 2.0.202 5.1.2.Final 5.6.4.Final 2.5.2 diff --git a/test/utils/src/main/java/org/hibernate/tools/test/util/ConnectionLeakUtil.java b/test/utils/src/main/java/org/hibernate/tools/test/util/ConnectionLeakUtil.java index 37d6200b84..1172675830 100644 --- a/test/utils/src/main/java/org/hibernate/tools/test/util/ConnectionLeakUtil.java +++ b/test/utils/src/main/java/org/hibernate/tools/test/util/ConnectionLeakUtil.java @@ -57,7 +57,7 @@ public int countConnections() { ResultSet resultSet = statement.executeQuery( "SELECT COUNT(*) " + "FROM information_schema.sessions " + - "WHERE statement IS NULL"); + "WHERE executing_statement IS NULL"); while (resultSet.next()) { result = resultSet.getInt(1); } From 6a73efe40c68eb370d78af3cb595e170dd808cfc Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 7 Feb 2022 07:10:50 +0100 Subject: [PATCH 475/560] HBX-2300: Update the dependency for H2 to 2.x.x - Update dependency to version 2.0.204 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2f355e2d27..2e8f70e772 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ 2.3.31 1.7 - 2.0.202 + 2.0.204 5.1.2.Final 5.6.4.Final 2.5.2 From 4abbb7dc2f154364a7b755026dc6d779c40abfb4 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 7 Feb 2022 08:16:08 +0100 Subject: [PATCH 476/560] HBX-2300: Update the dependency for H2 to 2.x.x - Update dependency to version 2.0.206 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2e8f70e772..9eceec23a1 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ 2.3.31 1.7 - 2.0.204 + 2.0.206 5.1.2.Final 5.6.4.Final 2.5.2 From 8367516d7702fd39edb4d8fb755a223cc6825142 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 7 Feb 2022 08:33:00 +0100 Subject: [PATCH 477/560] HBX-2300: Update the dependency for H2 to 2.x.x - Update dependency to version 2.1.210 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9eceec23a1..8241e9c481 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ 2.3.31 1.7 - 2.0.206 + 2.1.210 5.1.2.Final 5.6.4.Final 2.5.2 From 89a90798540fba86a62f729361120921620a5e45 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 8 Feb 2022 08:45:01 +0100 Subject: [PATCH 478/560] HBX-2296: Update Hibernate ORM Dependency to Version 5.6.5.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8241e9c481..d407a9421c 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ 1.7 2.1.210 5.1.2.Final - 5.6.4.Final + 5.6.5.Final 2.5.2 8.0.1 2.2 From c810fee05b94d2bd5afc4f6951154bcc6959d9e8 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 8 Feb 2022 09:01:20 +0100 Subject: [PATCH 479/560] HBX-2294: Update version identifier to 5.6.5.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index fb0750f221..431149b102 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.5-SNAPSHOT + 5.6.5.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 6561a4974b..a18a111eb0 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.5-SNAPSHOT"; + public static final String VERSION = "5.6.5.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 10c4ec471b..adef95ed66 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.5-SNAPSHOT + 5.6.5.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index d407a9421c..f23f4dd7f1 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.5-SNAPSHOT + 5.6.5.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 62b0c4c436..5bb67f8a72 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.5-SNAPSHOT + 5.6.5.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index d3296cbcd8..ca803c3bf1 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.5-SNAPSHOT + 5.6.5.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index b3a43fe267..1cfcd73f65 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.5-SNAPSHOT + 5.6.5.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index c5789918bb..0732c63409 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.5-SNAPSHOT + 5.6.5.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 1e558a0059..26c7639809 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.5-SNAPSHOT + 5.6.5.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 864e92d40e..db0d2932c3 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.5-SNAPSHOT + 5.6.5.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index e10bfb1360..f0157054b1 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.5-SNAPSHOT + 5.6.5.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index bb525b3a34..1a5ee49a07 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.5-SNAPSHOT + 5.6.5.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 0d09c6244e..234afcfe2e 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.5-SNAPSHOT + 5.6.5.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index c8b9ec4898..6900b47f4c 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.5-SNAPSHOT + 5.6.5.Final hibernate-tools-tests-utils From 431fe0af59d8cce0a41dd458035a5f22ac699199 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 8 Feb 2022 09:33:20 +0100 Subject: [PATCH 480/560] HBX-2301: Update version identifier to 5.6.6-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 431149b102..64489b8a3f 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.5.Final + 5.6.6-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index a18a111eb0..226c4f1ca3 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.5.Final"; + public static final String VERSION = "5.6.6-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index adef95ed66..6e40605d82 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.5.Final + 5.6.6-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index f23f4dd7f1..e886b16513 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.5.Final + 5.6.6-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 5bb67f8a72..49d47036fc 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.5.Final + 5.6.6-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index ca803c3bf1..9c4b5e4267 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.5.Final + 5.6.6-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 1cfcd73f65..a92068c1cd 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.5.Final + 5.6.6-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 0732c63409..b18c899c44 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.5.Final + 5.6.6-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 26c7639809..9b3e07d09b 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.5.Final + 5.6.6-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index db0d2932c3..20f9b00e09 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.5.Final + 5.6.6-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index f0157054b1..578889d677 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.5.Final + 5.6.6-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 1a5ee49a07..f9e1b5d8d1 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.5.Final + 5.6.6-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 234afcfe2e..92b72cb289 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.5.Final + 5.6.6-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 6900b47f4c..0f243dd7c5 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.5.Final + 5.6.6-SNAPSHOT hibernate-tools-tests-utils From 5f9d965d4c6c12f48ed35686642dfd16786b7c90 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sat, 19 Mar 2022 12:29:44 +0100 Subject: [PATCH 481/560] HBX-2302: Update Hibernate ORM Dependency to Version 5.6.6.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e886b16513..f7e4b8001a 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ 1.7 2.1.210 5.1.2.Final - 5.6.5.Final + 5.6.6.Final 2.5.2 8.0.1 2.2 From 23ae3881e0e900b10fe1162e06b5da9d83b52155 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sun, 20 Mar 2022 15:43:05 +0100 Subject: [PATCH 482/560] HBX-2326: Update version identifier to 5.6.6.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 64489b8a3f..1d7b0e27f1 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.6-SNAPSHOT + 5.6.6.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 226c4f1ca3..77fe581f3e 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.6-SNAPSHOT"; + public static final String VERSION = "5.6.6.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 6e40605d82..31cf2e8dd8 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.6-SNAPSHOT + 5.6.6.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index f7e4b8001a..8c1574d28a 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.6-SNAPSHOT + 5.6.6.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 49d47036fc..fb9899564d 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.6-SNAPSHOT + 5.6.6.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 9c4b5e4267..4708a68955 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.6-SNAPSHOT + 5.6.6.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index a92068c1cd..4b1c716f16 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.6-SNAPSHOT + 5.6.6.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index b18c899c44..618230b9cd 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.6-SNAPSHOT + 5.6.6.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 9b3e07d09b..c5fd83e05c 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.6-SNAPSHOT + 5.6.6.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 20f9b00e09..8341699e1c 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.6-SNAPSHOT + 5.6.6.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 578889d677..aaf42c3dae 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.6-SNAPSHOT + 5.6.6.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index f9e1b5d8d1..5021b8a87e 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.6-SNAPSHOT + 5.6.6.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 92b72cb289..3d6f8c66f3 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.6-SNAPSHOT + 5.6.6.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 0f243dd7c5..88a347c3b4 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.6-SNAPSHOT + 5.6.6.Final hibernate-tools-tests-utils From a36e892465730cd401e7530acaef1a8ddde3a80a Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 21 Mar 2022 14:37:29 +0100 Subject: [PATCH 483/560] HBX-2327: Update version identifier to 5.6.7-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 1d7b0e27f1..ff1612d9e8 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.6.Final + 5.6.7-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 77fe581f3e..5e1f7a729b 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.6.Final"; + public static final String VERSION = "5.6.7-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 31cf2e8dd8..9d00bbdc44 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.6.Final + 5.6.7-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 8c1574d28a..9f3427c81a 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.6.Final + 5.6.7-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index fb9899564d..9037052cd5 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.6.Final + 5.6.7-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 4708a68955..fad7bdeba0 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.6.Final + 5.6.7-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 4b1c716f16..c107f8ae70 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.6.Final + 5.6.7-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 618230b9cd..cd8216f1f8 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.6.Final + 5.6.7-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index c5fd83e05c..ed49c46e53 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.6.Final + 5.6.7-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 8341699e1c..2b20c250b2 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.6.Final + 5.6.7-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index aaf42c3dae..9f88f0fc65 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.6.Final + 5.6.7-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 5021b8a87e..72b22211ed 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.6.Final + 5.6.7-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 3d6f8c66f3..532f512869 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.6.Final + 5.6.7-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 88a347c3b4..2305008d4b 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.6.Final + 5.6.7-SNAPSHOT hibernate-tools-tests-utils From 9fdbf42722b51bb490e68013f5803c449ffc7d8f Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 22 Mar 2022 12:46:23 +0100 Subject: [PATCH 484/560] HBX-2331: Replace deprecated API calls - Replace 'OneToOne(MetadataImplementor,Table,PersistentClass)' in 'org.hibernate.cfg.JDBCBinder' Signed-off-by: Koen Aers --- main/src/main/java/org/hibernate/cfg/JDBCBinder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/src/main/java/org/hibernate/cfg/JDBCBinder.java b/main/src/main/java/org/hibernate/cfg/JDBCBinder.java index 04066d084f..febf3584aa 100644 --- a/main/src/main/java/org/hibernate/cfg/JDBCBinder.java +++ b/main/src/main/java/org/hibernate/cfg/JDBCBinder.java @@ -72,6 +72,7 @@ public class JDBCBinder { private final MetadataBuildingContext mdbc; + private final InFlightMetadataCollector metadataCollector; private Metadata metadata; @@ -278,7 +279,7 @@ private void bindIncomingForeignKeys(PersistentClass rc, Set processed, private Property bindOneToOne(PersistentClass rc, Table targetTable, ForeignKey fk, Set processedColumns, boolean constrained, boolean inverseProperty) { - OneToOne value = new OneToOne((MetadataImplementor)metadata, targetTable, rc); + OneToOne value = new OneToOne(mdbc, targetTable, rc); value.setReferencedEntityName(revengStrategy .tableToClassName(TableIdentifier.create(targetTable))); From a497862e96386cdfa68f89ee4f55a4f3699d0bb4 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 22 Mar 2022 14:34:42 +0100 Subject: [PATCH 485/560] HBX-2331: Replace deprecated API calls - Replace 'ManyToOne(MetadataImplementor,Table)' in 'org.hibernate.cfg.JDBCBinder' Signed-off-by: Koen Aers --- main/src/main/java/org/hibernate/cfg/JDBCBinder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/src/main/java/org/hibernate/cfg/JDBCBinder.java b/main/src/main/java/org/hibernate/cfg/JDBCBinder.java index febf3584aa..05843768d8 100644 --- a/main/src/main/java/org/hibernate/cfg/JDBCBinder.java +++ b/main/src/main/java/org/hibernate/cfg/JDBCBinder.java @@ -334,7 +334,7 @@ private Property bindOneToOne(PersistentClass rc, Table targetTable, * @param propName */ private Property bindManyToOne(String propertyName, boolean mutable, Table table, ForeignKey fk, Set processedColumns) { - ManyToOne value = new ManyToOne((MetadataImplementor)metadata, table); + ManyToOne value = new ManyToOne(mdbc, table); value.setReferencedEntityName( fk.getReferencedEntityName() ); Iterator columns = fk.getColumnIterator(); while ( columns.hasNext() ) { From 6810facdd0e8582a64d67d8fa2d6ac174a78ad1f Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 22 Mar 2022 14:47:16 +0100 Subject: [PATCH 486/560] HBX-2331: Replace deprecated API calls - Replace 'org.hibernate.mapping.Set(MetadataImplementor,PersistentClass)' in 'org.hibernate.cfg.JDBCBinder' Signed-off-by: Koen Aers --- main/src/main/java/org/hibernate/cfg/JDBCBinder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/src/main/java/org/hibernate/cfg/JDBCBinder.java b/main/src/main/java/org/hibernate/cfg/JDBCBinder.java index 05843768d8..81b74b2361 100644 --- a/main/src/main/java/org/hibernate/cfg/JDBCBinder.java +++ b/main/src/main/java/org/hibernate/cfg/JDBCBinder.java @@ -454,7 +454,7 @@ private Property bindOneToMany(PersistentClass rc, ForeignKey foreignKey, Set Date: Tue, 22 Mar 2022 14:56:37 +0100 Subject: [PATCH 487/560] HBX-2331: Replace deprecated API calls - Replace 'ManyToOne(MetadataImplementor,Table)' in 'org.hibernate.cfg.JDBCBinder' (part 2) Signed-off-by: Koen Aers --- main/src/main/java/org/hibernate/cfg/JDBCBinder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/src/main/java/org/hibernate/cfg/JDBCBinder.java b/main/src/main/java/org/hibernate/cfg/JDBCBinder.java index 81b74b2361..9e205a42a3 100644 --- a/main/src/main/java/org/hibernate/cfg/JDBCBinder.java +++ b/main/src/main/java/org/hibernate/cfg/JDBCBinder.java @@ -470,7 +470,7 @@ private Property bindOneToMany(PersistentClass rc, ForeignKey foreignKey, Set foreignKeyIterator = foreignKey.getTable().getForeignKeyIterator(); List keys = new ArrayList(); From 17e80c1100d8ffce5152ac97a302ef8548dd8d8c Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 22 Mar 2022 15:15:05 +0100 Subject: [PATCH 488/560] HBX-2331: Replace deprecated API calls - Replace 'OneToMany(MetadataImplementor,Table)' in 'org.hibernate.cfg.JDBCBinder' Signed-off-by: Koen Aers --- main/src/main/java/org/hibernate/cfg/JDBCBinder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/src/main/java/org/hibernate/cfg/JDBCBinder.java b/main/src/main/java/org/hibernate/cfg/JDBCBinder.java index 9e205a42a3..16a09d112f 100644 --- a/main/src/main/java/org/hibernate/cfg/JDBCBinder.java +++ b/main/src/main/java/org/hibernate/cfg/JDBCBinder.java @@ -503,7 +503,7 @@ private Property bindOneToMany(PersistentClass rc, ForeignKey foreignKey, Set Date: Wed, 23 Mar 2022 16:12:18 +0100 Subject: [PATCH 489/560] HBX-2331: Replace deprecated API calls - Remove references to 'org.hibernate.stat.SecondLevelCacheStatistics' from 'org.hibernate.tool.stat.StatisticsTreeModel' Signed-off-by: Koen Aers --- .../tool/stat/StatisticsTreeModel.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/main/src/main/java/org/hibernate/tool/stat/StatisticsTreeModel.java b/main/src/main/java/org/hibernate/tool/stat/StatisticsTreeModel.java index 542fabb709..957f576b8e 100644 --- a/main/src/main/java/org/hibernate/tool/stat/StatisticsTreeModel.java +++ b/main/src/main/java/org/hibernate/tool/stat/StatisticsTreeModel.java @@ -1,10 +1,11 @@ package org.hibernate.tool.stat; +import java.util.Collections; import java.util.Map; -import org.hibernate.stat.SecondLevelCacheStatistics; -import org.hibernate.stat.Statistics; import org.hibernate.internal.util.collections.IdentityMap; +import org.hibernate.stat.CacheRegionStatistics; +import org.hibernate.stat.Statistics; public class StatisticsTreeModel extends AbstractTreeModel { @@ -36,10 +37,9 @@ public Object getChild(Object parent, int index) { } else if(parent==queries) { return stats.getQueryStatistics(stats.getQueries()[index]); } else if(parent==secondlevelcache) { - return stats.getSecondLevelCacheStatistics( stats.getSecondLevelCacheRegionNames()[index]); - } else if(parent instanceof SecondLevelCacheStatistics) { - SecondLevelCacheStatistics slcs = (SecondLevelCacheStatistics) parent; - return slcs.getEntries(); + return stats.getCacheRegionStatistics(stats.getSecondLevelCacheRegionNames()[index]); + } else if (parent instanceof CacheRegionStatistics) { + return Collections.emptyMap(); } return null; } @@ -55,9 +55,8 @@ public int getChildCount(Object parent) { return stats.getQueries().length; } else if(parent==secondlevelcache) { return stats.getSecondLevelCacheRegionNames().length; - } else if(parent instanceof SecondLevelCacheStatistics) { - /*SecondLevelCacheStatistics stats = (SecondLevelCacheStatistics) parent; - return stats.getEntries().size();*/ + } else if(parent instanceof CacheRegionStatistics) { + return 0; } return 0; } From c0c55ce77ef620d45c10051390c296d9215ed20f Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 24 Mar 2022 11:55:57 +0100 Subject: [PATCH 490/560] HBX-2331: Replace deprecated API calls - Remove references to 'org.hibernate.id.SequenceGenerator' from 'org.hibernate.tool.hbmlint.detector.SchemaByMetaDataDetector' Signed-off-by: Koen Aers --- .../detector/SchemaByMetaDataDetector.java | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java b/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java index cb7bcd7689..1c83c04643 100644 --- a/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java +++ b/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java @@ -11,7 +11,6 @@ import org.hibernate.HibernateException; import org.hibernate.MappingException; import org.hibernate.boot.Metadata; -import org.hibernate.boot.model.relational.QualifiedName; import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.cfg.AvailableSettings; import org.hibernate.cfg.Environment; @@ -28,7 +27,6 @@ import org.hibernate.id.IdentifierGenerator; import org.hibernate.id.MultipleHiLoPerTableGenerator; import org.hibernate.id.PersistentIdentifierGenerator; -import org.hibernate.id.SequenceGenerator; import org.hibernate.id.enhanced.SequenceStyleGenerator; import org.hibernate.id.enhanced.TableGenerator; import org.hibernate.internal.util.StringHelper; @@ -284,8 +282,6 @@ private String getGeneratorKey(PersistentIdentifierGenerator ig) { String result = null; if (ig instanceof MultipleHiLoPerTableGenerator) { result = getKeyForMultipleHiloPerTableGenerator((MultipleHiLoPerTableGenerator)ig); - } else if (ig instanceof SequenceGenerator) { - result = getKeyForSequenceGenerator((SequenceGenerator)ig); } else if (ig instanceof SequenceStyleGenerator) { result = getKeyForSequenceStyleGenerator((SequenceStyleGenerator)ig); } else if (ig instanceof TableGenerator) { @@ -306,19 +302,6 @@ private String getKeyForMultipleHiloPerTableGenerator(MultipleHiLoPerTableGenera return result; } - private String getKeyForSequenceGenerator(SequenceGenerator ig) { - String result = null; - try { - Field field = SequenceGenerator.class.getDeclaredField("logicalQualifiedSequenceName"); - field.setAccessible(true); - QualifiedName name = (QualifiedName)field.get(ig); - result = name.render(); - } catch (Throwable t) { - throw new RuntimeException(t); - } - return result; - } - private String getKeyForSequenceStyleGenerator(SequenceStyleGenerator ig) { return ig.getDatabaseStructure().getPhysicalName().render(); } From fee282c01316f6bb2c81217d6c7964a9213d0b91 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 24 Mar 2022 16:03:07 +0100 Subject: [PATCH 491/560] HBX-2331: Replace deprecated API calls - Remove references to 'org.hibernate.id.MultipleHiLoPerTableGenerator' from 'org.hibernate.tool.hbmlint.detector.SchemaByMetaDataDetector' Signed-off-by: Koen Aers --- .../detector/SchemaByMetaDataDetector.java | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java b/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java index 1c83c04643..51ede23d52 100644 --- a/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java +++ b/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java @@ -1,6 +1,5 @@ package org.hibernate.tool.hbmlint.detector; -import java.lang.reflect.Field; import java.util.Collections; import java.util.Iterator; import java.util.List; @@ -25,7 +24,6 @@ import org.hibernate.engine.jdbc.spi.JdbcServices; import org.hibernate.engine.spi.Mapping; import org.hibernate.id.IdentifierGenerator; -import org.hibernate.id.MultipleHiLoPerTableGenerator; import org.hibernate.id.PersistentIdentifierGenerator; import org.hibernate.id.enhanced.SequenceStyleGenerator; import org.hibernate.id.enhanced.TableGenerator; @@ -280,9 +278,7 @@ private Iterator iterateGenerators() throws MappingExceptio private String getGeneratorKey(PersistentIdentifierGenerator ig) { String result = null; - if (ig instanceof MultipleHiLoPerTableGenerator) { - result = getKeyForMultipleHiloPerTableGenerator((MultipleHiLoPerTableGenerator)ig); - } else if (ig instanceof SequenceStyleGenerator) { + if (ig instanceof SequenceStyleGenerator) { result = getKeyForSequenceStyleGenerator((SequenceStyleGenerator)ig); } else if (ig instanceof TableGenerator) { result = getKeyForTableGenerator((TableGenerator)ig); @@ -290,18 +286,6 @@ private String getGeneratorKey(PersistentIdentifierGenerator ig) { return result; } - private String getKeyForMultipleHiloPerTableGenerator(MultipleHiLoPerTableGenerator ig) { - String result = null; - try { - Field field = MultipleHiLoPerTableGenerator.class.getDeclaredField("tableName"); - field.setAccessible(true); - result = (String)field.get(ig); - } catch (Throwable t) { - throw new RuntimeException(t); - } - return result; - } - private String getKeyForSequenceStyleGenerator(SequenceStyleGenerator ig) { return ig.getDatabaseStructure().getPhysicalName().render(); } From 56d6c5d59040ab110ff694ca0b9154184804b02b Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 24 Mar 2022 16:34:08 +0100 Subject: [PATCH 492/560] HBX-2331: Replace deprecated API calls - Suppress deprecation warning for 'Mapping#getIdentifierGeneratorFactory()' in 'org.hibernate.tool.hbmlint.detector.SchemaByMetaDataDetector' Signed-off-by: Koen Aers --- .../hbmlint/detector/SchemaByMetaDataDetector.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java b/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java index 51ede23d52..5cef673395 100644 --- a/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java +++ b/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java @@ -10,6 +10,7 @@ import org.hibernate.HibernateException; import org.hibernate.MappingException; import org.hibernate.boot.Metadata; +import org.hibernate.boot.internal.MetadataImpl; import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.cfg.AvailableSettings; import org.hibernate.cfg.Environment; @@ -27,6 +28,7 @@ import org.hibernate.id.PersistentIdentifierGenerator; import org.hibernate.id.enhanced.SequenceStyleGenerator; import org.hibernate.id.enhanced.TableGenerator; +import org.hibernate.id.factory.IdentifierGeneratorFactory; import org.hibernate.internal.util.StringHelper; import org.hibernate.mapping.Collection; import org.hibernate.mapping.Column; @@ -237,7 +239,7 @@ private Iterator iterateGenerators() throws MappingExceptio IdentifierGenerator ig = pc.getIdentifier() .createIdentifierGenerator( - getMetadata().getIdentifierGeneratorFactory(), + getIdentifierGeneratorFactory(), dialect, defaultCatalog, defaultSchema, @@ -259,7 +261,7 @@ private Iterator iterateGenerators() throws MappingExceptio IdentifierGenerator ig = ( (IdentifierCollection) collection ).getIdentifier() .createIdentifierGenerator( - getMetadata().getIdentifierGeneratorFactory(), + getIdentifierGeneratorFactory(), dialect, defaultCatalog, defaultSchema, @@ -276,6 +278,11 @@ private Iterator iterateGenerators() throws MappingExceptio return generators.values().iterator(); } + @SuppressWarnings("deprecation") + private IdentifierGeneratorFactory getIdentifierGeneratorFactory() { + return ((Mapping)getMetadata()).getIdentifierGeneratorFactory(); + } + private String getGeneratorKey(PersistentIdentifierGenerator ig) { String result = null; if (ig instanceof SequenceStyleGenerator) { From 5890783c0d6681128b4e5ef46530e9148c2a7272 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 24 Mar 2022 16:50:45 +0100 Subject: [PATCH 493/560] HBX-2331: Replace deprecated API calls - Use 'KeyValue#createIdentifierGenerator(IdentifierGeneratorFactory,Dialect,RootClass)' in 'org.hibernate.tool.hbmlint.detector.SchemaByMetaDataDetector' Signed-off-by: Koen Aers --- .../hbmlint/detector/SchemaByMetaDataDetector.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java b/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java index 5cef673395..a1eee037a5 100644 --- a/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java +++ b/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java @@ -3,16 +3,13 @@ import java.util.Collections; import java.util.Iterator; import java.util.List; -import java.util.Properties; import java.util.Set; import java.util.TreeMap; import org.hibernate.HibernateException; import org.hibernate.MappingException; import org.hibernate.boot.Metadata; -import org.hibernate.boot.internal.MetadataImpl; import org.hibernate.boot.registry.StandardServiceRegistryBuilder; -import org.hibernate.cfg.AvailableSettings; import org.hibernate.cfg.Environment; import org.hibernate.cfg.JDBCReaderFactory; import org.hibernate.cfg.reveng.DatabaseCollector; @@ -226,10 +223,6 @@ private Iterator iterateGenerators() throws MappingExceptio TreeMap generators = new TreeMap(); - StandardServiceRegistryBuilder builder = new StandardServiceRegistryBuilder(); - Properties properties = (Properties)builder.getSettings(); - String defaultCatalog = properties.getProperty(AvailableSettings.DEFAULT_CATALOG); - String defaultSchema = properties.getProperty(AvailableSettings.DEFAULT_SCHEMA); Iterator persistentClassIterator = getMetadata().getEntityBindings().iterator(); while ( persistentClassIterator.hasNext() ) { @@ -241,8 +234,6 @@ private Iterator iterateGenerators() throws MappingExceptio .createIdentifierGenerator( getIdentifierGeneratorFactory(), dialect, - defaultCatalog, - defaultSchema, (RootClass) pc ); @@ -263,8 +254,6 @@ private Iterator iterateGenerators() throws MappingExceptio .createIdentifierGenerator( getIdentifierGeneratorFactory(), dialect, - defaultCatalog, - defaultSchema, null ); From a0b84df12c02209c051180bdba7b96be4a1438f8 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 24 Mar 2022 17:06:00 +0100 Subject: [PATCH 494/560] HBX-2331: Replace deprecated API calls - Remove reference to 'Environment#getBytecodeProvider()' from 'org.hibernate.tool.hbmlint.detector.InstrumentationDetector' Signed-off-by: Koen Aers --- .../tool/hbmlint/detector/InstrumentationDetector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/src/main/java/org/hibernate/tool/hbmlint/detector/InstrumentationDetector.java b/main/src/main/java/org/hibernate/tool/hbmlint/detector/InstrumentationDetector.java index 48de1b2aaa..3286375247 100644 --- a/main/src/main/java/org/hibernate/tool/hbmlint/detector/InstrumentationDetector.java +++ b/main/src/main/java/org/hibernate/tool/hbmlint/detector/InstrumentationDetector.java @@ -20,7 +20,7 @@ public String getName() { public void initialize(Metadata metadata) { super.initialize(metadata); - BytecodeProvider bytecodeProvider = Environment.getBytecodeProvider(); + BytecodeProvider bytecodeProvider = Environment.buildBytecodeProvider(Environment.getProperties()); if(bytecodeProvider instanceof org.hibernate.bytecode.internal.bytebuddy.BytecodeProviderImpl) { enhanceEnabled = true; } From 23442410f717ee376d25fca00b89835c26be8268 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 24 Mar 2022 17:18:32 +0100 Subject: [PATCH 495/560] HBX-2331: Replace deprecated API calls - Remove use of 'org.hibernate.type.TypeResolver' from 'org.hibernate.tool.hbm2x.Cfg2JavaTool' Signed-off-by: Koen Aers --- .../org/hibernate/tool/hbm2x/Cfg2JavaTool.java | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/main/src/main/java/org/hibernate/tool/hbm2x/Cfg2JavaTool.java b/main/src/main/java/org/hibernate/tool/hbm2x/Cfg2JavaTool.java index 0213073601..b75a57e2e0 100644 --- a/main/src/main/java/org/hibernate/tool/hbm2x/Cfg2JavaTool.java +++ b/main/src/main/java/org/hibernate/tool/hbm2x/Cfg2JavaTool.java @@ -31,9 +31,7 @@ import org.hibernate.tool.hbm2x.pojo.POJOClass; import org.hibernate.tool.hbm2x.visitor.JavaTypeFromValueVisitor; import org.hibernate.type.BasicTypeRegistry; -import org.hibernate.type.PrimitiveType; import org.hibernate.type.Type; -import org.hibernate.type.TypeResolver; import org.hibernate.type.spi.TypeConfiguration; import org.jboss.logging.Logger; @@ -337,14 +335,15 @@ public String asArgumentList(List fields) { public String asFinderArgumentList(Map parameterTypes, ImportContext ctx) { StringBuffer buf = new StringBuffer(); Iterator> iter = parameterTypes.entrySet().iterator(); - TypeResolver typeResolver = new TypeConfiguration().getTypeResolver(); while ( iter.hasNext() ) { Entry entry = iter.next(); String typename = null; Type type = null; if(entry.getValue() instanceof String) { try { - type = typeResolver.heuristicType((String) entry.getValue()); + type = new TypeConfiguration() + .getBasicTypeRegistry() + .getRegisteredType((String) entry.getValue()); } catch(Throwable t) { type = null; typename = (String) entry.getValue(); @@ -352,14 +351,7 @@ public String asFinderArgumentList(Map parameterTypes, ImportCont } if(type!=null) { - Class typeClass; - if ( type instanceof PrimitiveType ) { - typeClass = ( (PrimitiveType) type ).getPrimitiveClass(); - } - else { - typeClass = type.getReturnedClass(); - } - typename = typeClass.getName(); + typename = type.getReturnedClass().getName(); } buf.append( ctx.importType( typename )) .append( " " ) From 3a8bf136033b6920896bbfcea697182ff6565046 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 25 Mar 2022 13:50:39 +0100 Subject: [PATCH 496/560] HBX-2331: Replace deprecated API calls - Remove use of 'TypeResolver#heuristicType(String)' from 'org.hibernate.cfg.JDBCBinder' Signed-off-by: Koen Aers --- main/src/main/java/org/hibernate/cfg/JDBCBinder.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main/src/main/java/org/hibernate/cfg/JDBCBinder.java b/main/src/main/java/org/hibernate/cfg/JDBCBinder.java index 16a09d112f..50afb4799b 100644 --- a/main/src/main/java/org/hibernate/cfg/JDBCBinder.java +++ b/main/src/main/java/org/hibernate/cfg/JDBCBinder.java @@ -904,7 +904,10 @@ private String guessAndAlignType(Table table, Column column, Mapping mapping, bo column.getLength(), column.getPrecision(), column.getScale(), column.isNullable(), generatedIdentifier ); - Type wantedType = metadataCollector.getTypeResolver().heuristicType(preferredHibernateType); + Type wantedType = metadataCollector + .getTypeConfiguration() + .getBasicTypeRegistry() + .getRegisteredType(preferredHibernateType); if(wantedType!=null) { int[] wantedSqlTypes = wantedType.sqlTypes(mapping); From 3bc25103ce5b3b8267263f75f4b1e39231c6e778 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sat, 26 Mar 2022 13:48:11 +0100 Subject: [PATCH 497/560] HBX-2331: Replace deprecated API calls - Suppress 'serial' warning in 'org.hibernate.tool.ant.Query.SerializableResult' Signed-off-by: Koen Aers --- .../java/org/hibernate/tool/ant/Query/SerializableResult.java | 1 + 1 file changed, 1 insertion(+) diff --git a/test/common/src/main/java/org/hibernate/tool/ant/Query/SerializableResult.java b/test/common/src/main/java/org/hibernate/tool/ant/Query/SerializableResult.java index e5c1b2a15f..9361ae14ca 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/Query/SerializableResult.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/Query/SerializableResult.java @@ -21,6 +21,7 @@ import java.io.Serializable; +@SuppressWarnings("serial") public class SerializableResult implements Serializable { public String id; From f930445f7fdb81999a9ea8dd9a68f5ee98ec1b5e Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sun, 27 Mar 2022 11:49:21 +0200 Subject: [PATCH 498/560] HBX-2331: Replace deprecated API calls - Remove unused import 'org.junit.jupiter.api.Disabled' from 'org.hibernate.tool.jdbc2cfg.Identity.TestCase' Signed-off-by: Koen Aers --- .../src/main/java/org/hibernate/tool/ant/Query/TestCase.java | 1 - .../test/java/org/hibernate/tool/jdbc2cfg/Identity/TestCase.java | 1 - 2 files changed, 2 deletions(-) diff --git a/test/common/src/main/java/org/hibernate/tool/ant/Query/TestCase.java b/test/common/src/main/java/org/hibernate/tool/ant/Query/TestCase.java index 527d0548da..bd08591034 100644 --- a/test/common/src/main/java/org/hibernate/tool/ant/Query/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/ant/Query/TestCase.java @@ -31,7 +31,6 @@ import org.hibernate.tools.test.util.ResourceUtil; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; diff --git a/test/oracle/src/test/java/org/hibernate/tool/jdbc2cfg/Identity/TestCase.java b/test/oracle/src/test/java/org/hibernate/tool/jdbc2cfg/Identity/TestCase.java index e10e57365d..c7b805bcb3 100644 --- a/test/oracle/src/test/java/org/hibernate/tool/jdbc2cfg/Identity/TestCase.java +++ b/test/oracle/src/test/java/org/hibernate/tool/jdbc2cfg/Identity/TestCase.java @@ -31,7 +31,6 @@ import org.hibernate.tools.test.util.JdbcUtil; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; /** From 36f8115a5738db280d4d86132266ab4d219a45c7 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 28 Mar 2022 12:55:32 +0200 Subject: [PATCH 499/560] HBX-2331: Replace deprecated API calls - Use constructors with 'MetadataBuildingContext' instead of 'MetadataImplementor' inn 'org.hibernate.cfg.JDBCBinder' Signed-off-by: Koen Aers --- main/src/main/java/org/hibernate/cfg/JDBCBinder.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/main/src/main/java/org/hibernate/cfg/JDBCBinder.java b/main/src/main/java/org/hibernate/cfg/JDBCBinder.java index 50afb4799b..1cdf89f0f9 100644 --- a/main/src/main/java/org/hibernate/cfg/JDBCBinder.java +++ b/main/src/main/java/org/hibernate/cfg/JDBCBinder.java @@ -22,7 +22,6 @@ import org.hibernate.boot.internal.InFlightMetadataCollectorImpl; import org.hibernate.boot.spi.InFlightMetadataCollector; import org.hibernate.boot.spi.MetadataBuildingContext; -import org.hibernate.boot.spi.MetadataImplementor; import org.hibernate.cfg.binder.BinderUtils; import org.hibernate.cfg.binder.PrimaryKeyInfo; import org.hibernate.cfg.binder.PropertyBinder; @@ -522,7 +521,7 @@ private Property bindOneToMany(PersistentClass rc, ForeignKey foreignKey, Set columnIterator = foreignKey.getColumnIterator(); @@ -852,7 +851,7 @@ private Property bindBasicProperty(String propertyName, Table table, Column colu } private SimpleValue bindColumnToSimpleValue(Table table, Column column, Mapping mapping, boolean generatedIdentifier) { - SimpleValue value = new SimpleValue((MetadataImplementor)metadata, table); + SimpleValue value = new SimpleValue(mdbc, table); value.addColumn(column); value.setTypeName(guessAndAlignType(table, column, mapping, generatedIdentifier)); return value; @@ -947,7 +946,7 @@ private String typeCodeName(int sqlTypeCode) { * @return */ private SimpleValue handleCompositeKey(RootClass rc, Set processedColumns, List keyColumns, Mapping mapping) { - Component pkc = new Component((MetadataImplementor)metadata, rc); + Component pkc = new Component(mdbc, rc); pkc.setMetaAttributes(Collections.EMPTY_MAP); pkc.setEmbedded(false); From 30c66990e0209e1fdd1511d70d6b56483d8e2bcc Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 29 Mar 2022 14:15:09 +0200 Subject: [PATCH 500/560] HBX-2328: Update version identifier to 5.6.7.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index ff1612d9e8..dc3b4f96c4 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.7-SNAPSHOT + 5.6.7.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 5e1f7a729b..8aac431531 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.7-SNAPSHOT"; + public static final String VERSION = "5.6.7.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 9d00bbdc44..17cbac1724 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.7-SNAPSHOT + 5.6.7.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 9f3427c81a..dadc7a071a 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.7-SNAPSHOT + 5.6.7.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 9037052cd5..ad391a85d3 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.7-SNAPSHOT + 5.6.7.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index fad7bdeba0..2b9c5599aa 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.7-SNAPSHOT + 5.6.7.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index c107f8ae70..449b5ee96e 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.7-SNAPSHOT + 5.6.7.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index cd8216f1f8..9cfc4166be 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.7-SNAPSHOT + 5.6.7.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index ed49c46e53..15886dda24 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.7-SNAPSHOT + 5.6.7.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 2b20c250b2..3e48b3c045 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.7-SNAPSHOT + 5.6.7.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 9f88f0fc65..19f9a7dfbf 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.7-SNAPSHOT + 5.6.7.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 72b22211ed..a5315e8e00 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.7-SNAPSHOT + 5.6.7.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 532f512869..7121189701 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.7-SNAPSHOT + 5.6.7.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 2305008d4b..83b1e60b90 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.7-SNAPSHOT + 5.6.7.Final hibernate-tools-tests-utils From 8f244d8b6848b38c2651153f4d0784cde652214a Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 31 Mar 2022 12:52:50 +0200 Subject: [PATCH 501/560] HBX-2333: Update version identifier to 5.6.8-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index dc3b4f96c4..6ee292aa2a 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.7.Final + 5.6.8-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 8aac431531..8a904fa605 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.7.Final"; + public static final String VERSION = "5.6.8-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 17cbac1724..d1ae214395 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.7.Final + 5.6.8-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index dadc7a071a..439c821eca 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.7.Final + 5.6.8-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index ad391a85d3..7310d64420 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.7.Final + 5.6.8-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 2b9c5599aa..d9078fbca6 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.7.Final + 5.6.8-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 449b5ee96e..3459d7d5da 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.7.Final + 5.6.8-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 9cfc4166be..af0c7653c8 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.7.Final + 5.6.8-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 15886dda24..7390796966 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.7.Final + 5.6.8-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 3e48b3c045..14565e66ac 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.7.Final + 5.6.8-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 19f9a7dfbf..f059beb288 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.7.Final + 5.6.8-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index a5315e8e00..add84e67eb 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.7.Final + 5.6.8-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 7121189701..b6e66e9148 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.7.Final + 5.6.8-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 83b1e60b90..b844b46df6 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.7.Final + 5.6.8-SNAPSHOT hibernate-tools-tests-utils From 9539af7b0d724ceccb7d951a10b5f6661170a616 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 20 Apr 2022 16:06:52 +0200 Subject: [PATCH 502/560] HBX-2346: Update Hibernate ORM Dependency to Version 5.6.8.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 439c821eca..a8d2448673 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ 1.7 2.1.210 5.1.2.Final - 5.6.6.Final + 5.6.8.Final 2.5.2 8.0.1 2.2 From dca52302951e4e85a9525a40629bc53422ccd715 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 22 Apr 2022 09:45:32 +0200 Subject: [PATCH 503/560] HBX-2334: Update version identifier to 5.6.8.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 6ee292aa2a..424d297504 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.8-SNAPSHOT + 5.6.8.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 8a904fa605..34a88a1804 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.8-SNAPSHOT"; + public static final String VERSION = "5.6.8.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index d1ae214395..dd37ebcfa7 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.8-SNAPSHOT + 5.6.8.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index a8d2448673..6251883aa8 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.8-SNAPSHOT + 5.6.8.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 7310d64420..76eb359890 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.8-SNAPSHOT + 5.6.8.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index d9078fbca6..81c2de3e0a 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.8-SNAPSHOT + 5.6.8.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 3459d7d5da..d3140226c4 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.8-SNAPSHOT + 5.6.8.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index af0c7653c8..2e38c600b5 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.8-SNAPSHOT + 5.6.8.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 7390796966..8ac20a68a9 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.8-SNAPSHOT + 5.6.8.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 14565e66ac..8d518c978a 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.8-SNAPSHOT + 5.6.8.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index f059beb288..9cea8a180a 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.8-SNAPSHOT + 5.6.8.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index add84e67eb..e7e735defe 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.8-SNAPSHOT + 5.6.8.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index b6e66e9148..bae5df661b 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.8-SNAPSHOT + 5.6.8.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index b844b46df6..148bf5f941 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.8-SNAPSHOT + 5.6.8.Final hibernate-tools-tests-utils From 7112e1cda891ba770e862bd4e8cc96652b781235 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 25 Apr 2022 12:20:20 +0200 Subject: [PATCH 504/560] HBX-2347: Update version identifier to 5.6.9-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 424d297504..4e470d0967 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.8.Final + 5.6.9-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 34a88a1804..0c784e14a4 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.8.Final"; + public static final String VERSION = "5.6.9-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index dd37ebcfa7..fffea05d5c 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.8.Final + 5.6.9-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 6251883aa8..0686829938 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.8.Final + 5.6.9-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 76eb359890..58fd5dd12f 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.8.Final + 5.6.9-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 81c2de3e0a..04abd0541b 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.8.Final + 5.6.9-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index d3140226c4..35b3605f77 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.8.Final + 5.6.9-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 2e38c600b5..18c5c6f169 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.8.Final + 5.6.9-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 8ac20a68a9..cf6e7c2ac0 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.8.Final + 5.6.9-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 8d518c978a..fdeeca8a9f 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.8.Final + 5.6.9-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 9cea8a180a..92025a2895 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.8.Final + 5.6.9-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index e7e735defe..6f4d21e416 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.8.Final + 5.6.9-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index bae5df661b..2b295883cb 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.8.Final + 5.6.9-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 148bf5f941..50ac386606 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.8.Final + 5.6.9-SNAPSHOT hibernate-tools-tests-utils From 5ab1b509810bf3ea86493f0ebd8dca821cf7f65f Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 23 May 2022 17:30:51 +0100 Subject: [PATCH 505/560] HBX-2348: Update Hibernate ORM Dependency to Version 5.6.9.Final Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0686829938..2cb67ef8c7 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ 1.7 2.1.210 5.1.2.Final - 5.6.8.Final + 5.6.9.Final 2.5.2 8.0.1 2.2 From de5b02c9d9162635b1d090824f4cce7939387ee4 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 23 May 2022 17:44:28 +0100 Subject: [PATCH 506/560] HBX-2350: Update version identifier to 5.6.9.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 4e470d0967..d8d31edda0 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.9-SNAPSHOT + 5.6.9.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 0c784e14a4..346fecd081 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.9-SNAPSHOT"; + public static final String VERSION = "5.6.9.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index fffea05d5c..822a45e816 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.9-SNAPSHOT + 5.6.9.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 2cb67ef8c7..d96dcc19f7 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.9-SNAPSHOT + 5.6.9.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 58fd5dd12f..1df47773a8 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.9-SNAPSHOT + 5.6.9.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 04abd0541b..9fa04e0aad 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.9-SNAPSHOT + 5.6.9.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 35b3605f77..977bbdcd75 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.9-SNAPSHOT + 5.6.9.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 18c5c6f169..5221902a9b 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.9-SNAPSHOT + 5.6.9.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index cf6e7c2ac0..df41b08f43 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.9-SNAPSHOT + 5.6.9.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index fdeeca8a9f..91d360d556 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.9-SNAPSHOT + 5.6.9.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 92025a2895..c1735bcf88 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.9-SNAPSHOT + 5.6.9.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 6f4d21e416..283cc440a3 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.9-SNAPSHOT + 5.6.9.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 2b295883cb..bc1ad76911 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.9-SNAPSHOT + 5.6.9.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 50ac386606..bbce1eddfa 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.9-SNAPSHOT + 5.6.9.Final hibernate-tools-tests-utils From ca841dde3b2779bdfbbbc1e6c080be5c23c84428 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 7 Jun 2022 10:52:43 +0200 Subject: [PATCH 507/560] HBX-2360: Update version identifier to 5.6.10-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index d8d31edda0..e58178e59e 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.9.Final + 5.6.10-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 346fecd081..b1582278d6 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.9.Final"; + public static final String VERSION = "5.6.10-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 822a45e816..620c17504b 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.9.Final + 5.6.10-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index d96dcc19f7..2d4f8043de 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.9.Final + 5.6.10-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 1df47773a8..797cb2f09e 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.9.Final + 5.6.10-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 9fa04e0aad..3c267c2ac7 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.9.Final + 5.6.10-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 977bbdcd75..e91041020e 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.9.Final + 5.6.10-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 5221902a9b..b8855974f7 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.9.Final + 5.6.10-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index df41b08f43..48fc36a229 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.9.Final + 5.6.10-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 91d360d556..458d22bc42 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.9.Final + 5.6.10-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index c1735bcf88..c743aca484 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.9.Final + 5.6.10-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 283cc440a3..f87233b4b6 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.9.Final + 5.6.10-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index bc1ad76911..f3be90ae46 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.9.Final + 5.6.10-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index bbce1eddfa..d9f002817a 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.9.Final + 5.6.10-SNAPSHOT hibernate-tools-tests-utils From 6a39ed79d814750b0c439e00476eeb00dbcdeed1 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 7 Jun 2022 11:25:46 +0200 Subject: [PATCH 508/560] HBX-2365: Remove the Jaxen dependency where not needed - Remove from the 'main' module Signed-off-by: Koen Aers --- main/pom.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index e58178e59e..afe00f439e 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -64,10 +64,6 @@ javax.persistence javax.persistence-api - - jaxen - jaxen - org.apache.ant ant From 92334ba9c8b83e5901585dd1388855d6531e7253 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 7 Jun 2022 11:44:23 +0200 Subject: [PATCH 509/560] HBX-2365: Remove the Jaxen dependency where not needed - Remove from the 'test/common' module Signed-off-by: Koen Aers --- test/common/pom.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/common/pom.xml b/test/common/pom.xml index 797cb2f09e..6cfa661810 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -16,10 +16,6 @@ Hibernate Tools Common Database Tests Project - - jaxen - jaxen - org.hibernate hibernate-tools From 1745cd878bf593c2d3f2619096da365cc35168b9 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 7 Jun 2022 11:55:00 +0200 Subject: [PATCH 510/560] HBX-2365: Remove the Jaxen dependency where not needed - Remove from the 'test/nodb' module Signed-off-by: Koen Aers --- test/nodb/pom.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index c743aca484..011cf69d33 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -25,10 +25,6 @@ org.hibernate hibernate-tools-tests-utils - - jaxen - jaxen - javax javaee-api From 82cba82481a98b2c40f2600779a32ae27f615534 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 7 Jun 2022 12:09:26 +0200 Subject: [PATCH 511/560] HBX-2365: Remove the Jaxen dependency where not needed - Remove from the parent module Signed-off-by: Koen Aers --- pom.xml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pom.xml b/pom.xml index 2d4f8043de..d177cfd207 100644 --- a/pom.xml +++ b/pom.xml @@ -52,7 +52,6 @@ 2.5.2 8.0.1 2.2 - 1.2.0 5.8.2 8.0.22 19.3.0.0 @@ -100,12 +99,6 @@ javax.persistence-api ${javax.persistence-api.version} - - jaxen - jaxen - ${jaxen.version} - runtime - mysql mysql-connector-java From 8045394b5529cb2e4db103bb8a003a5861d5f7fa Mon Sep 17 00:00:00 2001 From: blafond Date: Fri, 10 Jun 2022 13:11:54 -0500 Subject: [PATCH 512/560] HBX-2366: Upgrade graphviz cmap extension to cmapx to fix DocExporter test on local linux Signed-off-by: blafond --- .../main/java/org/hibernate/tool/hbm2x/DocExporter.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main/src/main/java/org/hibernate/tool/hbm2x/DocExporter.java b/main/src/main/java/org/hibernate/tool/hbm2x/DocExporter.java index 63d4709b00..d31ea20adf 100644 --- a/main/src/main/java/org/hibernate/tool/hbm2x/DocExporter.java +++ b/main/src/main/java/org/hibernate/tool/hbm2x/DocExporter.java @@ -177,12 +177,12 @@ private boolean generateDot() { File entityGraphDot = new File(getOutputDirectory(), "entities/entitygraph.dot"); dotToFile( cmd, entityGraphDot.toString(), new File(getOutputDirectory(), "entities/entitygraph.png").toString()); dotToFile( cmd, entityGraphDot.toString(), new File(getOutputDirectory(), "entities/entitygraph.svg").toString()); - dotToFile( cmd, entityGraphDot.toString(), new File(getOutputDirectory(), "entities/entitygraph.cmap").toString()); + dotToFile( cmd, entityGraphDot.toString(), new File(getOutputDirectory(), "entities/entitygraph.cmapx").toString()); File tableGraphDot = new File(getOutputDirectory(), "tables/tablegraph.dot"); dotToFile( cmd, tableGraphDot.toString(), new File(getOutputDirectory(), "tables/tablegraph.png").toString()); dotToFile( cmd, tableGraphDot.toString(), new File(getOutputDirectory(), "tables/tablegraph.svg").toString()); - dotToFile( cmd, tableGraphDot.toString(), new File(getOutputDirectory(), "tables/tablegraph.cmap").toString()); + dotToFile( cmd, tableGraphDot.toString(), new File(getOutputDirectory(), "tables/tablegraph.cmapx").toString()); return true; @@ -343,7 +343,7 @@ public void generateTablesSummary(boolean graphsGenerated) { parameters.put( "graphsGenerated", Boolean.valueOf( graphsGenerated ) ); if(graphsGenerated) { StringBuffer sb = new StringBuffer(); - String fileName = "tables/tablegraph.cmap"; + String fileName = "tables/tablegraph.cmapx"; appendFile( sb, fileName ); parameters.put( "tablegrapharea", sb ); } @@ -386,7 +386,7 @@ public void generatePackageSummary(boolean graphsGenerated){ parameters.put( "graphsGenerated", Boolean.valueOf( graphsGenerated ) ); if(graphsGenerated) { StringBuffer sb = new StringBuffer(); - String fileName = "entities/entitygraph.cmap"; + String fileName = "entities/entitygraph.cmapx"; appendFile( sb, fileName ); parameters.put( "entitygrapharea", sb ); } From d51ca8faf869c16970571402ba8417c6fe471904 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 17 Jun 2022 14:55:49 +0200 Subject: [PATCH 513/560] HBX-2374: Update dependency on H2 to version 2.1.214 - Perform update to 2.1.212 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d177cfd207..c5821d216f 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ 2.3.31 1.7 - 2.1.210 + 2.1.212 5.1.2.Final 5.6.9.Final 2.5.2 From 64f646c9c2792611e2c8dfbf8b2929c6b73f9535 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 17 Jun 2022 16:17:09 +0200 Subject: [PATCH 514/560] HBX-2374: Update dependency on H2 to version 2.1.214 - Perform update to 2.1.214 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c5821d216f..19def3152c 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ 2.3.31 1.7 - 2.1.212 + 2.1.214 5.1.2.Final 5.6.9.Final 2.5.2 From cf2685024170a6eed83a3ecced1905c76cd90795 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 23 Jun 2022 08:25:21 +0200 Subject: [PATCH 515/560] HBX-2375: Fix the problem while publishing the test results with 'scacap/action-surefire-report' Signed-off-by: Koen Aers --- .github/workflows/build_test.yml | 10 +----- .github/workflows/publish_reports.yml | 50 --------------------------- 2 files changed, 1 insertion(+), 59 deletions(-) delete mode 100644 .github/workflows/publish_reports.yml diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 54fba73b5e..e851ba9994 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -24,13 +24,5 @@ jobs: - name: Build and Test uses: GabrielBB/xvfb-action@v1 with: - run: mvn clean install -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true - - - name: Archive Test Artifacts - uses: actions/upload-artifact@v2 - with: - name: test-reports - path: | - **/*target/surefire-reports/ - **/*.log + run: mvn clean install diff --git a/.github/workflows/publish_reports.yml b/.github/workflows/publish_reports.yml deleted file mode 100644 index f67be72b62..0000000000 --- a/.github/workflows/publish_reports.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Publish Reports - -on: - workflow_run: - workflows: ["Build and Test"] - types: - - completed - -jobs: - publish: - runs-on: ubuntu-latest - - steps: - - name: Download artifacts - uses: actions/github-script@v3.1.0 - with: - script: | - var artifacts = await github.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: ${{github.event.workflow_run.id}}, - }); - for (var artifact of artifacts.data.artifacts) { - if (artifact.name.endsWith('test-reports')) { - var zipfile = await github.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: artifact.id, - archive_format: 'zip', - }); - var fs = require('fs'); - var path = require('path'); - var pathFile = path.format({ - root: '${{github.workspace}}/', - name: artifact.name, - ext: '.zip' - }); - fs.writeFileSync(pathFile, Buffer.from(zipfile.data)); - } - } - - name: Unzip artifacts - run: | - find . -name '*.zip' -exec sh -c 'unzip -d "${1%.*}" "$1"' _ {} \; - - name: Publish aggregated tests reports - uses: scacap/action-surefire-report@v1 - with: - github_token: ${{secrets.GITHUB_TOKEN}} - report_paths: '${{github.workspace}}/*test-reports/**/TEST-*.xml' - commit: ${{github.event.workflow_run.head_sha}} - From d0ca4ab34ebf70ba4fdbc2bddc8df82c9e639bc1 Mon Sep 17 00:00:00 2001 From: blafond Date: Fri, 8 Jul 2022 08:26:24 -0500 Subject: [PATCH 516/560] HBX-2384: Update Hibernate ORM Dependency to Version 5.6.10.Final Signed-off-by: blafond --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 19def3152c..21aabbf69a 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ 1.7 2.1.214 5.1.2.Final - 5.6.9.Final + 5.6.10.Final 2.5.2 8.0.1 2.2 From 0a5ea82224f11f92b84b7beba686e2b1133b119a Mon Sep 17 00:00:00 2001 From: blafond Date: Fri, 8 Jul 2022 09:44:20 -0500 Subject: [PATCH 517/560] HBX-2385: Update version identifier to 5.6.10.Final Signed-off-by: blafond --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index afe00f439e..0a698a4e8f 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.10-SNAPSHOT + 5.6.10.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index b1582278d6..5b3b4778db 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.10-SNAPSHOT"; + public static final String VERSION = "5.6.10.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 620c17504b..52f2c0f198 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.10-SNAPSHOT + 5.6.10.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 21aabbf69a..733daad9cb 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.10-SNAPSHOT + 5.6.10.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index 6cfa661810..c88aa28430 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.10-SNAPSHOT + 5.6.10.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 3c267c2ac7..fc46f5d288 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.10-SNAPSHOT + 5.6.10.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index e91041020e..0a790533b7 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.10-SNAPSHOT + 5.6.10.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index b8855974f7..0739693a0c 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.10-SNAPSHOT + 5.6.10.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 48fc36a229..f408697b41 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.10-SNAPSHOT + 5.6.10.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 458d22bc42..450a306d2c 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.10-SNAPSHOT + 5.6.10.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index 011cf69d33..f94622f996 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.10-SNAPSHOT + 5.6.10.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index f87233b4b6..4585000f40 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.10-SNAPSHOT + 5.6.10.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index f3be90ae46..8c5d18b8f1 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.10-SNAPSHOT + 5.6.10.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index d9f002817a..7e68e46c50 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.10-SNAPSHOT + 5.6.10.Final hibernate-tools-tests-utils From 98628354c502b859852a822cf92c8a477da2314d Mon Sep 17 00:00:00 2001 From: blafond Date: Wed, 24 Aug 2022 10:07:38 -0500 Subject: [PATCH 518/560] HBX-2386: Update version identifier to 5.6.11-SNAPSHOT Signed-off-by: blafond --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 0a698a4e8f..f36023be18 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.10.Final + 5.6.11-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 5b3b4778db..8cbab8f5e0 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.10.Final"; + public static final String VERSION = "5.6.11-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 52f2c0f198..f344f66356 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.10.Final + 5.6.11-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 733daad9cb..0c24974a49 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.10.Final + 5.6.11-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index c88aa28430..aab9145c8e 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.10.Final + 5.6.11-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index fc46f5d288..d123231f6b 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.10.Final + 5.6.11-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 0a790533b7..4eb300e962 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.10.Final + 5.6.11-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 0739693a0c..e688b42a0b 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.10.Final + 5.6.11-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index f408697b41..3799c836f4 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.10.Final + 5.6.11-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 450a306d2c..c3f1d39770 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.10.Final + 5.6.11-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index f94622f996..c8e2a17b2a 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.10.Final + 5.6.11-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 4585000f40..266d9a8243 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.10.Final + 5.6.11-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 8c5d18b8f1..7e902fb3b6 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.10.Final + 5.6.11-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 7e68e46c50..5ac5174815 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.10.Final + 5.6.11-SNAPSHOT hibernate-tools-tests-utils From 0b0122ea90aff744977f2f8a4af72376f9176895 Mon Sep 17 00:00:00 2001 From: blafond Date: Tue, 6 Sep 2022 10:17:15 -0500 Subject: [PATCH 519/560] HBX-2388: Update Hibernate ORM Dependency to Version 5.6.11.Final Signed-off-by: blafond --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0c24974a49..168e59666f 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ 1.7 2.1.214 5.1.2.Final - 5.6.10.Final + 5.6.11.Final 2.5.2 8.0.1 2.2 From f985661dbb77b3bbbea92af770dc4577568d1950 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 19 Sep 2022 16:18:45 +0200 Subject: [PATCH 520/560] HBX-2395: Update version identifier to 5.6.11.Final Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index f36023be18..0f95f5ff03 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.11-SNAPSHOT + 5.6.11.Final hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 8cbab8f5e0..471c826c97 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.11-SNAPSHOT"; + public static final String VERSION = "5.6.11.Final"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index f344f66356..32fbf4c496 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.11-SNAPSHOT + 5.6.11.Final hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 168e59666f..2f4c1b63bd 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.11-SNAPSHOT + 5.6.11.Final pom diff --git a/test/common/pom.xml b/test/common/pom.xml index aab9145c8e..ef6dc0b2ee 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.11-SNAPSHOT + 5.6.11.Final hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index d123231f6b..986e8bdcf9 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.11-SNAPSHOT + 5.6.11.Final hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 4eb300e962..7fcd17d66e 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.11-SNAPSHOT + 5.6.11.Final hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index e688b42a0b..345b8f0275 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.11-SNAPSHOT + 5.6.11.Final hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index 3799c836f4..b5dc7f9d93 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.11-SNAPSHOT + 5.6.11.Final hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index c3f1d39770..6c3c2b1f82 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.11-SNAPSHOT + 5.6.11.Final hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index c8e2a17b2a..fae87c0227 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.11-SNAPSHOT + 5.6.11.Final hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 266d9a8243..2c63774fb0 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.11-SNAPSHOT + 5.6.11.Final hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index 7e902fb3b6..f551328762 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.11-SNAPSHOT + 5.6.11.Final hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 5ac5174815..58d4bf69ae 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.11-SNAPSHOT + 5.6.11.Final hibernate-tools-tests-utils From 79b2f0adc2adbb08ac68c00b92c31ba895cdacb2 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 20 Sep 2022 09:18:04 +0200 Subject: [PATCH 521/560] HBX-2396: Update version identifier to 5.6.12-SNAPSHOT Signed-off-by: Koen Aers --- main/pom.xml | 2 +- main/src/main/java/org/hibernate/tool/Version.java | 2 +- maven-plugin/pom.xml | 2 +- pom.xml | 2 +- test/common/pom.xml | 2 +- test/h2/pom.xml | 2 +- test/hsql/pom.xml | 2 +- test/maven-plugin/pom.xml | 2 +- test/mssql/pom.xml | 2 +- test/mysql/pom.xml | 2 +- test/nodb/pom.xml | 2 +- test/oracle/pom.xml | 2 +- test/pom.xml | 2 +- test/utils/pom.xml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index 0f95f5ff03..c5ba1c8df8 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -6,7 +6,7 @@ org.hibernate hibernate-tools-parent - 5.6.11.Final + 5.6.12-SNAPSHOT hibernate-tools diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 471c826c97..dbeeda0213 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,7 +4,7 @@ final public class Version { - public static final String VERSION = "5.6.11.Final"; + public static final String VERSION = "5.6.12-SNAPSHOT"; private static final Version instance = new Version(); diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index 32fbf4c496..b8d9b67d47 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -5,7 +5,7 @@ org.hibernate hibernate-tools-parent - 5.6.11.Final + 5.6.12-SNAPSHOT hibernate-tools-maven-plugin diff --git a/pom.xml b/pom.xml index 2f4c1b63bd..85e2f58a7d 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.hibernate hibernate-tools-parent - 5.6.11.Final + 5.6.12-SNAPSHOT pom diff --git a/test/common/pom.xml b/test/common/pom.xml index ef6dc0b2ee..3c7ee6b55b 100644 --- a/test/common/pom.xml +++ b/test/common/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.11.Final + 5.6.12-SNAPSHOT hibernate-tools-tests-common diff --git a/test/h2/pom.xml b/test/h2/pom.xml index 986e8bdcf9..93a9e6f093 100644 --- a/test/h2/pom.xml +++ b/test/h2/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.11.Final + 5.6.12-SNAPSHOT hibernate-tools-tests-h2 diff --git a/test/hsql/pom.xml b/test/hsql/pom.xml index 7fcd17d66e..4b7da58456 100644 --- a/test/hsql/pom.xml +++ b/test/hsql/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.11.Final + 5.6.12-SNAPSHOT hibernate-tools-tests-hsql diff --git a/test/maven-plugin/pom.xml b/test/maven-plugin/pom.xml index 345b8f0275..a8dbd38cc0 100644 --- a/test/maven-plugin/pom.xml +++ b/test/maven-plugin/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.11.Final + 5.6.12-SNAPSHOT hibernate-tools-tests-maven-plugin diff --git a/test/mssql/pom.xml b/test/mssql/pom.xml index b5dc7f9d93..76bc681dd3 100644 --- a/test/mssql/pom.xml +++ b/test/mssql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.11.Final + 5.6.12-SNAPSHOT hibernate-tools-tests-mssql diff --git a/test/mysql/pom.xml b/test/mysql/pom.xml index 6c3c2b1f82..9e3bb20c4c 100644 --- a/test/mysql/pom.xml +++ b/test/mysql/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.11.Final + 5.6.12-SNAPSHOT hibernate-tools-tests-mysql diff --git a/test/nodb/pom.xml b/test/nodb/pom.xml index fae87c0227..43b9c600bf 100644 --- a/test/nodb/pom.xml +++ b/test/nodb/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.11.Final + 5.6.12-SNAPSHOT hibernate-tools-tests-nodb diff --git a/test/oracle/pom.xml b/test/oracle/pom.xml index 2c63774fb0..0e0fc1c703 100644 --- a/test/oracle/pom.xml +++ b/test/oracle/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.11.Final + 5.6.12-SNAPSHOT hibernate-tools-tests-oracle diff --git a/test/pom.xml b/test/pom.xml index f551328762..4501cf36be 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -8,7 +8,7 @@ org.hibernate hibernate-tools-parent - 5.6.11.Final + 5.6.12-SNAPSHOT hibernate-tools-tests-parent diff --git a/test/utils/pom.xml b/test/utils/pom.xml index 58d4bf69ae..26e8962365 100644 --- a/test/utils/pom.xml +++ b/test/utils/pom.xml @@ -7,7 +7,7 @@ org.hibernate hibernate-tools-tests-parent - 5.6.11.Final + 5.6.12-SNAPSHOT hibernate-tools-tests-utils From 285b12ecf397f72e95d9da5500887cb597830c1f Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Sat, 1 Oct 2022 11:16:00 +0200 Subject: [PATCH 522/560] HBX-2404: Replace DTD references to 'http://hibernate.sourceforge.net' with 'http://hibernate.org/dtd/' Signed-off-by: Koen Aers --- .../tool/ant/JDBCConfigWithRevEngXml/hibernate.reveng.xml | 2 +- .../tool/jdbc2cfg/OverrideBinder/docexample.reveng.xml | 2 +- .../tool/jdbc2cfg/OverrideBinder/overridetest.reveng.xml | 2 +- .../tool/jdbc2cfg/OverrideBinder/schemaselection.reveng.xml | 2 +- .../org/hibernate/tool/jdbc2cfg/OverrideBinder/test.reveng.xml | 2 +- .../tool/jdbc2cfg/RevEngForeignKey/badforeignkeytest.reveng.xml | 2 +- .../tool/jdbc2cfg/RevEngForeignKey/foreignkeytest.reveng.xml | 2 +- .../tool/hbm2x/hbm2hbmxml/FormulaTest/Customer.hbm.xml | 2 +- .../org/hibernate/tool/hbm2x/hbm2hbmxml/JoinTest/Parent.hbm.xml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/common/src/main/resources/org/hibernate/tool/ant/JDBCConfigWithRevEngXml/hibernate.reveng.xml b/test/common/src/main/resources/org/hibernate/tool/ant/JDBCConfigWithRevEngXml/hibernate.reveng.xml index 61ed7e6792..21f309b597 100644 --- a/test/common/src/main/resources/org/hibernate/tool/ant/JDBCConfigWithRevEngXml/hibernate.reveng.xml +++ b/test/common/src/main/resources/org/hibernate/tool/ant/JDBCConfigWithRevEngXml/hibernate.reveng.xml @@ -1,5 +1,5 @@ - + diff --git a/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/docexample.reveng.xml b/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/docexample.reveng.xml index c40cc46778..fbc9d4cd71 100644 --- a/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/docexample.reveng.xml +++ b/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/docexample.reveng.xml @@ -1,5 +1,5 @@ - + diff --git a/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/overridetest.reveng.xml b/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/overridetest.reveng.xml index e15afa7259..d9a38c8107 100644 --- a/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/overridetest.reveng.xml +++ b/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/overridetest.reveng.xml @@ -1,5 +1,5 @@ - + diff --git a/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/schemaselection.reveng.xml b/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/schemaselection.reveng.xml index dd0f758036..157fd23e4d 100644 --- a/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/schemaselection.reveng.xml +++ b/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/schemaselection.reveng.xml @@ -1,5 +1,5 @@ - + diff --git a/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/test.reveng.xml b/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/test.reveng.xml index 211b7a3fe0..622b826bd2 100644 --- a/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/test.reveng.xml +++ b/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/OverrideBinder/test.reveng.xml @@ -1,5 +1,5 @@ - + diff --git a/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/badforeignkeytest.reveng.xml b/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/badforeignkeytest.reveng.xml index f579587c79..79754cbd0a 100644 --- a/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/badforeignkeytest.reveng.xml +++ b/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/badforeignkeytest.reveng.xml @@ -1,5 +1,5 @@ - +
diff --git a/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/foreignkeytest.reveng.xml b/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/foreignkeytest.reveng.xml index f5e0b82f95..895235913d 100644 --- a/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/foreignkeytest.reveng.xml +++ b/test/common/src/main/resources/org/hibernate/tool/jdbc2cfg/RevEngForeignKey/foreignkeytest.reveng.xml @@ -1,5 +1,5 @@ - + diff --git a/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Customer.hbm.xml b/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Customer.hbm.xml index 5a878b2209..e048b71b32 100644 --- a/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Customer.hbm.xml +++ b/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/FormulaTest/Customer.hbm.xml @@ -1,7 +1,7 @@ + "http://hibernate.org/dtd/hibernate-mapping-3.0.dtd"> From e845e9ff73511ab93871f4ed08f5cb83ef36dfc4 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Mon, 15 Jan 2024 13:20:51 +0100 Subject: [PATCH 541/560] HBX-2636: Update dependency on FreeMarker to version 2.3.32 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c1d25c5336..2f37bda00d 100644 --- a/pom.xml +++ b/pom.xml @@ -43,7 +43,7 @@ 1.10.14 4.4 - 2.3.31 + 2.3.32 1.7 2.1.214 From b1aef9ad80a7a42d4a24827d85454e476099e5bd Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 16 Jan 2024 12:04:18 +0100 Subject: [PATCH 542/560] HBX-2641: Update dependency on JUnit to version 5.10.1 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2f37bda00d..0af9631e90 100644 --- a/pom.xml +++ b/pom.xml @@ -52,7 +52,7 @@ 2.5.2 8.0.1 2.2 - 5.9.1 + 5.10.1 8.0.22 19.3.0.0 9.2.1.jre8 From 7e1abb045c976f55c40af6db089d06d4934c48c6 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 30 Jan 2024 10:17:00 +0100 Subject: [PATCH 543/560] HBX-2638: Update dependency on H2 to version 2.2.224 Signed-off-by: Koen Aers --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0af9631e90..51e5d165b7 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ 2.3.32 1.7 - 2.1.214 + 2.2.224 5.1.2.Final 5.6.15.Final 2.5.2 From 20ce0d2001fe8e3c3775561567e38b123d526673 Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Mon, 8 Jan 2024 09:41:38 +0100 Subject: [PATCH 544/560] HBX-2716 - Remove floating point types from types advertised to support precision & scale Signed-off-by: Koen Aers --- .../java/org/hibernate/cfg/JDBCBinder.java | 4 +- .../cfg/reveng/BasicColumnProcessor.java | 7 +- .../DefaultReverseEngineeringStrategy.java | 5 +- .../cfg/reveng/JDBCToHibernateTypeHelper.java | 199 ------------------ .../cfg/reveng/OverrideRepository.java | 3 +- .../utils/JdbcToHibernateTypeHelper.java | 34 +-- .../detector/SchemaByMetaDataDetector.java | 4 +- 7 files changed, 34 insertions(+), 222 deletions(-) delete mode 100644 main/src/main/java/org/hibernate/cfg/reveng/JDBCToHibernateTypeHelper.java diff --git a/main/src/main/java/org/hibernate/cfg/JDBCBinder.java b/main/src/main/java/org/hibernate/cfg/JDBCBinder.java index 1cdf89f0f9..7422b5a4e8 100644 --- a/main/src/main/java/org/hibernate/cfg/JDBCBinder.java +++ b/main/src/main/java/org/hibernate/cfg/JDBCBinder.java @@ -28,11 +28,11 @@ import org.hibernate.cfg.reveng.AssociationInfo; import org.hibernate.cfg.reveng.DatabaseCollector; import org.hibernate.cfg.reveng.JDBCReader; -import org.hibernate.cfg.reveng.JDBCToHibernateTypeHelper; import org.hibernate.cfg.reveng.MappingsDatabaseCollector; import org.hibernate.cfg.reveng.RevEngUtils; import org.hibernate.cfg.reveng.ReverseEngineeringStrategy; import org.hibernate.cfg.reveng.TableIdentifier; +import org.hibernate.cfg.reveng.utils.JdbcToHibernateTypeHelper; import org.hibernate.engine.OptimisticLockStyle; import org.hibernate.engine.jdbc.spi.JdbcServices; import org.hibernate.engine.spi.Mapping; @@ -935,7 +935,7 @@ private String guessAndAlignType(Table table, Column column, Mapping mapping, bo } private String typeCodeName(int sqlTypeCode) { - return sqlTypeCode + "(" + JDBCToHibernateTypeHelper.getJDBCTypeName(sqlTypeCode) + ")"; + return sqlTypeCode + "(" + JdbcToHibernateTypeHelper.getJDBCTypeName(sqlTypeCode) + ")"; } /** diff --git a/main/src/main/java/org/hibernate/cfg/reveng/BasicColumnProcessor.java b/main/src/main/java/org/hibernate/cfg/reveng/BasicColumnProcessor.java index e3a87fd0cd..ab274d98e9 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/BasicColumnProcessor.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/BasicColumnProcessor.java @@ -7,6 +7,7 @@ import org.hibernate.JDBCException; import org.hibernate.cfg.JDBCBinderException; import org.hibernate.cfg.reveng.dialect.MetaDataDialect; +import org.hibernate.cfg.reveng.utils.JdbcToHibernateTypeHelper; import org.hibernate.mapping.Column; import org.hibernate.mapping.Table; import org.hibernate.tool.util.TableNameQualifier; @@ -82,15 +83,15 @@ public static void processBasicColumns( column.setComment(comment); column.setSqlTypeCode(new Integer(sqlType) ); if(intBounds(size) ) { - if(JDBCToHibernateTypeHelper.typeHasLength(sqlType) ) { + if(JdbcToHibernateTypeHelper.typeHasLength(sqlType) ) { column.setLength(size); } - if(JDBCToHibernateTypeHelper.typeHasScaleAndPrecision(sqlType) ) { + if(JdbcToHibernateTypeHelper.typeHasPrecision(sqlType) ) { column.setPrecision(size); } } if(intBounds(decimalDigits) ) { - if(JDBCToHibernateTypeHelper.typeHasScaleAndPrecision(sqlType) ) { + if(JdbcToHibernateTypeHelper.typeHasScale(sqlType) ) { column.setScale(decimalDigits); } } diff --git a/main/src/main/java/org/hibernate/cfg/reveng/DefaultReverseEngineeringStrategy.java b/main/src/main/java/org/hibernate/cfg/reveng/DefaultReverseEngineeringStrategy.java index fb4718468b..b5d5959afd 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/DefaultReverseEngineeringStrategy.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/DefaultReverseEngineeringStrategy.java @@ -10,6 +10,7 @@ import java.util.Properties; import java.util.Set; +import org.hibernate.cfg.reveng.utils.JdbcToHibernateTypeHelper; import org.hibernate.internal.util.StringHelper; import org.hibernate.mapping.Column; import org.hibernate.mapping.ForeignKey; @@ -106,11 +107,11 @@ public String foreignKeyToEntityName(String keyname, TableIdentifier fromTable, } public String columnToHibernateTypeName(TableIdentifier table, String columnName, int sqlType, int length, int precision, int scale, boolean nullable, boolean generatedIdentifier) { - String preferredHibernateType = JDBCToHibernateTypeHelper.getPreferredHibernateType(sqlType, length, precision, scale, nullable, generatedIdentifier); + String preferredHibernateType = JdbcToHibernateTypeHelper.getPreferredHibernateType(sqlType, length, precision, scale, nullable, generatedIdentifier); String location = ""; if(log.isDebugEnabled()) { - String info = " t:" + JDBCToHibernateTypeHelper.getJDBCTypeName( sqlType ) + " l:" + length + " p:" + precision + " s:" + scale + " n:" + nullable + " id:" + generatedIdentifier; + String info = " t:" + JdbcToHibernateTypeHelper.getJDBCTypeName( sqlType ) + " l:" + length + " p:" + precision + " s:" + scale + " n:" + nullable + " id:" + generatedIdentifier; if(table!=null) { location = TableNameQualifier.qualify(table.getCatalog(), table.getSchema(), table.getName() ) + "." + columnName + info; } else { diff --git a/main/src/main/java/org/hibernate/cfg/reveng/JDBCToHibernateTypeHelper.java b/main/src/main/java/org/hibernate/cfg/reveng/JDBCToHibernateTypeHelper.java deleted file mode 100644 index f921e1187f..0000000000 --- a/main/src/main/java/org/hibernate/cfg/reveng/JDBCToHibernateTypeHelper.java +++ /dev/null @@ -1,199 +0,0 @@ -package org.hibernate.cfg.reveng; - -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; -import java.sql.SQLException; -import java.sql.Types; -import java.util.HashMap; -import java.util.Map; - -import org.hibernate.MappingException; - - -/** - * Utility class for mapping between sqltypes and hibernate type names. - * - * @author max (based on parts from Sql2Java from Middlegen) - * - */ -public final class JDBCToHibernateTypeHelper { - - private JDBCToHibernateTypeHelper() { - - } - - /** The Map containing the preferred conversion type values. */ - private static final Map PREFERRED_HIBERNATETYPE_FOR_SQLTYPE = new HashMap(); - - static { - PREFERRED_HIBERNATETYPE_FOR_SQLTYPE.put(new Integer(Types.TINYINT), new String[] { "byte", Byte.class.getName()} ); - PREFERRED_HIBERNATETYPE_FOR_SQLTYPE.put(new Integer(Types.SMALLINT), new String[] { "short", Short.class.getName()} ); - PREFERRED_HIBERNATETYPE_FOR_SQLTYPE.put(new Integer(Types.INTEGER), new String[] { "int", Integer.class.getName()} ); - PREFERRED_HIBERNATETYPE_FOR_SQLTYPE.put(new Integer(Types.BIGINT), new String[] { "long", Long.class.getName()} ); - PREFERRED_HIBERNATETYPE_FOR_SQLTYPE.put(new Integer(Types.REAL), new String[] { "float", Float.class.getName()} ); - PREFERRED_HIBERNATETYPE_FOR_SQLTYPE.put(new Integer(Types.FLOAT), new String[] { "double", Double.class.getName()} ); - PREFERRED_HIBERNATETYPE_FOR_SQLTYPE.put(new Integer(Types.DOUBLE), new String[] { "double", Double.class.getName()}); - PREFERRED_HIBERNATETYPE_FOR_SQLTYPE.put(new Integer(Types.DECIMAL), new String[] { "big_decimal", "big_decimal" }); - PREFERRED_HIBERNATETYPE_FOR_SQLTYPE.put(new Integer(Types.NUMERIC), new String[] { "big_decimal", "big_decimal" }); - PREFERRED_HIBERNATETYPE_FOR_SQLTYPE.put(new Integer(Types.BIT), new String[] { "boolean", Boolean.class.getName()}); - PREFERRED_HIBERNATETYPE_FOR_SQLTYPE.put(new Integer(Types.BOOLEAN), new String[] { "boolean", Boolean.class.getName()}); - PREFERRED_HIBERNATETYPE_FOR_SQLTYPE.put(new Integer(Types.CHAR), new String[] { "char", Character.class.getName()}); - PREFERRED_HIBERNATETYPE_FOR_SQLTYPE.put(new Integer(Types.VARCHAR), new String[] { "string", "string" }); - PREFERRED_HIBERNATETYPE_FOR_SQLTYPE.put(new Integer(Types.LONGVARCHAR), new String[] { "string", "string" }); - PREFERRED_HIBERNATETYPE_FOR_SQLTYPE.put(new Integer(Types.BINARY), new String[] { "binary", "binary" }); - PREFERRED_HIBERNATETYPE_FOR_SQLTYPE.put(new Integer(Types.VARBINARY), new String[] { "binary", "binary" }); - PREFERRED_HIBERNATETYPE_FOR_SQLTYPE.put(new Integer(Types.LONGVARBINARY), new String[] { "binary", "binary" }); - PREFERRED_HIBERNATETYPE_FOR_SQLTYPE.put(new Integer(Types.DATE), new String[] { "date", "date" }); - PREFERRED_HIBERNATETYPE_FOR_SQLTYPE.put(new Integer(Types.TIME), new String[] { "time", "time" }); - PREFERRED_HIBERNATETYPE_FOR_SQLTYPE.put(new Integer(Types.TIMESTAMP), new String[] { "timestamp", "timestamp" }); - PREFERRED_HIBERNATETYPE_FOR_SQLTYPE.put(new Integer(Types.CLOB), new String[] { "clob", "clob" }); - PREFERRED_HIBERNATETYPE_FOR_SQLTYPE.put(new Integer(Types.BLOB), new String[] { "blob", "blob" }); - - //Hibernate does not have any built-in Type for these: - //preferredJavaTypeForSqlType.put(new Integer(Types.ARRAY), "java.sql.Array"); - //preferredJavaTypeForSqlType.put(new Integer(Types.REF), "java.sql.Ref"); - //preferredJavaTypeForSqlType.put(new Integer(Types.STRUCT), "java.lang.Object"); - //preferredJavaTypeForSqlType.put(new Integer(Types.JAVA_OBJECT), "java.lang.Object"); - } - - /* (non-Javadoc) - * @see org.hibernate.cfg.JDBCTypeToHibernateTypesStrategy#getPreferredHibernateType(int, int, int, int) - */ - public static String getPreferredHibernateType(int sqlType, int size, int precision, int scale, boolean nullable, boolean generatedIdentifier) { - boolean returnNullable = nullable || generatedIdentifier; - if ( (sqlType == Types.DECIMAL || sqlType == Types.NUMERIC) && scale <= 0) { // <= - if (precision == 1) { - // NUMERIC(1) is a often used idiom for storing boolean thus providing it out of the box. - return returnNullable?Boolean.class.getName():"boolean"; - } - else if (precision < 3) { - return returnNullable?Byte.class.getName():"byte"; - } - else if (precision < 5) { - return returnNullable?Short.class.getName():"short"; - } - else if (precision < 10) { - return returnNullable?Integer.class.getName():"int"; - } - else if (precision < 19) { - return returnNullable?Long.class.getName():"long"; - } - else { - return "big_integer"; - } - } - - if ( sqlType == Types.CHAR && size>1 ) { - return "string"; - } - - String[] result = (String[]) PREFERRED_HIBERNATETYPE_FOR_SQLTYPE.get(new Integer(sqlType) ); - - if(result==null) { - return null; - } else if(returnNullable) { - return result[1]; - } else { - return result[0]; - } - } - - static Map jdbcTypes; // Name to value - static Map jdbcTypeValues; // value to Name - - public static String[] getJDBCTypes() { - checkTypes(); - - return (String[]) jdbcTypes.keySet().toArray(new String[jdbcTypes.size()]); - } - - public static int getJDBCType(String value) { - checkTypes(); - - Integer number = (Integer) jdbcTypes.get(value); - - if(number==null) { - try { - return Integer.parseInt(value); - } - catch (NumberFormatException nfe) { - throw new MappingException("jdbc-type: " + value + " is not a known JDBC Type nor a valid number"); - } - } - else { - return number.intValue(); - } - } - - private static void checkTypes() { - if(jdbcTypes==null) { - jdbcTypes = new HashMap(); - Field[] fields = Types.class.getFields(); - for (int i = 0; i < fields.length; i++) { - Field field = fields[i]; - if(Modifier.isStatic(field.getModifiers() ) ) { - try { - jdbcTypes.put(field.getName(), (Integer)field.get(Types.class) ); - } - catch (IllegalArgumentException e) { - // ignore - } - catch (IllegalAccessException e) { - // ignore - } - } - } - } - } - - public static String getJDBCTypeName(int value) { - if(jdbcTypeValues==null) { - jdbcTypeValues = new HashMap(); - Field[] fields = Types.class.getFields(); - for (int i = 0; i < fields.length; i++) { - Field field = fields[i]; - if(Modifier.isStatic(field.getModifiers() ) ) { - try { - jdbcTypeValues.put((Integer)field.get(Types.class), field.getName() ); - } - catch (IllegalArgumentException e) { - // ignore - } - catch (IllegalAccessException e) { - // ignore - } - } - } - } - - String name = (String) jdbcTypeValues.get(new Integer(value) ); - - if(name!=null) { - return name; - } - else { - return ""+value; - } - } - - /** - * @param table - * @param schema - * @param catalog - * @throws SQLException - */ - - // scale and precision have numeric column - public static boolean typeHasScaleAndPrecision(int sqlType) { - return (sqlType == Types.DECIMAL || sqlType == Types.NUMERIC - || sqlType == Types.REAL || sqlType == Types.FLOAT || sqlType == Types.DOUBLE); - } - - // length is for string column - public static boolean typeHasLength(int sqlType) { - return (sqlType == Types.CHAR || sqlType == Types.DATE - || sqlType == Types.LONGVARCHAR || sqlType == Types.TIME || sqlType == Types.TIMESTAMP - || sqlType == Types.VARCHAR ); - } -} - diff --git a/main/src/main/java/org/hibernate/cfg/reveng/OverrideRepository.java b/main/src/main/java/org/hibernate/cfg/reveng/OverrideRepository.java index b729a6637e..0642536209 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/OverrideRepository.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/OverrideRepository.java @@ -20,6 +20,7 @@ import org.apache.commons.collections4.MapIterator; import org.apache.commons.collections4.MultiValuedMap; import org.hibernate.MappingException; +import org.hibernate.cfg.reveng.utils.JdbcToHibernateTypeHelper; import org.hibernate.cfg.reveng.utils.MetaAttributeHelper; import org.hibernate.cfg.reveng.utils.MetaAttributeHelper.SimpleMetaAttribute; import org.hibernate.internal.util.StringHelper; @@ -318,7 +319,7 @@ public List getSchemaSelections() { public String columnToHibernateTypeName(TableIdentifier table, String columnName, int sqlType, int length, int precision, int scale, boolean nullable, boolean generatedIdentifier) { String result = null; String location = ""; - String info = " t:" + JDBCToHibernateTypeHelper.getJDBCTypeName( sqlType ) + " l:" + length + " p:" + precision + " s:" + scale + " n:" + nullable + " id:" + generatedIdentifier; + String info = " t:" + JdbcToHibernateTypeHelper.getJDBCTypeName( sqlType ) + " l:" + length + " p:" + precision + " s:" + scale + " n:" + nullable + " id:" + generatedIdentifier; if(table!=null) { location = TableNameQualifier.qualify(table.getCatalog(), table.getSchema(), table.getName() ) + "." + columnName; } else { diff --git a/main/src/main/java/org/hibernate/cfg/reveng/utils/JdbcToHibernateTypeHelper.java b/main/src/main/java/org/hibernate/cfg/reveng/utils/JdbcToHibernateTypeHelper.java index cca86a6029..0d03569032 100644 --- a/main/src/main/java/org/hibernate/cfg/reveng/utils/JdbcToHibernateTypeHelper.java +++ b/main/src/main/java/org/hibernate/cfg/reveng/utils/JdbcToHibernateTypeHelper.java @@ -183,17 +183,25 @@ public static String getJDBCTypeName(int value) { * @throws SQLException */ - // scale and precision have numeric column - public static boolean typeHasScaleAndPrecision(int sqlType) { - return (sqlType == Types.DECIMAL || sqlType == Types.NUMERIC - || sqlType == Types.REAL || sqlType == Types.FLOAT || sqlType == Types.DOUBLE); - } - - // length is for string column - public static boolean typeHasLength(int sqlType) { - return (sqlType == Types.CHAR || sqlType == Types.DATE - || sqlType == Types.LONGVARCHAR || sqlType == Types.TIME || sqlType == Types.TIMESTAMP - || sqlType == Types.VARCHAR ); - } -} + // scale is for non floating point numeric columns + public static boolean typeHasScale(int sqlType) { + return (sqlType == Types.DECIMAL || sqlType == Types.NUMERIC); + } + + // precision is for numeric columns + public static boolean typeHasPrecision(int sqlType) { + return (sqlType == Types.DECIMAL || sqlType == Types.NUMERIC + || sqlType == Types.REAL || sqlType == Types.FLOAT || sqlType == Types.DOUBLE); + } + public static boolean typeHasScaleAndPrecision(int sqlType) { + return typeHasScale(sqlType) && typeHasPrecision(sqlType); + } + + // length is for string columns + public static boolean typeHasLength(int sqlType) { + return (sqlType == Types.CHAR || sqlType == Types.DATE + || sqlType == Types.LONGVARCHAR || sqlType == Types.TIME || sqlType == Types.TIMESTAMP + || sqlType == Types.VARCHAR ); + } +} diff --git a/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java b/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java index a1eee037a5..dee75fade1 100644 --- a/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java +++ b/main/src/main/java/org/hibernate/tool/hbmlint/detector/SchemaByMetaDataDetector.java @@ -16,8 +16,8 @@ import org.hibernate.cfg.reveng.DefaultDatabaseCollector; import org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy; import org.hibernate.cfg.reveng.JDBCReader; -import org.hibernate.cfg.reveng.JDBCToHibernateTypeHelper; import org.hibernate.cfg.reveng.SchemaSelection; +import org.hibernate.cfg.reveng.utils.JdbcToHibernateTypeHelper; import org.hibernate.dialect.Dialect; import org.hibernate.engine.jdbc.spi.JdbcServices; import org.hibernate.engine.spi.Mapping; @@ -201,7 +201,7 @@ public void visit( pc.reportIssue( new Issue( "SCHEMA_COLUMN_TYPE_MISMATCH", Issue.NORMAL_PRIORITY, table(table) + " has a wrong column type for " + col.getName() + ", expected: " - + JDBCToHibernateTypeHelper.getJDBCTypeName(modelTypeCode) + " but was " + JDBCToHibernateTypeHelper.getJDBCTypeName(dbTypeCode) + " in db") ); + + JdbcToHibernateTypeHelper.getJDBCTypeName(modelTypeCode) + " but was " + JdbcToHibernateTypeHelper.getJDBCTypeName(dbTypeCode) + " in db") ); } } } From d326e917f39944fe0e1d02dda12f3946a8061f2e Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 23 Jul 2024 17:14:32 +0300 Subject: [PATCH 545/560] HBX-2871: Remove references to the unexisting document 'http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd' from some of the older branches Signed-off-by: Koen Aers --- .../tool/hbm2x/GenerateFromJDBCWithJavaKeyword/TestCase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/common/src/main/java/org/hibernate/tool/hbm2x/GenerateFromJDBCWithJavaKeyword/TestCase.java b/test/common/src/main/java/org/hibernate/tool/hbm2x/GenerateFromJDBCWithJavaKeyword/TestCase.java index 6cce22bbf7..9b092756b7 100644 --- a/test/common/src/main/java/org/hibernate/tool/hbm2x/GenerateFromJDBCWithJavaKeyword/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/hbm2x/GenerateFromJDBCWithJavaKeyword/TestCase.java @@ -52,7 +52,7 @@ public class TestCase { private static String REVENG_XML = "\n"+ + " 'http://hibernate.org/dtd/hibernate-reverse-engineering-3.0.dtd'> \n"+ " \n"+ "
\n"+ " Date: Wed, 24 Jul 2024 13:07:43 +0300 Subject: [PATCH 546/560] HBX-2869: Create a GenerateHBM Mojo in the Maven plugin - Add the Mojo Signed-off-by: Koen Aers --- .../org/hibernate/mvn/GenerateHbmMojo.java | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 maven-plugin/src/main/java/org/hibernate/mvn/GenerateHbmMojo.java diff --git a/maven-plugin/src/main/java/org/hibernate/mvn/GenerateHbmMojo.java b/maven-plugin/src/main/java/org/hibernate/mvn/GenerateHbmMojo.java new file mode 100644 index 0000000000..6a8581cac2 --- /dev/null +++ b/maven-plugin/src/main/java/org/hibernate/mvn/GenerateHbmMojo.java @@ -0,0 +1,63 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2016-2020 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.hibernate.mvn; + +import static org.apache.maven.plugins.annotations.LifecyclePhase.GENERATE_SOURCES; + +import java.io.File; + +import org.apache.maven.plugins.annotations.Mojo; +import org.apache.maven.plugins.annotations.Parameter; +import org.hibernate.tool.api.metadata.MetadataDescriptor; +import org.hibernate.tool.hbm2x.HibernateMappingExporter; + +/** + * Mojo to generate hbm.xml files from an existing database. + *

+ * See: https://docs.jboss.org/tools/latest/en/hibernatetools/html_single/#d0e4821 + */ +@Mojo(name = "generateHbm", defaultPhase = GENERATE_SOURCES) +public class GenerateHbmMojo extends AbstractHbm2xMojo { + + /** The directory into which the DAOs will be generated. */ + @Parameter(defaultValue = "${project.basedir}/src/main/resources") + private File outputDirectory; + + @Parameter + private String templatePath; + + protected void executeExporter(MetadataDescriptor metadataDescriptor) { + try { + HibernateMappingExporter hbmExporter = new HibernateMappingExporter(); + hbmExporter.setMetadataDescriptor(metadataDescriptor); + hbmExporter.setOutputDirectory(outputDirectory); + if (templatePath != null) { + getLog().info("Setting template path to: " + templatePath); + hbmExporter.setTemplatePath(new String[] {templatePath}); + } + getLog().info("Starting HBM export to directory: " + outputDirectory + "..."); + hbmExporter.start(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + +} From 76415e9955ae27a20f2cdc381b3e97d514531a1e Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Wed, 24 Jul 2024 13:23:40 +0300 Subject: [PATCH 547/560] HBX-2869: Create a GenerateHBM Mojo in the Maven plugin - Test the Mojo Signed-off-by: Koen Aers --- .../src/it/generateHbm/invoker.properties | 2 + test/maven-plugin/src/it/generateHbm/pom.xml | 53 ++++++++++++++++++ .../src/main/resources/hibernate.properties | 7 +++ .../src/main/resources/hibernate.reveng.xml | 11 ++++ .../main/resources/templates/pojo/Pojo.ftl | 29 ++++++++++ .../resources/templates/pojo/PojoFields.ftl | 7 +++ .../src/it/generateHbm/test.mv.db | Bin 0 -> 28672 bytes .../src/it/generateHbm/verify.groovy | 6 ++ 8 files changed, 115 insertions(+) create mode 100644 test/maven-plugin/src/it/generateHbm/invoker.properties create mode 100644 test/maven-plugin/src/it/generateHbm/pom.xml create mode 100644 test/maven-plugin/src/it/generateHbm/src/main/resources/hibernate.properties create mode 100644 test/maven-plugin/src/it/generateHbm/src/main/resources/hibernate.reveng.xml create mode 100644 test/maven-plugin/src/it/generateHbm/src/main/resources/templates/pojo/Pojo.ftl create mode 100644 test/maven-plugin/src/it/generateHbm/src/main/resources/templates/pojo/PojoFields.ftl create mode 100644 test/maven-plugin/src/it/generateHbm/test.mv.db create mode 100644 test/maven-plugin/src/it/generateHbm/verify.groovy diff --git a/test/maven-plugin/src/it/generateHbm/invoker.properties b/test/maven-plugin/src/it/generateHbm/invoker.properties new file mode 100644 index 0000000000..13598db400 --- /dev/null +++ b/test/maven-plugin/src/it/generateHbm/invoker.properties @@ -0,0 +1,2 @@ +invoker.java.version = 1.8+ +invoker.goals = generate-resources \ No newline at end of file diff --git a/test/maven-plugin/src/it/generateHbm/pom.xml b/test/maven-plugin/src/it/generateHbm/pom.xml new file mode 100644 index 0000000000..944b92a6ca --- /dev/null +++ b/test/maven-plugin/src/it/generateHbm/pom.xml @@ -0,0 +1,53 @@ + + + 4.0.0 + + org.hibernate.tool.test + hbm2ddl + 0.0.1-SNAPSHOT + + + UTF-8 + UTF-8 + + 1.8 + 1.4.195 + + + + + + org.hibernate + hibernate-tools-maven-plugin + @project.version@ + + + HBM generation + generate-resources + + generateHbm + + + ${project.build.directory}/generated-sources + ${project.basedir}/src/main/resources/templates/ + + + + + ${project.basedir}/src/main/resources/hibernate.reveng.xml + + + + + com.h2database + h2 + ${h2.version} + + + + + + + \ No newline at end of file diff --git a/test/maven-plugin/src/it/generateHbm/src/main/resources/hibernate.properties b/test/maven-plugin/src/it/generateHbm/src/main/resources/hibernate.properties new file mode 100644 index 0000000000..71496b3adc --- /dev/null +++ b/test/maven-plugin/src/it/generateHbm/src/main/resources/hibernate.properties @@ -0,0 +1,7 @@ +hibernate.dialect=org.hibernate.dialect.H2Dialect +hibernate.connection.driver_class=org.h2.Driver +hibernate.connection.url=jdbc:h2:./test;DB_CLOSE_ON_EXIT=FALSE +hibernate.connection.username=sa +hibernate.connection.password= +hibernate.connection.pool_size=1 +hibernate.show_sql=true \ No newline at end of file diff --git a/test/maven-plugin/src/it/generateHbm/src/main/resources/hibernate.reveng.xml b/test/maven-plugin/src/it/generateHbm/src/main/resources/hibernate.reveng.xml new file mode 100644 index 0000000000..7ac52fd2cf --- /dev/null +++ b/test/maven-plugin/src/it/generateHbm/src/main/resources/hibernate.reveng.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/test/maven-plugin/src/it/generateHbm/src/main/resources/templates/pojo/Pojo.ftl b/test/maven-plugin/src/it/generateHbm/src/main/resources/templates/pojo/Pojo.ftl new file mode 100644 index 0000000000..84ff76a5b2 --- /dev/null +++ b/test/maven-plugin/src/it/generateHbm/src/main/resources/templates/pojo/Pojo.ftl @@ -0,0 +1,29 @@ +${pojo.getPackageDeclaration()} +// Generated ${date} by Hibernate Tools ${version} + +<#assign classbody> +<#include "PojoTypeDeclaration.ftl"/> { + +<#if !pojo.isInterface()> +<#include "PojoFields.ftl"/> + +<#include "PojoConstructors.ftl"/> + +<#include "PojoPropertyAccessors.ftl"/> + +<#include "PojoToString.ftl"/> + +<#include "PojoEqualsHashcode.ftl"/> + +<#else> +<#include "PojoInterfacePropertyAccessors.ftl"/> + + +<#include "PojoExtraClassCode.ftl"/> + +} + + +${pojo.generateImports()} +${classbody} + diff --git a/test/maven-plugin/src/it/generateHbm/src/main/resources/templates/pojo/PojoFields.ftl b/test/maven-plugin/src/it/generateHbm/src/main/resources/templates/pojo/PojoFields.ftl new file mode 100644 index 0000000000..18cf396cc6 --- /dev/null +++ b/test/maven-plugin/src/it/generateHbm/src/main/resources/templates/pojo/PojoFields.ftl @@ -0,0 +1,7 @@ +<#-- // Fields --> +<#list pojo.getAllPropertiesIterator() as field><#if pojo.getMetaAttribAsBool(field, "gen-property", true)><#if pojo.hasMetaAttribute(field, "field-description")> /** + ${pojo.getFieldJavaDoc(field, 0)} + */ + ${pojo.getFieldModifiers(field)} ${pojo.getJavaTypeName(field, jdk5)} ${c2j.keyWordCheck(field.name)}<#if pojo.hasFieldInitializor(field, jdk5)> = ${pojo.getFieldInitialization(field, jdk5)}; + + diff --git a/test/maven-plugin/src/it/generateHbm/test.mv.db b/test/maven-plugin/src/it/generateHbm/test.mv.db new file mode 100644 index 0000000000000000000000000000000000000000..72d79270f88b69518fe17598ef53debfe7371c91 GIT binary patch literal 28672 zcmeI4TWcFf6vuZJtBI93AWCQ-S{NtPPC+O$yV{#*OJr$-L?zisa!8)c>@6{IBxB1V z^r3{d^r_Hq(9hAAmVAOd=B*IOW4}Y`XlG}4t&1bas&UB?W-qg=oio4H#sB}Aqk35> zIC}&4iCA}czw^rkV_a|_AN8M<00AHX1b_e#00KY&2mk>f00e*l5V!yY>O%L6HR%5f za91D%AOHk_01yBIKmZ5;0U!VbfB+Bx0*fUOC;7!BfIYv@vieWyewni6^D=R8q3=H* zmes;OedHf9pWt9HV3~izWRnCiRt&5bhPzMMq=A4C*KwWHlmK*=$7uGzs`OTpWl8$v zg(Tf+v-Mp`dj0D1^(+gps7sPOkbjXbOIN~S6g5|Dc;N{oTq@yG4VR^GsXdE^?M8DS zv;rUY-tIHM#RjdYxG>t@ibkB^(EJF89^udgj*td+a2kiEQY*pXif+BATYaosVy3%I z--VL63r5tfD!MIAxeJ=+7)iI@jXq_!XRz=0dk3_CNZlcuuyJ@TY(46GgXZ87-x*S8 z&oAPu;gP+8)1v$FcE=AE`^tl>0RbQY1b_e#00KY&2mk>f00cfP0u%as+I;#zQ3F@? zoU^Fu>CeqY{RfdERU<_@Mevr!1+N<_&trmDF;pw1|AXnB&e_WJzx}sP`Y39DnFWo|`D_=!?wmPh}^ALS&Ka7LoO*^b< z$3&a$xSa>vsIg0|qc2t-F^CNAlmW5v*HCq{-R*TMqcKIJOQyt%Cmt2- z(Lo*p`y5!yyuF;2@|jhV&)ihM6SXP*8)p8r=2%`L^5XC0p+lF3tf{{OE~+kMJz*PV_e zjn=PUEyvm}^IN7WEuWuHm?|29U2mk>f z00e*l5C8&c0$g>b^taIetSSCIJy*x38Bl9dBcHWJ9U z`G0M!N=O%p=~P(^wo2GdI&~JR|9|{24HsU06y^W<4(R{%7cFc90U!VbfB+Bx0zlw` z5SYk13;nOTiT)3;>bt~q&m^a(K3VAh@qBZl|7Yg^jX5gMr}jB-BhUZ8;o9yl&;RrK z|6}?8?^F5zDcVkmJojXg7iYZBLFFYGZ*sg+--`49=OX)N#zA8m=b!^;M&SqzJZ?@2 zG5R0f@D2iz{!jFG VtpB}~{wErC70;hnInRGy?qAGfE9C$H literal 0 HcmV?d00001 diff --git a/test/maven-plugin/src/it/generateHbm/verify.groovy b/test/maven-plugin/src/it/generateHbm/verify.groovy new file mode 100644 index 0000000000..586fe51dc5 --- /dev/null +++ b/test/maven-plugin/src/it/generateHbm/verify.groovy @@ -0,0 +1,6 @@ +import java.io.*; + +File file = new File(basedir, "target/generated-sources/Person.hbm.xml"); +if (!file.isFile()) { + throw new FileNotFoundException("Could not find generated HBM file: " + file); +} From 17483be3c2a9383d1f3fa54f15040915def4f9c8 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Thu, 27 Feb 2025 16:40:57 +0100 Subject: [PATCH 548/560] HBX-2962: Inject the version string during the build Signed-off-by: Koen Aers --- main/pom.xml | 22 +++++++++++++++++++ .../main/java/org/hibernate/tool/Version.java | 9 ++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index ae05ecb9d3..63cb48c8d5 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -86,4 +86,26 @@ + + + + org.jboss.maven.plugins + maven-injection-plugin + + + + ${project.version} + + + org.hibernate.tool.Version + versionString + + + + + + + + + diff --git a/main/src/main/java/org/hibernate/tool/Version.java b/main/src/main/java/org/hibernate/tool/Version.java index 25206ad17b..12a0deb8cf 100644 --- a/main/src/main/java/org/hibernate/tool/Version.java +++ b/main/src/main/java/org/hibernate/tool/Version.java @@ -4,10 +4,10 @@ final public class Version { - public static final String VERSION = "5.6.16-SNAPSHOT"; - private static final Version instance = new Version(); + public static final String VERSION = instance.versionString(); + private static Logger log = Logger.getLogger( Version.class.getName() ); static { @@ -22,6 +22,11 @@ public String getVersion() { return VERSION; } + public String versionString() { + // This implementation is replaced during the build with another one that returns the correct value. + return "UNKNOWN"; + } + public static Version getDefault() { return instance; } From e80538652b79f4bff8ace6f73fcd0f8a20aadd00 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 4 Mar 2025 17:31:15 +0100 Subject: [PATCH 549/560] HBX-2964: Resolve the project class path and execute the exporters using that class path in the reverse engineering Maven mojos Signed-off-by: Koen Aers --- maven-plugin/pom.xml | 8 +++ .../org/hibernate/mvn/AbstractHbm2xMojo.java | 55 ++++++++++++++----- .../org/hibernate/mvn/GenerateDaoMojo.java | 6 +- .../org/hibernate/mvn/GenerateHbmMojo.java | 6 +- .../java/org/hibernate/mvn/Hbm2DdlMojo.java | 6 +- .../java/org/hibernate/mvn/Hbm2JavaMojo.java | 6 +- 6 files changed, 69 insertions(+), 18 deletions(-) diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index e2b349e8bf..a5b41b5a46 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -57,6 +57,7 @@ 3.5 3.5.2 + 3.9.9 2.9 @@ -75,6 +76,13 @@ org.apache.maven maven-plugin-api ${maven-plugin-api.version} + provided + + + org.apache.maven + maven-core + ${maven-core.version} + provided org.apache.maven.plugin-tools diff --git a/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java b/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java index f9b4c27b50..a1dd133fc4 100644 --- a/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java +++ b/maven-plugin/src/main/java/org/hibernate/mvn/AbstractHbm2xMojo.java @@ -1,7 +1,19 @@ package org.hibernate.mvn; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLClassLoader; +import java.util.ArrayList; +import java.util.Properties; + +import org.apache.maven.artifact.DependencyResolutionRequiredException; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.project.MavenProject; import org.apache.tools.ant.BuildException; import org.hibernate.cfg.reveng.OverrideRepository; import org.hibernate.cfg.reveng.ReverseEngineeringSettings; @@ -9,12 +21,6 @@ import org.hibernate.tool.api.metadata.MetadataDescriptor; import org.hibernate.tool.api.metadata.MetadataDescriptorFactory; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.util.Properties; - public abstract class AbstractHbm2xMojo extends AbstractMojo { // For reveng strategy @@ -63,15 +69,24 @@ public abstract class AbstractHbm2xMojo extends AbstractMojo { // Not exposed for now private boolean preferBasicCompositeIds = true; + @Parameter(defaultValue = "${project}", readonly = true, required = true) + private MavenProject project; + public void execute() { - getLog().info("Starting " + this.getClass().getSimpleName() + "..."); - ReverseEngineeringStrategy strategy = setupReverseEngineeringStrategy(); - if (propertyFile.exists()) { - executeExporter(createJdbcDescriptor(strategy, loadPropertiesFile())); - } else { - getLog().info("Property file '" + propertyFile + "' cannot be found, aborting..."); - } - getLog().info("Finished " + this.getClass().getSimpleName() + "!"); + ClassLoader original = Thread.currentThread().getContextClassLoader(); + try { + Thread.currentThread().setContextClassLoader(createExporterClassLoader(original)); + getLog().info("Starting " + this.getClass().getSimpleName() + "..."); + ReverseEngineeringStrategy strategy = setupReverseEngineeringStrategy(); + if (propertyFile.exists()) { + executeExporter(createJdbcDescriptor(strategy, loadPropertiesFile())); + } else { + getLog().info("Property file '" + propertyFile + "' cannot be found, aborting..."); + } + getLog().info("Finished " + this.getClass().getSimpleName() + "!"); + } finally { + Thread.currentThread().setContextClassLoader(original); + } } private ReverseEngineeringStrategy setupReverseEngineeringStrategy() { @@ -121,5 +136,17 @@ private MetadataDescriptor createJdbcDescriptor(ReverseEngineeringStrategy strat preferBasicCompositeIds); } + private ClassLoader createExporterClassLoader(ClassLoader parent) { + ArrayList urls = new ArrayList(); + try { + for (String cpe : project.getRuntimeClasspathElements()) { + urls.add(new File(cpe).toURI().toURL()); + } + } catch (DependencyResolutionRequiredException | MalformedURLException e) { + throw new RuntimeException("Problem while constructing project classloader", e); + } + return new URLClassLoader(urls.toArray(new URL[0]), parent); + } + protected abstract void executeExporter(MetadataDescriptor metadataDescriptor); } diff --git a/maven-plugin/src/main/java/org/hibernate/mvn/GenerateDaoMojo.java b/maven-plugin/src/main/java/org/hibernate/mvn/GenerateDaoMojo.java index f4235153a5..c7cb63f599 100644 --- a/maven-plugin/src/main/java/org/hibernate/mvn/GenerateDaoMojo.java +++ b/maven-plugin/src/main/java/org/hibernate/mvn/GenerateDaoMojo.java @@ -25,6 +25,7 @@ import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.ResolutionScope; import org.hibernate.tool.api.metadata.MetadataDescriptor; import org.hibernate.tool.hbm2x.DAOExporter; @@ -33,7 +34,10 @@ *

* See: https://docs.jboss.org/tools/latest/en/hibernatetools/html_single/#d0e4821 */ -@Mojo(name = "hbm2dao", defaultPhase = GENERATE_SOURCES) +@Mojo( + name = "hbm2dao", + defaultPhase = GENERATE_SOURCES, + requiresDependencyResolution = ResolutionScope.RUNTIME) public class GenerateDaoMojo extends AbstractHbm2xMojo { /** The directory into which the DAOs will be generated. */ diff --git a/maven-plugin/src/main/java/org/hibernate/mvn/GenerateHbmMojo.java b/maven-plugin/src/main/java/org/hibernate/mvn/GenerateHbmMojo.java index 6a8581cac2..2a2b368efd 100644 --- a/maven-plugin/src/main/java/org/hibernate/mvn/GenerateHbmMojo.java +++ b/maven-plugin/src/main/java/org/hibernate/mvn/GenerateHbmMojo.java @@ -25,6 +25,7 @@ import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.ResolutionScope; import org.hibernate.tool.api.metadata.MetadataDescriptor; import org.hibernate.tool.hbm2x.HibernateMappingExporter; @@ -33,7 +34,10 @@ *

* See: https://docs.jboss.org/tools/latest/en/hibernatetools/html_single/#d0e4821 */ -@Mojo(name = "generateHbm", defaultPhase = GENERATE_SOURCES) +@Mojo( + name = "generateHbm", + defaultPhase = GENERATE_SOURCES, + requiresDependencyResolution = ResolutionScope.RUNTIME) public class GenerateHbmMojo extends AbstractHbm2xMojo { /** The directory into which the DAOs will be generated. */ diff --git a/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2DdlMojo.java b/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2DdlMojo.java index 0e2a973b95..1eec0618d0 100644 --- a/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2DdlMojo.java +++ b/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2DdlMojo.java @@ -2,6 +2,7 @@ import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.ResolutionScope; import org.hibernate.boot.Metadata; import org.hibernate.tool.api.metadata.MetadataDescriptor; import org.hibernate.tool.hbm2ddl.SchemaExport; @@ -18,7 +19,10 @@ *

* See https://docs.jboss.org/tools/latest/en/hibernatetools/html_single/#d0e4651 */ -@Mojo(name = "hbm2ddl", defaultPhase = GENERATE_RESOURCES) +@Mojo( + name = "hbm2ddl", + defaultPhase = GENERATE_RESOURCES, + requiresDependencyResolution = ResolutionScope.RUNTIME) public class Hbm2DdlMojo extends AbstractHbm2xMojo { /** The directory into which the DDLs will be generated. */ diff --git a/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2JavaMojo.java b/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2JavaMojo.java index 893ab33917..5037804569 100644 --- a/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2JavaMojo.java +++ b/maven-plugin/src/main/java/org/hibernate/mvn/Hbm2JavaMojo.java @@ -2,6 +2,7 @@ import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.plugins.annotations.ResolutionScope; import org.hibernate.tool.api.metadata.MetadataDescriptor; import org.hibernate.tool.hbm2x.POJOExporter; @@ -14,7 +15,10 @@ *

* See: https://docs.jboss.org/tools/latest/en/hibernatetools/html_single/#d0e4821 */ -@Mojo(name = "hbm2java", defaultPhase = GENERATE_SOURCES) +@Mojo( + name = "hbm2java", + defaultPhase = GENERATE_SOURCES, + requiresDependencyResolution = ResolutionScope.RUNTIME) public class Hbm2JavaMojo extends AbstractHbm2xMojo { /** The directory into which the JPA entities will be generated. */ From d0ee24f3372482bc61fb0124ba163465dcdfb0b2 Mon Sep 17 00:00:00 2001 From: marko-bekhta Date: Wed, 5 Feb 2025 09:32:43 +0100 Subject: [PATCH 550/560] HBX-2956 Use SHA in the github actions workflow --- .github/workflows/build_test.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index e851ba9994..3076dfeeab 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -9,20 +9,18 @@ jobs: steps: - name: Checkout PR Branch - uses: actions/checkout@v2 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 - name: Setup Java 8 - uses: actions/setup-java@v1 + uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 with: java-version: 8 - java-package: jdk - architecture: x64 + distribution: temurin - name: Build and Test - uses: GabrielBB/xvfb-action@v1 - with: - run: mvn clean install - + uses: GabrielBB/xvfb-action@b706e4e27b14669b486812790492dc50ca16b465 # v1.7 + with: + run: mvn clean install From 01862baecafb7f9c2f361e8c65cf780f1e0a3a27 Mon Sep 17 00:00:00 2001 From: marko-bekhta Date: Wed, 5 Feb 2025 09:35:47 +0100 Subject: [PATCH 551/560] HBX-2956 Add dependabot config to update GH actions --- .github/dependabot.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..2bd7143061 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + groups: + workflow-actions: + patterns: + - "*" + allow: + - dependency-name: "actions/*" From 3b8b043917e1d8fd146a1da45334f8f05666385b Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 27 May 2025 15:35:12 +0200 Subject: [PATCH 552/560] HBX-2995: Backport release automation to branch 5.6 Signed-off-by: Koen Aers --- .mvn/wrapper/maven-wrapper.jar | Bin 0 -> 63028 bytes .mvn/wrapper/maven-wrapper.properties | 20 +++ ci/release/Jenkinsfile | 107 ++++++++++++ main/pom.xml | 5 + maven-plugin/pom.xml | 3 +- pom.xml | 238 ++++++++++++++++++++++---- reports/pom.xml | 80 +++++++++ 7 files changed, 421 insertions(+), 32 deletions(-) create mode 100644 .mvn/wrapper/maven-wrapper.jar create mode 100644 .mvn/wrapper/maven-wrapper.properties create mode 100644 ci/release/Jenkinsfile create mode 100644 reports/pom.xml diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..7967f30dd1d25fe1b79a4a6e50e2aaa0e425c02c GIT binary patch literal 63028 zcmb4q1CS^|ljgjcH@0otwr$(CZQHhO+qV72wmoxial8B9?fnG~W9XQvmB954jDBa!| zNc#NR*+3@;Ud413!#s1`?>g#(_$H7D)m#yN3CFB3#cg^11e^UTu%gCz#*^XWpvA=0 zhv_OXm@wi}1?A-`%mh)oO)C5c54*d;j;Hx>J~Q20-{8Of zMDuUGK=ZHCH2;5VS^fuF{#7USf7SV)p_nN;{LB8YF37*3i2Pr53JJ>z%Loa}2#O0U zR>$x|0MbJVzisl^jPb4zA&czN=0<(g&o&UyWr84T4=|4uM|{fs3Kg z(YLtUYN*=Zu+UU})fkom?q*7LHXqx<3P(R)F~8R@%1CQ0B5J=cpnI>- zsM-SXqJE1&kYtIO)rBAf?r(@tK;feXJAuGe-j3fgzuQ?C$0E>m0sm83y@Rx8@ZV zFxN0T>96)9qNSBOO>lCsvt=An4O`{vs^FtXOKFs!AkC(d1v@5jb!4on&Ia^xq`060 z#y~TtN_*GaLdK`M(OZWme70i1i_k4XejO-YxuDP5Czqy2&bDHCbgwO|Z{U2pijGT| zPwX~BD>7aSOO4n1t#Ozp7;r%Od3G;_5WfOjjGuZGg*taJEqd;}RC^~Wu}mF90d$2K zTt~=w08_tOQqY-sNSXJ((S4Rn2SZ<`=S6U`%RR}3G&?Xt>SDj^0eS<# zy0g!E4fS7fTw>c}(unuGgT;XJNI-Q-JV{1F!G1P+AZ}~}n3@ncD@H2pP->cE0{oh^ z`+zWcIL4cUGj(uz*aKOp`-zb~s&x;9M2d#bspAl;6X&3H`+*2%aIBm$09yxL(4S}B zL@oSsUWC{jwS`JmcCb-CVK^fcTM=8q?R7h64ypdX*ev}p0MgBu14&d3kOIxUa=?I5 zSXjIO;r~p#v$*T49VG>d;a^CuO)(`Q)k)bpgLY=Ue;dePH;m9E`HVDY9(RV$6|hl@-gwBC*_o58EB3i^UnOu{1&W_)5GHNJjjU z-|1VC_OoWS0pR3v`~8Q1UN|Gsg9q7+aNrJ61HMb@=z85E9uZl{cmwCayRa{fIc?wk z{@!?5XKFv)L+_{atG*JlH(V_IS48%A348-WFuBGvXXc_x)@%N-^|c{7%BjJkRssV#WFw&_#Wuos*-24Rw3iI<66*4S571V{UKp4L`&0Bb{&zN(l7cteHBnC~1IF`~k>~v`iM;t`VV&#?YuS~l?sHrVthO}#5{g+CNE|z-pr{ZRQYRa8fKws9RGxJ2pF{zIu}Vs zBI689x!s+(jO5dj*)nl}%44tX=iGAR^7PmJ)e}_0jXj>H;l>+xoP+7d;d(NEU%C`~ zJ=Gf}BC>`oI8PGtQyTf{l6oTnnRwQNi2+v`Ji{&jDcEr88Z)Bfp8?Y=iGC0U3}WmS z#kZtCwBqX!Ltrf4h)YTQqed4-`Ql3Lrp~WCpbz44NABF%eBj!oS^Wv^(#W?;J@v!o z$;P`L>q(O@Af{DHxW*9hV5b1<>UeW1w0Ci#rPRqb065Q`eC}ICNrPX zhyI#pY=?n31kAN#awX@lTLeQKQYH`eR$~7${rLeTU=8pnkeDNfVVK-ccrzSrnvw>7hv<-ktwaXHEg zVzNqb^a~XXKO_+vArshk*svPMtkROB>vOQQiA!QRabO+N&aLmy9()%w+%tqNOnwa# zq;;t5J;$%sPWeUdUqLUYM(>qCExJfvVW+?=Oh?PXWK|&P{?^AZqPfGQ@7(=Gu14P? zqfRSVpKATQP-~?C?PK)f@g%%WCf8PLY z7<%x6icBEZx+QnR$YedgF0pCJi~!_ueV!L>g(pDg;rxF4$PC`-gUN75TKgK{I9|=F zVFzwRUaFNzXS(arqpw(2-0R`d;q7e$=iV-z$jr`9jql@ZwJIMJU)`D-ziYFeUp_-; zWs;=xL6piYB+}?Yjtb~@=K#_)=@A$No)GnVQy)iP9~XdCJs#~^-JO~>-yUC!Pv<>w zyxKe6U+_&@pLJfnT|empr`z{F&fUkWpeQ;cSNkwn&wF3{GFv`vo!#oXj?G7#10c32 zd_OoW%T5=3tc+X8GK0WerqZ^|3yvIi(DT8ua-YOQ)5pbJ)=n^N@Hnh}%`QQgGf5mR z<51_{ImspUZ^9SmjFa^*sq9`bB*Vft&0D7-G_$E{?!a@oHhA1>AYRLJb%;(uGMt#r zL77xwdHA^KP8OSHdb-6ORQuMh^yo(;=N)?J6w}oY{K^=eH7k9_)Qj5H~B0o2Fu9cr9MZe!oLZ zJKXS3fuP%-Kt87;=edsS zkX?LwZMa>(Xz3G}%%D#mrb_0|X#h9p3@(Rlt&BOVEL2|9Qx?N6S zf-`Jn;dj+%iOv;(w{;J$3!F-=)!5}qqwVQk_{DD+cvrY?NIFz)#Duoah?q4aYTM)_ z?ShHG-r9?jk6-hH;m_1hb|xuBx?MmdB%4@31@$R~=1HQ>$YVI**pp~|Zk8#rJXdoI zp*OOeKHuI%jW3V4Iv+uvEo!-Fot}#YL?WmfGfe?2AGz3mcf30;!ZG)YI?f7X{F5hg zB#K2uo6WCQRaH%Owi`sWm)6F1FaC&kClAtG10c-fwwCs=_Il5@XoBYtasSR2Dh=7E zCDNj~K;AM)!-xPTPf)o?Jja_xWr+hI#BU*bNxUg>yx{n6BEwN^c@I#x9U~H?{(H4yNX+d8 zc*H8IOfy1c<9p#KXm0&qXO50u$Os+@!G3G?e7600IDeT4E;6vA zuLtv`2!g%Lc00V|w0&53e<3K95bF-iUP}{hp@e)6a<%2RS-z?V zZGJUvk-yJ*=y#zHxwmPta`Q6>*AwB*WfuF%6#Gs4)MfAY!=5Mr&X6d*Q=THfm@pc= zzx7EoFty_RRQr_CUYCy3Zvw&)bGBG8r;>NsQ8?k$fV2pkGC;u;?$r4TjruCn<7VLP zDXI;P=8DbqQL4#u_N*w&kaSn3&3SA8O%v$Gq{VX*;7daca-j08&SG=5boIglQyDWE z_cq?JGQG+^>}cTa@vMxAXq6@nYEyIKZIwD{K5N}e5v*3qQ~7!zPT+k^W{4o{izMs0 ztEARKN=_E6!E7w8KZ%P{F9maro-7uaj%IHfyuFBQGfpE)Z=L6pbwzT)5Sii|#rEb~NyY<}GkAj(kqSCOyd z4b_&!{?x-A)K8udIJw%;=XFXC?#M5OxL;LgGiAmc?+FKvW~vs7lm%{byFMkd9cIao z4Jx(8mB`-Vg7Wv&8ZO03lByZy3C|899iMR#w7UTQWpe42%6YBcrCo-Y$6L1`bfJY~ z5JOu+(y7(%+9hLQ5uyE;f6moHA(<-`TpvYjE~S7?@{`<^hV{8f;GC;QbS~&EG~fmg z+ywgJk!APGV9!M!fjh#tz&8zs*;0SQ{C2aq?9C`5i;?%{bP%4*iVk4k(59Q3`s7K) zv(A;H4@U%ys9xLz*2ZgQckx**OhW*hZp=f@GNP{yRP8tS-!u)-8#|DsD6wye?>^{I zY)Mm%1+n64#5cRT-gvhPmL^}E;~SRUGY8gHv4_!xZ*yc6VWA(?s-u}(54`eZ(a5r$ zB`NnMB#!{>rmd?bCv(qi2ADuU4j!*CR5O8UOjDFo(ck6zb@zb17x=bey@bPRRncrU z;;pNPm^E(QGHmy=PDas`FV7%o?T?Egmb+?Y9#}pgkQ_a`gsSNYZ>(+jha0`^p!B4l zL%0eA6RNAQAO_gK({_A1fZh$ttf(njb(@|dy`Cf+BGpd3Usc%)TKA=+B{sNRbHxJj zlKDE`Nkzg-aJbPeW{+OGp%*RlF0sT%ak%x69+gI=Dx+q1Q^%`o#)R4;I09!7*-Lcz z!OeeKjxzcF$s+kkVbOR?u^j;1g$a1)2_Wx>VFoe9ai}7*m^3A#1GAOJ3zt{!HX$PQ zE@Bl{>%>7tzLJhxP%$x)s@l!w3t{nw*?(TXQiq&adQx0P%;m92aV7DfA)mNgC!Nd1 zjlw)l+G2c{+zRR3;loJRwwe}u5cZA`m{;Wvq~Yh*{21_&9M z?SewgY6ltZ)O{_YfKK|`C%7qkOn{-A9`HVgF2}7R4dkFA3)(G>&xri)$t!R> z8P)rEX`G9@o*nSS5VTb~%=VD=Vz!{=8ckgk=Y3_HC%UJKoi0mL#J7+cdb$wVcOS#E z>EK;ppk-d8B^yy)#606&egEqnbCheJtZdMMZqfdylj*0D54veXypT}b9Q}5C>O(r? zs&;SD9_(EX@Z)?PQcEFjr`zVmu#OHoXnV@BH%TBCtuG_i?A|Y}!`30kwHpqPrah@e z`L}1uESK!wDBZnPCys&RZ=4;D@(1!ykY3?1jo1U%SMFaOVb-re-(oeq%=(s9U+I=N zi3kKo9L=|oMc})_BE$p9m7WI~7cZ}RC(=l&`MQIPfp?IVX}NeQsK5>RLT1pBfU9@v+`M&N#vV$KazbGg*VcO0?0o)fz2iR%1zVwy zwPJt(0D^xDI}HD9@)R;Q(Ra3T60&u*v9i@SGIk)M|M$65$yyeXAI=8_0(4a0GMS*q zU!flOurF1XdFWUJ(LfWk!Ws&9YJuh|{eos)2jA;~^bB;^Y#;Vk6y3B|Ob*Xq(#FNa zCdb{x)bwWc=7#qd*DxcbAe4IXCe6;#bc|i6m#mnp?!&fr{&qt>22kOYH+u}42vrnE z9oL~D>tEqzo7c5kWZWRkGvGcYdkE2>QM-?PmL>`6`;tH*xu~W%J0z zbU^fGo8ewfp!(F8B!WH~iNKL_+l=KjESf?3Wr`_b%ts061Jt6aoUQvhM_^{VlqEF5 zae0bfSgIE}#n*Mqob9U%UyhMDv%B2M2J3S?qe)Dh{t*JzSu@sEJ=H*rg>w6`_IYjz z7UR-b<7}`#kK@w#18i)<2J`Z&^xXn$aj{~O{~;OLII5c%19O-Fh&tYa6iY?cBRs@M8eRc0RpMlkw{XfY*)P6N?fY|9EyT&ZtncfPG-h7PUeRCPPYHP=&M$= zv_#}b;%1fZw9n+xVy^Ge*wjc=Ym8QrClC;a4^o0$4tQK-!cI&!Vx5wCe^rf`0|EB+ z$FxIrx!z)b$!c^p@%es#2I^zT*$~qk6JUtekAhnPRCX2CT*6qe4%a^G z^pt4YRA{ffFFa*>vZy;@1*#`p{v6>iGq%(Q?yBNOcWCmhTbPGFv#cd?$^#>$<=R=K z1s81pEQwBKI6)eL{6rc7JAkg<9Bz^K!j&*K z1WZJsDc#$J&}S$xgXq0}mO>D@P#9H#1%qrqCl6D}(WO0^Emdd}v6CtKMw7so^n=f4 zh+qYqeTUN#8yKP9YOy1YHlNCJ#`(3@4nqN*uabmt$(257t8BHB!_3JdI`%C8r{a(m zT?5>ONWb9x?OwXHnR=PCe)}*=5!#}lojl3(*q)&rQ%B5A^Q)FLPb!Te`=&E7s9kF- zq1Tp`G07n?jUst^mh?FlY`Fg%>{(<^p80Kp5qmsq5Gh(!;Jx`qQrWyg7hS_mh)hc> zlW&P2eF>^{DyK7XsAc3DJ)c8oqnKGEuskVGvzjocGw|k(Dok#GyoKdu?HFe00#>I zfbM@3p#MH>s)OqxuBLzIP+N`|2=D<~@k=1pye0(*(r|*Zu=NkAQX3lL&GBPw0=kQ! zM+3OFo{^X@uyCht>s+>MGMc|onV0FfXA;=$TM&IRSCSIa@e?< zwgRbcTI;+qrQxwr2W)dF!IHR;9c2u2;TXc_W*4u$P|tWQ6>C%{GN>WWt!1w_Q1{>! z)P^-*Co|!pIKfcL$OycN)?Cf_&<$+5LWk|!yVb@on7Fm3^hd2*R9H#xsp{ZxpIv;9 z?@yiJT2LlZm++v;mX>ksq1PY!hk8$^?*tJteXL!6tqWv64=HP0y8F``jhRUotyKpXu9jEF&EU&n#54ZVOKi}FbI zq^64=rgL4;t&D}>cF33GY1n~2ndVM7%mrsCLf0NB6V9$ebwx-dA~w1Og)X@`Tobc} z5F2d*&3%(IVH#Gb)=%7K>*d9S4!Z}2BX6fPNZ%#BdyKrtW;Q)F#)ZaKy?Kn_FPUyA za9n+Wp&+KXouCC&Vz^e4Q#?ya5Jz%ZZtNp>mxb!pFqSw&G9!ZYYf|em&2>@%&qc zV$32fQ2h$SMt6G1@S0pxT<;*^A<~jt;W#Tql>dn3^vo$YXSS$9ky=v0dOQ{WL2B2G zOsp?R(St>K455jE{beSuAYxHU(qZi^Mlfx36WJ>_9k=JHdbilTahdOZdH~ zIRw$7UAUi9T{MN}5t(7VsR}(dpI_t|5hEu_pIR~~3Q_&&a9#x3t47Z!dYMjWFW@u*n_ z_99Sf4KFFyMHI>G{o4Au)UKb9QY{nSsy)KjGCvCp(=2{T5Q@&wFMKboTsb?L!Ps5V z@OokQZf?skWs$Wg^CHQ+?jB>`=&rnd#i+tI#?(ZSx2BL;vAVLDqiRWAFPXuUJK%FY zOm|Ap2=o$T<4k4HIH4s+jGi!Bd65o>zA0oZ96G0sqH-f}oN_fiiSKaZVB^^2%ohb; zLLUg;>fK37-;9qn~e23?E!yzE8wT&jyd21d)o0 za!&Ego&a8j+fj_~-@X$rUgI61&M(e$H*1BHnLjOeDCNuCu zqd1w5a2aPCy>2NMLSXrP4eZJ??{B{90{@imalY2{Q5!3jm^f!T+t4$+8Dezo^}Pm; zu6@{GX|=5H9J*-Mno}_k3@Yq&5poVqQ&Zxab8nS~y;r5sX}MT-axqOjSe798`u zzGwws20x_lhrC=gptddhn}*kt!A6FWtc*_(V}>Yn$PI(Yw80e#m`9>mJa00}w6*Ff zTRk4I`dHZ5-;=0tQsT0%JC_+S0)+(L8%${~T`gG^t`W3Q7-W*PL}C}$Y*1g?V3RTc z84?m69DTSCE5uT0xWR7a$Xd;gYP6hqZvALd>VOl>mxR0YU+CFwG@LlKz{0jtl|H`5 zcNi!x6^6C-tt8WWBkN)TdZLvzA=T=Q*y&%l>BmaaiVqh-A$DZP8~QTrPMLtc#9Xw? zF_XE9dCvgO zrdH{nq1j_zJ9z#@lFn4SWd9(RzoaF5x*lK&VMtRN)}5T}T0{j+EUC=2Vv(}OAG?h#^~K%Lr0^tO(_Rb!~MokwJ^Ch>(Ur6K`r5o z#CU8Hu$E@>7CH5|dC4!0O_!r&aQ8_}U#tP@xNLv8>@q<$pDLhNtqUGZe#HZ9Eor-? zy%-Ok%nh1?p6V}PrWWTeKTLLrhnx44b|q4qgBy|GZ<%=On_>o};?D7hS8IOS2BfM6 zIOy}lHld%3hYiTrnMPWpKP&uC>oIn%TAHXfI(;LSYTn@Wj-Lf`&3DhD^QoHwUgDPrE{<_cpgqKvLHy6Vz9cnm3h)t$;9I zJ#ndBd67K9O++_=HR!fB<> z_xgpB48pde(kltwV=dh-0m8I4yJ`jXkPVn{fS?Uf{MluWS~xab^C#M%=Z}+z3ly9|6 zzYoJE^nz3JNAz^-?^y_y(5esVWbn>*UF^0ZmDIci!K6~vu% zB){g9=M~lk)JzwkNM5Kv$waCr@6^NyWh(7f&eF3XdENQfKHFH?14mG zr#;x@E;M;;Mx9xx{HXZEk+VU8leBk5G1c}J^XVFFUvnFC08V;ru9WUD(}H~0Dg3!7 zC;B=Y@hb9aizZWxbmuyVz2}>7;EP|PlU@P)qnVJn?Jv{sOmM3leqaWK3Z(dSg?h^? z>=nzY^Mx@o3+pQMyVZ;E?>?Q-!e8 z(*QewT&Tz&!-Gvv;!GcovU?!(WFfC9Mousf(j-BR#+JFx)RPb)rbA(9Ply7X=Q@R8 zPc%kgiM9xM0gA2oayk1!oRUv&=}+_yF@$F`*)|N=4vJ@Xqs&`VK^^5u7+`VC+rsvS zrJ+d=SHkc-y}v1O^I3T%KD?s#UhSQBwSZMzQi^xT|C}2Thq=%nr$9q*3O7V0E5q#w zhf>xCN&0iRJNQJ3D)Gp+cqdcq3RRg_;6{Xz@PrT&Oo+PT5wMJ#3JP@z^8~`%H+oT^ z4pGC~UtladbI-DplmcFjmxq`MI#8fNla!`SB`8{mI#@{8CGtuz#c9D+pG*$hM^3&g zE&0>C=XthU;%A%XJ?PJN_A65(#3 zTg%THo##PM1(9os)BN?1?RwB>ZgyT^{eVG!X#|Bklcoq12)$9EGHbDuLpXn0Q6_4J zF9V;#iKJ@q)c&LUl00l1 zMZf?6o_{xlGyOC7#q=G`_^nKB9n77~tW}I1%uUSycLgq6McWlo7|o~TEsaS#4@qKO zMUNZ_;XNKugP1=KFquyxeo3IbVACkUO5A18q_r5r$6@de)vb6G@}k&H-a}|N2GX|c z3Du2D)W^?*-`jLCDWwGKDa*yg<=DM9=Ox?y;b9RM7tjs8b^Y_53j#IUcWPx4w^EBF@k_a0p(b1ot}y@%Eao} zOui0S6TPKs1bSXhf6Xi+y-3{!n}O^RVQ?-1b+Qk#Ls3ksXr)oXFe2rQWZVah9Vs}kZ z@dBPjqplj=yMb)rR46sTdu_Ikf7WEtrriqBI)KVrSNyI)s34=IECA?~@v!jW57v9*Y$}YS!Gm0niR4l8)a3Szc?pM$9xE# zh<%2FEmVn`XO%vpJ}G%Vawzs^e{76QQ1bk(PzdY= zG7~8yPR1<0Mnb8>jsN}?Ww3or!}%w-n@NQIj|yFgBvdCAC+^~;M+u$*vA0HAJ-ViY zMPjy>&Kgp@{xMa^ipTF*`zXdHUe31Dj2L-@Qd^@S*J*(?y;mEt(#h0hd>Pu{T4+g4 zjg_*v5^+_5@E{!P6^APiQ({70J0gDcN~M-hhhn-8IQL($C%*k;v43a}^DhS3KBs8@IkHGr-Vyo(pu?5XCRb51peV;S< z!4(f0h9HY^^&UmaY<;sOOaDY``@jW>rxPxC=WWoyobaYX z(;DatV_Iq~MJ(KSS<7q_Fxph#;Dbfw*{^%>`~{^NboxW#9UazCZ-uyyQDuu`s2fGo zR7Pee4AL`75ynDxyIq_$?He{h!@13^aH?ntWB`AxX()FjFyR4c`*UoFEABIGfLPED zZ`eBhUzz*;(-=Mw!|fPKZ(JIqpaRgk`RdSRTdNouqN7{;Hx{?_&*lB@ml=aH;a*YI zlDQIGMGnb!p32{1&{Kp6uzy5n+c3P)$hHJ?g%F7z?egYX;cTE=S$qP&EXtU@-15Ya zs6oGA=jg62tu^}g9sy&f4ql5l^;ue9E6-D}vpx~Bd3UE%_VPk6q+>ri7Y}|d%kIVl zYh?}Ae6(@V;Hv^o#^Jboz}|3mNY=9+z{MywVi&M}a!vEZHu7(PdIQ&os(8+eWVbfQ?xLwsooc%7ue?-MV$Y{b8)V=K1+Q7|5-7r zRu)(MOT2$)5D}q=z{zjPFNFmS!@EKkgsFu@@P!{+nVJb4&?RQ1%ocmYSkqMv3KIBw?_PwP0DoWo3u ztv@|c96@Na&_D)+?!nU^E2bJ!2o>LBHO~iuZC@mP$wxXk6a8m`7B7~4FHDZ^@{H1o zDQ$00fJRfw0JUR(&DsF=nZe0cWd71sNX}UxWa#yAY5Q}j8yuqbR&!Ge>jRyGH4!6e zJ&>fsK5Pk@7OZ&@`V2A?<}FO$VN%YL0pX~WRK-djy!hm}LE1o0i<=~7mrT$>ojeIx z@Qf7+8XZD!KuI7PnW5Ur&8HuUbgl)bxn_vtDz2M*vmhiHCTuoX9O>&TLYN}FJ zHt_7RO#Fw!)x|&=1w+Um>pasC@|Z_!cp5iH#;p@cB}kq(kz=Cd#hU5_K8bn*MkniZ zyO8JgxJ_7_2MKPB!hEQGG@a_fXd9%5t{G3Mqomi+Z?a{m*7KJmyH+ddRFrb1?;1R` z>mP*kUTrT2l@x6p6>pBaV1dM152H#+G-4#fmCE;)GGwa?`(n~$_T`BnOHLiUZHFtD zgSG*?CU@bqwu%nnh80wsG6uSb8p==mP*8ucIl)}101rILQss+6<)}X_ScL8&Duqm~ zb5@VAT|gHAoN0~q|6|Udh-Ml z6^f4vqGgD(E8&O{Z8GYd(fP8s30^wYg%V6<2yEJ=61z}ej2bIw3x-Zjjz+ojzKLPa zMN!_vJ^e3ibtCmWh9x?+CRWrM$@N6R2_YWf?_e`O5bw9We2KRKF1=xr9z9W6EZF&) zy(PcWX27|5|Bnq=nza0YGk<@IY9a&x_?JJ+{-1lA{^R5Nw*_Uk2BeA} zS1X1}tBoe$b9k`{%4Iul#tbmG)GA^H%s9LbAiCJcowfoMU5Zf)rb_F3s1r;pGqq?fiQ(hb< zH}%a9k)7K$M9m1?`_d$c2t`HBQxVLLX>OB~V@Q#qj{)b>pR~C=8ON%nm~|PeIo1MQ zqTVUroBi!L@?qu8g=X-_tsdshrV4dR)&zI;Gcy_c(;v$CE255Hl#s^6h4Lc^-EsK{ zG0@oHlPJ~!s#jh#vBBf64bBQoB(e^C8iVD+%$|(od_1qE`n{W;5~)?1IX`HlBB;YE ziwYboLn+1CYcqnWmqDWB`Agb(4KCuFaPBYL`P$nh$gym(; zO-_Hgx)7A#0Xz+VktMT30iTJ~5{!CBJ?IO}{8X84dRK=Fc!`)TH5RzMs%n#2h=iyg zgpwgHOdhr%%)HKd$ewQ(S8~+?bI%VRI%)yYzlGVxx@Kptt@Q4`WTmAfMN&;UgV!R{ zFxdwih)rzvNdweuKc=cBO(MehcKR$p_UyGu;zD4NzB|?VSOa@?&tpU@j1kJ?-O${{ zmxv@C3%|s1s)lkP8Y0NHKyEQkq!3Ct_}u)S>})vWrlxVjD_^LJB1G}Pwk!$Hf-6s zB3FFSzzbSEO5=`7Q>Zgmf1s0n8sY(^1_IjFE5dvWzj27f6d&D$Iwi-hDvyWSXzCr9 zJ!?Gsqryy)eu8hZv!3Ux9vy;w)|Oio>4){?o|Dq(>aFv!ixxZ>MJbjIg=r5to1xOZ z^<5qIB{Sv+=d{rZSGcYDYfDV29hGttB7Z&wa^PmO^<)YQMwR;~!m_W3oiIw0u8WIR zIJav$Cx1r?{Q_{)K0jg_u|V=kK_E9T3DN z(rl!}j1IcC1Os4{>uJ7>KJR`rQZ=r2_mI}PE2g(VaL`0o&;qwwAH!;ECKF0{A@QJv zzSSqJlle1R?@v+C`75i_XSG0MfgV+NMb%SDOz)tq83`dAnkuB?pUv_acga!SvI_xz z)3Jzj44({zRebAxDv$o9M1ppfoi`V3eDvgGQj=P(p*yktF%4J`jPmrJdJznQe zlwL%oXy$Nz(k_`rje5Oaia+S~f=H(k8r|g~ZuZv-S8lD#P1y){p4dOpKlnX#IE{_n zdI(cujT7@8-?kG&S+*MqAuz1pvU2tP5ut!GIS*DLMil6u@$&~?Q(GDV8=e7eUxR>{^YWBXl@GZ(=qv8if6A;UC-gyUt%hK)dQDm|_(ifWb z$oehZI`HF*M7pS{NKxG?P(xOYtn))s^Ig|yw0Djvl`6JX{HqIFgYnDQQxh;OK2vZ;)RQY@L?B4)i1c`aq)Ul^qd z)=2K2bSO&6ES5<0wnjNL56X)ZnPC20LP|?Rvs$>!xRaXF_Y_4eR13!SRQUIsD*G-; zJ<|!T8RZWXfa(=a+9YYpJTB21_Rj4z$O__%nfjW0WqqtA{AN(2p3{fUbz&99!6eKb zS%r9cOq9sB>sE*?n(~eGM$ZYBQr4QqlkFASWC~XT4*ZA|nk@XCA`lF_$; ziXxKrHj`}9*waoa&2e{^-=iQ8KR&vIz08 z?-A6-l$c*M0IbzyrLm~k!EQCErpoA}KQc4vX!UltTgw93@@{6V*xFidEHs!}dT)xf zbgr{N8YK3KkEk}0dr@begVrB06)p?q!GuhwxZUV5Zj?|&or@!HwP4QYdC1Ci zC@JGB$pF8mnU=3bufr^PZ{3KhPaigW5}wg=y!~2!lfA(DD6Tm+%n^EG#2mSrhfCDE zEKWxpX{&V~h$zQI-?>pUL`bd2!o4;LCh^Iw_*&#mxN{2C-$47b1ggFqYVJRDmCOUl z=DL=CU|Sh9TTg=%Rfv*;Fjv(>vE#)iq~QH9{k({(m5D{9eY32tk|)BVx*jhQJ*G}TR)9c7&s*< zN^jfLs0hdw^T+HdLBw?gvr4DM!fCUkK57J)%RKNxOv!9msagsw|&pLd4FDp(f<9BiLF|$)BLl=PAcKn;azUIUTm;_?5ufo|Ujc?{8z=CEmtt$6@sH#D}bS4$fTDYt)=FnVH`3 z1Sz1yzzO~&o8#H^i`PcI=*Zqkkore3rd9d2`&A?*u1NK)sw(P7|fiWtfBa0S#xIbFL73MTZXpHi`~uG5c}@1a0to8;p(nmA2#Pt$O-qBXl>F zVn`n?$L-SSU8qpuTXM<1CB%y<;p&lNOtBR>sbbX^9^%zh_}r1wc0IqP_%D_kOI)#? zm_<(YS_kg_MNca496}xCb6OXC!TJQ>j2UiV;5k5-o|Zj^i804iDe8`ncV!>AqQl;5D z-qbPX-~pxL0&tEC&d!NDmOKi-EbTqloev(>%LPJ+yvlRe3$Z(&JS0mH`ch1ffhP}7 z$Kl&StMP@qlxP()03Lw(i{3D+IusongB><4SZw%_v}{nUs=pY=rr(vNFmZ;?S`a~- z(Qm>Yy=4zWi!q4JI~K+6uHxCrdDrIR&!t!EpM_{!9ZJ$wY7_6AaKFX7tL+%NwP@S5 zK)m+skH5cH$;IpR@kAx`1XT1wY54_pd_x1}igpIwc|)*HO?*8@0r5ec^QthV1-Zo1 zL~Q!O`OXOiJ9#V2dKa)XhqAD(W->4a;xY_Lu_x$?&|KJpKWT?&?(s`D*ZkP->gtvarqw252h4{;~nT2 zL*MGi+TwEc>`tBT0KxakV=l!MR5YOetu#fX(V^^AKMh$F)uG0_t^ zm?$4MMe2H>Pj76t+e0$`ytUn)(ng=5Agvebs}0KqB1&?ry7e$!?r1Gl_Nk zQF%$<&{yf!w40N);CZob*MbrUMc&CITn0M{Q@)5gZY7_yUl`AMkVg7KGNR~S%t_*^ z5Xj@q%d4P&*APoZQMQ(cjuaPFSc!|q$qfg4G6vH0ZR}oAU>(-Ccw2 z$^hJ_#D$~Qy6?f zOO8D}y%>DxPh;poVgxRQC1aM|p7IAck3IP$fn2h28cXhvsU%qL zV?? z+5gd%f|bwZ{;_K;p|$SRwS{i>BXDdMHTk`>jxpp%xP~^6!8VV>=cFQ~kzE$*w zVNf(IfZr9yoUw&gp}3vN;!J(%zRt>e`8Xb-2ZE1NM-)^Mlo5va!~}PH;bXVlY>s}c z)>VAO^t}HbQ)Vy=(yb}|Igp@KU?t6AlyjP3w|AFt0gEr)_R%0?*sz4K3yn5}m`U^F z!*?Cc{k?3+CnJ6Vg0RA~UwaLF>^_R*Pv4y z$K%UUSLHs`Jd_w~6d()GHbJbk1JPv@;yrw^drxV3Om+0)>a3;_ao9KU07RMAr z8S*Lhawz6d{oFw+-p3;RcitZbxOUSKYSZB$&14p;*ziTzON1(Z(n_NjHo*p3zwHeM zTG!Z&K19X1zHGN7M7wQ@!C9^D!h^L>ci+-}4W-n!0{ezc_#*j9kpU(xhC0IQk(O}h zt{O|!d7<)7D_olVW}`2y=YR#XWa^7XC`Jm`ZKE@&Rm7;8{nGD`P(uF9oyViHKf9a+ zd|MIR{)=Vx?~IDW%drX#mjLGm(RLJqJvv(JAhm1&kA`N)(1~29+%b{|xTaW(*)8`f zp)L`MP#U0%uoLxXZVp z7j#LUD7qYOQ;}zoxFL2xD}^k8ycCpv9rP8k=4@qJxV5MP@QeAO)Rf!ckGQ$qS`*S;WeN4u4(X085gh^<5)?sf*|-5Rj0jR9B^=V2Ik6a#m5+>mY*=cf zILGUX^GoyU<{28E7iO2JekL5}57nr0J;V#}(9dRvYPPaqajQ-^oW+k40bd^i90oV& zKPl=D+!D$c0_66xRC*eoSX7j&c2-i30C0bb%TNO({*pKJeeIlXIYsJMXph zH-Sxo-CQo;3ODLJe8)ny+ABdNrR1Se(B=D;`hrdFT9!z(T&_XS>Y5h9dpam)tyHHe z%1H&fZ0aJ^$;ef)uVZg)gNRxi%d}QP&IMg~C!{DUi(LsZ2(``inRB z;joa`t{#Ok=kI*eqR`ZvLj%O8z6V;QZlJ67x5a*PF+lKJS9J`LR_iwP5sCacWqM%G zVQwyx0b(;KY0l%l8jg06c$%kc-~>Ks+#eSp=bus4*=$)~AF^A92%Ba^2(Dv5LQq&L zY??z2%4VWVQN4f=d72L*xD}z78=;r(9zoOHorY(_D%63zb&^VT?O1?GAFm$>Tz_|A zn$7F3>so>-i*Ar!m}e690dre*5j`o)m%$F$4AY07L}@ADNaKCs@YUNZ;{< zWHpKF53^y8e)sf5bX<2zgNXke`sZLqD-I%$t0r$APR`2h{y$#tKTGaK0GXJ84a0(fVtRC=_DV*XV|S}O3F z37(-5+@#HMD(P9=&2e<6=Q!@TR^zIyKbud$f9lD{pb&F9z}TtWkfGWQYagjePk;kk zs>Fh__G}}C4WA6)9;XN$Cl=A!DLceI4DAQ4`S^nfR{m&1zgD=BL%r_r1WTE$v4OIz zPqSfMA20fX{A)^V>|$_kdgdDS65Rf5Zo>ti{ixR^-}k2K4TO)P(a6xbg~ft7&@mGx z{vk4S=Ak_~t@Ipv0|3KU{4RJ=CQR6cmx-|{_<2D`TKmE z@{y%-OiZ$cwWT)O4QyilrJ!oX3EtuZC9Z>BgSFb4f_*`~iv;kEmt19CaXyUW zgVkKIY(n~9X^1>c)L5Twq+D zoL#)UJU6HR99&)*7CVK>MyYACS^Qf2a2Xc< z`CwlAkjCRDGx(v!LNEepn8S%iuu0w6nta-`u{frkuX-lU%+~RdwNeG`BN<|W#g^a- zLKic2{zr=WE2CE#SFT6PYx<*vW>+ReTn3T*Xi&>>xZ7g272Uri`0diE9oS)~`12tX zWMlj5sYYcw>w@j+fel z7)X^h3&N$sp*as!2hCwerqJ!=j_|@9*ZN=X&g(Y$(YYq45Y_SL4nJ^4e?03@s)a8h z?0d&J-mr|waK6(aTbZ8r_uZ~1IS`IqCEbGI)JkL49=i*VyAzLODh+4u1;zE`Cn(8D z(TY#*YWztLYMU`E-(}t*N`Z#Yt(YR95=GqsE6`eui;NWg0hJermKiXw$2la^J2F2_ znbpc{heZueUO(S#34EM-c+2PyT~Y^t%E^u#NAoDL-vgzq$myT1puE^l*H5`l7rWnO z(E``4Ht|SY<&K7fI>``w+C}jsn`006x6qMXS4D2~R9lKv95my-tBX9l7&g2Rgv8nv zM3!HP!ZqKsrpB5JA$0EF<&LmDH?MAaEl|@Lb;CP`It3BRP=BL+AJ1pOC4C<+p0rYw zl0K3wH>_M0qh>RVY?H7y1N*(IML$T|bggFH2s`NINcRPlS(>lt@av5wP<#ChqPO;E%k>v3tvxL3 zUIi!yHm$!u*s1fO{+hZ#s?a`W4N`-d;y02vA-WQX&MHkjE6pYp<&jyaV4~njc}Al+ zqDv23>AK19!jj)EXL$gND}knvf}u%8klxIRynE=zKz8{6U#IupLVA1eIH1gN!o#V_ z8QwLW6TbdgKz^R&)gTRjI)JXBKh74KHmDh453ZHl&n&eVw9Bq*(F8`v6R0T`fo%m2 z*d!7e2yVwD42JM9{KF-JELx96HVzrh%aQPKj8xMjbFo(zgt$zAMd`sxWu0M8^c$j` z7YdJq_)Gg>(G!Yp$nj0a@Mm=qkV!QPo)P=^p)M_uM-Cnc&Se}Zj#n4C2VKTgs~EynKiCCS_{pP5SiZPcp z-IJ!3L8>P;#?lZlPtKTJ9@c18ee5sPn7iiM$zvxVJ%PAb_-y8k;Z>vms1 z<+@Q+zr0*gO+YFc`L-XpsuUL#fKZVK`e5VAEL&pjI&e|)NedRa8_1u>U*T?s6k+ou z=-rNQ_C1emr?+=}K4SM$U%1;VI4b^C6ilAwKu0GE6J>(h4n1ZXhg>2~E_+W?ux$Rx zN|S%oe_s!id&9L5CQKR@$IbX`fQb zLf9rO=Ou-_{HDgDXklMsXi*+2X1*l8Rkk`$Zz;8Ehq{CYxcrg7DI1!ga9t^qGfkGi zmD30<1tAcX82dknJDsqWZxQO^E#%pl0^mll-J9Yd zS2G)>j(=|2u}@W^McE8+wl|ndtkRIwZj#PGjl#85`9#_L#mlALgUreQ`!5D9oiqVU z;%_d_&OgS}|L^nvPalbzruv2$$|pEBNtDJuNlB4~bYc<)wta$WuyqhAhY2*eQbLK! zFfjFM0`ZtY$MsuA&1u5bB{gs9P(G*4&YSuxx~He7xKdP~tNi>=3$a44p0_QNtI6E2 z_g8MekLSKnD0fhIQk8;;{Jn%O0&%4VHgwEzeI-+xkcz^J60H$Tp1$QV%dj%E-9!bD z@O)ABBO*t!97(G9rmj5mcv0bLV-#X0D(x}b1(o^RBtwS9^{M?tQjE7Bbit|W$_)~WXJSES$}HONK-0Q(xy-d)__-IU+^Wo*)I_}mz5b`Xe9xe16g!p^Bd zKWF=QorFboFar*8Y1wd+W+N2p0d&0x5Gg8Eg4pX|&Jtk;@PR!VL4ph@%JQ@bZwhrN zVwz%aBs`gS!{kC>dQCzbHx_DR>Z zMlgE`#?o92W6btK{gQfBz;jq}Q$>Et=WON3zwkZh$n*63EnpPtBKKt0yFvSARll!J zTkd?bn>ar~NMQ`qI4E|Qz%&wHUQeNVZqdb1#Vk|?GQtpt5Lqj-f{fzH+Y$w%Q;_il zqj-Q7gH{2Is0>pb9Dc`bT@Ym!d2^DrmLhFFP4uK=Gtxz&&L<)y`YnZUb9!`UO}qeu z);QGD1tTOAJq+HN_GxZ>+^%Y$mni>`|FudtA2lFmA|mCAAWWg062?XTFRZ-$;OlV7 zPqC0!j&Ki1%A)c}s?E$X(&g5dODyP8ol{>CxP5v^=aeFpg^(cpQ zHk!}_ZdWBXmCs8$&*~znHK>&9-g8%8M01+0(9!spF9FJhkuSU2J^wV#Uo>J@vmD8K zJillnAc5UVfOFT${dfz>Bpa*Z_ie)Wlj}Dew_cT#mRYse5@*X_7%Y*S8Kra5@e`PB z^K9xMiA4(>-dOI29;z4%Z!X2!HIMCn{wy6vUSctnwdqx%5YLP#5D3kdc*5!xE`6+Y zhlQzKPzOtR_z>%B6@%9`Hm94%+VVU3AoCG5H)c@_aWvpxE3ljE9M{_nZ#|{u1a|*< zJwKYfSQ z%SK#&KAgXwAy<_0UKik=%NTDL1bF0D$OxmMZZ`?Z2LuTU6`XXd~KT2DZF?0x+Hwg&%I)6uS)t)r$PDVyHw{mMA8eqm-3=e zM$A*~!&K&7HqB-B0oy^*`W|`;xALPuQ4J+ZKfWdgd7okp&dwmDd}Q1&?apla?X7Ef zhYyu!wlO6SAb*mp->{7FT>i?@qjqNuP5m5w!^^t}po3aU`rwLE)E%sYMh2_$ysz@S zZN~k1#p_VMA@$W$|M7yhvxW#zi6-h6f9(0^Wd5LCzH}t%2;hncED^M5O(Zl9D@aXLLsGE*NP`6}t`aq45=_YC z$njTiwokGfmTr6<4_O3L!t-GA%b-^(BYE zlZv1d>XfGH=JzcsuDEN4+v)Qxkpm@_msrs)>qLaAqlz_#74&IZWBDjUuvl3q3s2h& zA%F);S_JAh;|z!2#erL$_MdQ46lUsp@b}{K$=d-HJcmNr5DoPtqkSYRcY@!DykV*k zQmovIl>`fBV=Ns>h6`;K1`i`&`4rJCU~XSTvBW6Ww#YuTm1Kya1vRyK<})GYWvMoC zvB*(5A52PcFOHhhwjdYIAJjg?jKaAp!v~weYMa!Buz3CI;UYq(#`C-7DD?I^ReR_j zw)D>It8QGA)xwe|#u~}$SaMb+8M|QK_yZ9Y|r?F=Cbk1hzWiAlNt~y1TwKu== zPgCatvti_vXPCS>T0ov6!PlpDX_0qq7|??2)WzuW2+(zyqstLWeYI1Z0Lk?6 z?@OzpKS?iA=VC)C!bNrFRb_1{N^BWe&`$r(EQ|>NfglAifin&&s8jV53?-?=<+4@t z@zbz`m;^BhiB@R-*)N;{p#ZR`lc(@zfK~hKQ>eOw8X>_=a0C>>U^^3^DJMvA4EsPH zqO5o)hDem}LCY4)Z-BS95P@k~|Tg61UMBt@0p$|&9{)JVjFLk`3+{dPFE zO(*BP#TiQ08r_?#X`!nX@BIvjLcc{K#9l_0v`X8_cbOOET`E>e>|$o{zy?qC}g zHl6NhHRo+*XyPVa=as56PLr*&yyKkvZ11%TGvnTWQE1uLF5!AXB0BvOv zrZ&s{?NVSAvrw1x@+_NsGI_n98#izEGV7&VC;_gWT>&6!-%$A+Rsrb^oHwcM!FEY1 z73nB~VEAEcTjIpnn=U64K)A*KtDDwQ{ho%c9_-fzu?=SG^j?sU}=j}?Px^o>~m}BittLH zPd~*}{Q4JTJQ_6i=KXhl0ela(!Jf4P%!ClqQ=B z6s24hQBbpz*m0qg0 zT7@q&B**WeoO0pPzb!}O70i{-%bYyd?vReRHNycLB)54T9V`U(i(cD^fsTX>-!b?ygj7>#0jbDR|4}f*=GQWp_DT4Z=1v;JK$j>bArd=`6{)n!Kx=2-#Z^eR@Mc^);Y#D3~ zp@^=XwEl6)<`?ik*JsdSb!@_K;k@@dqxo+kssAZa3ftM5T9~;w0{&|Qkesxk_B|7Z zd=dKfsRCs>L2@ccMJ?nZ$;m=C0cY+Hufp*uY?5680ViRFn~c?+Fh3StQc-LEJ^^{i z?`RN5ilH4w|6M2UWs2YZVm9;swzKmE^qoEjIPc0qWJ7h#PBGl1=-W4sPa(5<-Kg<9 zV|3_alHFjCe6 z83qPp)TB(QygIe$Qa7v3PkC+l^(jpq*N-L`P&Q%nIN$`yh{uO8A5$or@<=Hw3X^;fCo3DchsSB4y@*Xb3%@tpfBMzw`Dp`{8p$V zV}fJ%I+A~BEI#zk?jWC^w@EfG8MIH;N@BC%BGs!-)Cu%Yyzk;-uO`;IkjE~`DbK|{ zX$CF@K|Iq6?b6z36<+-`E_Je8g|U47r5md{KUUYAa%6w4l|E{-1zF=fJl+_z?1t>L z5cdJQGYqqpArk2hQopA5(p9HcDp9p0u7V9ybmwVJLDuf|$9f{Gm|Z48D~o?XBCx5r z)0X^cQ{0HjE}l>3bV9E*9>9*h9g*6re;ZW~q@+wAy=Ifz?@_78z1Rvf2Yt{`n1dYU zE<(E@7;Bfdo$SH`KEQ75l9zg6mw5sCIyZ6P%YP%@fp{g+x{Z69(S8tMNB{OW!%Cb2 z{rA~JZM=)l zk32Tep36QVI76^k5OZ*vyKdh6MuTK!ggO)?iG}fMzZ+kORH4Rs#8>dx4whu+*4RtQ zZjIOto09Jhmk0D^#{n|v8zSY!G@asPLndJG{*F0}K0lA*{Wpp+3&foc)SVI>6Beju zVcH`b!8b4(iyJ8}c?X0b1BE2;f;NtPMFTQ`gwnJUHtd8{kt0+cDeja&LJF!OvJ1wT z3!*`oF`bQo*>-^$MIp&=5=>A}Qc!9&(f|9e2oz;Y5F*<|iuXX3_!olFZWLqvno)0r zKdeJt79b6~)JiE-4H%$%N^$sy5j5a}&JmopAPpDPcZn+TO9WwrU>>yU#;g#IVvMHP zajg3B?6xw8Apd;h3@w?g&wWn=xZlnQx_@_5|L2V(>TY7>@_*rc$r?Wmun$o`eYK~@ z#!bdJ0vS*sL|QH|gd~3a3_#`{6v5MI2}JJwy=rzGMgw_jOfK-Vn6}W1omMv~1x*T* zwqXHcfs0+b~a(t#TH9-3VRf0gjU+ODcb?PKxhW_F{BVwlN;uwG;cV;XZ8aIKua7_ zXlJMy1IcM()VEeP7>ji>01ryRMX8HR$u%`5#9k3Gu?$$+12HswR*cj=axl7RJmFEg73VMB;dA+aPChS zVyT&r4=?Y>!>=aq@}*c-C|SKQ;l_CAaIAb*a+BpCu|%BtfH+FBs-@Yu)IIZs#y2IW zK{$c{GT14u<$_}4Em)EP#uOQOjF$etH#)3G;J)fjIwE}N5pH1iIC9B#HOghRNqjKg z7?G@5({()xA$F2v!&SG|>-Hd>c#&4=tY#-1$YzRPh-RApTs)e}et#Rfr(} z>!?YS`HCsA5mf4T00_glIx5vM-USPz2II(5r_2a~8}%r0lG(JU|C_t(tARpk(vF9I z+NQx&O2@2@%pWrGfUXXmoNvS~c64^#zcz0#I*LTX;u00U=gWOch1iRyfkn4ekABO! zOXxhAU>TukUTtt(gASQm;4CDLRNh|FAw^#aA%!&96yV#Q9D(>eh^=!M9b(7S)O59`M=ndiU}@AxxrL>%HmJ7Mj)3}m~3lSTE%@xmD7 z&*K%S6knCP2eRN{;#AeI9B0SzRoPuMzYh-Er1_D#=CV@c^Wnebh#_5=@vj zq{F0Fg?Out#3at4y^JWG2C*8&+D6biW==Us60EGHn%>(&9Xr4~-C&+v9{$2Sh>CW; zIeQC6p-yliB|1L)D2{+UBW++(FEGX*u;>#jJkdgeNm=0GlNq@9ZAJs-0{MVs6azomuU zS-wqEnYj(+T`U;8bx7pcZA3DX3?qJ@(taI zJU}iy>dvVjNXji7#1{?cAB!1xBz}&J>EVh$wBR>f^?lEt!=&ZJJ-7%%vbsQUTfN8; zR_YmU!<526M#>hymB;-;N_{Pfau$l>T#EhGcr>vpLBvZNx=xGr$zD2i0WdJro-}je z2|W&ng>R6Y%E}TX54Y$!fEL5vj5Vx`{ zu8C0`!7D%fqX|&H=N1z2(+JV7qx7w{@Ga90eMcQ0il=-*`19YA z?JVwGvjk^<7%yl$v1ttOqAxC)l<>0m?R=Vq>o?%PGK>Vs*-I{MU9!^9hF&9s~VsnYWwQmuP1;!}*o*fT4xQ$=rZgIO{+HB~0* zO=?jCR5`u?p!<5EYBh4f@%n?}818ELh8m#MM4kecEh=Y=X z+aEERk;5xQ6zWdCKM%(*yF7M|y?$6OX)X0C;?ZRH-GOL$K#ag{1uNVb z@9;vvtFjN9&T>R6UpbMaL{zwnfbAVPLHn%67`cD&BOarM^G-F3XVbmq%l-M*7<6CG z2o9ld6O-(*(rd}@VciZ)qGjC*n;9M1*+g}QT5x)e;!7~CZQg0rOXt#sQ|~dm1oSuu zOX`V3b+0x_uQn&(1AcO%j}kKl-r|sLK2B^tMhP>YPG7nm*Q5#GOSyei>@H3JU1=Y% zy6%7E>`GQt7}jupwqJwCl9#Gp2VDp26LxEczT-6;OU>9Dc}%c9^#uEkSal%0GUI*% zr6W7ez6f;NlWz&x{@TCCK-PxUzHYdk%yY{?3$ZmW~}*yQ6~Tk#7eH(^1IXfEmb+{O(HG!|8+#;)JQoSq%fJwCcRIiD+Wd>i}JukW{l3~p|Z zJoVvzjqc5Cu^*)IH1@>DUrgV>jSz0~{h^JBGj#)C$!{a3(}vqF-g1gr4Qqmz|VV~Cn-`LZw>;M9I` z(889mlL8Mq9mm;?9#J3NS6Xt5&saxOr;e`rBBXAQ*yH!UG;{C-)GloxkC^sy4U=;k z!E%U#(TT9rompRyxg+@G^{Lr?gxZ~zu`>x(E<}r_G^5pV1)4S3dcIo>*JIV@NxM>8 z7`~DRw!)1Se3GM;Rn=1FIzn0M9!8~~uu`L}wd<8*tfyoZ(N2b#$-_k!n6hpk-$Smr_85v_EsBbl6L73MenRiv$Yjc2r?4!pLzet!PrfhtC7T9A` zvFhDH+tpF%>B?vmS9kk+(+kOCM{vv5xKL-cpA`vRSlN@vsQM&jEYMMWT%eZNpFX!ws;YmA(Q?QCqm)e;#CTa)kgjO#bu{Qu}C*{T5f z1qBq|SQqCc!Y~NrA3sn#8Wa%}0ErR`ND1L2G}7;;>Sq*d>&52+pFurfJy9aa-z4*K zcYW=V)#255f$Q@vpW`gAZJ&pyT>KuODkE(nd?BKsZ-kT?2ItZ=OLLhf*rUa7n=@i#=T8cv%C+a{v z0TBrRK@m|{adUuSz*Iae+k41`Wy{8I{Tuu|-~by65NNHYH_bo8fU$BcVP`CN|HfzH z4^iMT1WoWv)RCLjaPN>~(dx4(-A?b~?K^;oM!3B&L^#MWgmuuT?``1{X*=wvA35FR z;fpeckH7?`ICR^o>P*c`zNL9fzp$t?4aA+N_n_9o28U^eEZJV#aR>lb_{g>fczhIS z4`InCE=@6}Ry))tEn>!Y0*iKY(ojQGj`6snWg-CYWOt%3_^%sZp|WO;m!B4Nd6=M6jy&BM*P25(INi)rtCh#<=H6uQ%39X(6xEgGM)v2+G3oGU*m^?V z^*XMy$9-f0Yq7ZtYt?GIm&+Vv18N|PMUVCqXx)A{p z4;FdHIKM9yjCm?`{C!GAA?_b8o)Qw>rDn?X{mk6u9QMRa|Mw?;>bQNF}vz{Su z7f`|ZD8jKwNb6MwBw&qFT>`xH)=-Gjh7nA83N(LN2@I+`P=Mn1F{H%h!EwBBi1t|4 z>m?Uem}o(xs8-Eaz|->pkp1g~BfN8qXee0+Ez>%zEnT-4b_=ClV3G1`=dM?5q<=Uu z?{ti`BHs8EQYb`$iQ!O4+KMD#$G7!ean}pz(j_1_lnUKGEvpU!lRux4>LF@_66cT; z%BNrJR9#8Z+zi(Kl6{=AWC!#Ag%EBSm;Q#Qv{4Vw)w`ip}p`C+#<$UGo3; zc($G6_^kye>v9knUhfNLnJJOj-^(fLD=aG?_q= zmJ+S#OIMV|Ene<>6K!Va5a>OLj&1h)Lkzgw zAO1lr#t)9`bZmK3Lg_oFcj8q5MmGGN^T1;Rp)lft1q=f8Hxl$cYi!>lbF3JP4GV8!?S{R}s z2f3}5>DYaFe}P~hN0<7xPSpU#4%V#58jK`lN8p#fd_wdbeFH*O4a=r;XzieN(GqI#DM=PLl!E+bdOOyH<^Y+9Slvn=26|7qM592? z<~JtPWK%pjsEzlNPH|H~##3@Kkz{}caVbh;MEPwqHOd8RG!l&mOH|^cA=9=@PWAUY zN|F`gF}G6-Jjn4hk24J$5}|TluPox5Ql!0@)p^t{AkSJpvt+*spQLO_-3_rsh@=t6 zu+L(Yo5wC2%C%CI#|5t`r2^JN`?=6s*neUa-RY6Imz_K1-P@PBjd$+haTf+wV``7t z%tETiCT&iav%V9##&mMv^mf0|u5-`aJn%2~LS}PVSvQ&mxydjWoX=HR)?#{a)h4M> z;YSpCG%#7Kcqf`U#&T1bL`9@4Uz_vP%_Szk60DHwfcNm<^_VjF1{NI~X$@Hv*}{GG zGS^*OIKn~kX5s+g)lMi^*a$*-2q4~tPNHzHRwu;Q3k{c4wMw@5u-*zka|!8Qz$;X` zq=8{=(y0O(>#6i|qUY|EP*c&Ls=*0o@1Z*Eldlwf9?snm9+sPy5I7ovmq*pm*H57G z=Pdl)T(R080a%>-z49m8o+0ermG@MRy_J5IPFrh@f=p+x#?j|5Q~8h@F^=!5L6z?J zoMIS9=52j9un8<4nR{S^konpWa_aFoPoeMfbBKi|XPn#jfLrZ{*>Utc^;_RoggfZi z%I8_1#~FCW7&-e{-GW$*6TW$ILCiq}u@gBa(HYXHJ;Y($#lj#91Vt3Z0!{pC7YsP7 z39kzpLP zQwzC%#dBHC8u-gRpC}u@8zydXytoop*svaf?oeSNi$sn1n_u_tskG)M-0@ddqys5twJlgu=>QOfV14t1LvL+x=Yv-lOr4cJ)pA0id;<7X8JfjKMZ(MsUB7ak zp1PUu|F;N-6iRAMU`DJj_5-bN4mp$QjQMnKM1_oKw{?at770-b_*_dO-Wk%ebh@=B zmxA#3^xAA58*Hh>tX82$I1Cw8R(<@8OL{bIK&665lIUc%JysoMs&k13ii4=G{;VDb zs7wql;Y;-0yx)YeNtHJ}j#EH{B!5v~Sf#%pvP$->$!8oT;N65FS4Ko;*5PxjUfAF# zPfU91Y9>IU<->g>|4VLVB6k(G$eA(uXhf19^E?bP8r!W3=1g zFOq4M4~{YMa>Lmx`9E*kt*w$lCBF}=^ShyB|DWpJe><#yX(E%Awxk9aQ25d}&W?88 zN7zs3SR$Z0V*F*m^7CdJ-m18lqu6LQ)qU9LzjH-WlS*j=U|XJvf4o0@T>>(~?(e~gTs$)UR{eLmN4`+Y(^%uSB?_~j_e z5jnD2GLS!Nnl~!zBWjrtB#jGIJ;w-@cz@HAyFAag@*X1l|S~J%y;%KuGB( z17kGdx~RTU8n_17`1<;ANiikjSj;JkLPY5V{(jQdAZa*BDmKwFsba_7IR5yG_b3&r zKaXX!(JdABbscYyUOR8w%Ln|QABXBd$2Tqryf>6Ll_#S312-jqHKegJG-c?H*gUoY zCz@EUB4N{&y}DW|7WF0 zJ=T7`fP=b1RJ0Gt^5$yzYN>q!YqLZN3Avv@UtOcX+^$A#KdIAq0<{J<_m?T$&PD8FXb`Pd10m*HYjh zI5IAQM1`~}S6#s6sD}i9M=6^6@Y19K7%6?xPC_`*5IRU&oe)d|0I{KK12#=l(awa- zo>oAlj=hk}RB1|&d$3+%+W4}CfS-{DH)3uK+EYV#wTg3o&m|ts!dSKfJ@JeHu+Hdu zo2INid*vQOl^kst2prB(-X)EJH39f_(rsCI!ygz_x78zeX})T+CUJ|terDul`v5Mq z4Jr;yo2KJ|!3?`k`u<+Cw)TKu3<;U5qBaP|> z<&D3RN-D2d1JC<*>%x&Y@}KN0(&Cp8#_iDG>OE!`GRmYUT^d>si`O2DM-2)Z`-}Gk zI)>9HGeKkqlS+r@RQw|R^4K*?k{mX4%9vf*3=f$N)$5(@llpihqw}^`XUt)S8LwIT zsiDrL%>JZp&H_m!XQsG<`{13My^7vzsHc&9HCK)Z)r@2gW`dfi&T~bO2JgC+S3pL= zK|e%#NuW*rUF0Mcf8>Kp|DBig7`bgHPN|wi_4CX3J38tO3t`yAcuX+`B^sOE3oYb? z-rHor)!}bR%ISJ1(1ITaFsHxT?6Tk<>w3A9dx!qcY97{^Wtu9CX()3}SD)ui#Wsn_ zfCsY)#IFkK*75`nqJlz|JDv4ne9lJb@@^ONdL(Xq25QYa6xJ3w|8erXCC^+wec<%E znfGA-LZJG>7(0`Eu*FCF2JhDlCDPHy?f)26Wt+Ic0yT5Y*kv6++2bW-dx8kVspxQf zUycFV9R_^!&hColiv?eGPOp8~J@@1Lsbl zmeVO=DcxuO{P(GS_C87P6cIp8n;0J)0v5O zqV)!{k~htwxCOut2=Orq^CFh>2em~dl#E`MhD9udJ!W!Aw`pu)I`P?kyV4A@MUAqo znN~1LjvR%Zk>V_Gz_(ttKO|u+eC({n@q~1fu}vn!bB^Rukpf6+CWR;U#(p0bce3zA5p+-#<{Oz{{Bg%|JMQ5e+koa`VNl&%i13Vol`+WbaQ7 znVUavrmWP7Q;3c86$>QnPVRt8a#cm1P9?;d!zV9b$}XXB1f6}C+(yk-MA<8m%BQ;x z#;ruU!lbr#{iJGPBK14omuDIQz7cY^8hTUE+J{OWY+&ycc4t!d9N6x?FnDk_*Y*P;k%T@cOO3b;pXfG8OU#rfv1|DLM= zs`*9(eptltPp8dMC&^k(+J!M)_=E5Z;QJ5uX;)U|6^DMQ+w~D>)s7lu<>#h$tKJ#o>E}FSKSsr9)0!KP z*QObn7#01eCoo2|COUxl=zQ(!#8JpQ`_Hr*CKyA1OM3hgCPLbqhusHxb|>2dw7BF|7&4bOS3i({a}YZsTiVolPCp$v!d}y}6!s6q!Bj-W5u% zUcSjFAX5_#4d=teKM797M?+mCjinrm082fcFH4?sxV zJ;L6SdxcBem`}Uc6t*B)r%O|y7|;1?k=)~DgJi=A$FT<^WKGxDLE9avk8thth%!HP z{#~)b?cd`AOm!IJ8G7ZoN%XUq*|lNwDa$%2LP_6;=ZBB4ovjX{=f1jJ{zl|0ySDLj zkx`vPO_)BFP3Hwt34o%Dw&gSP?=WNUqOBlly%r}<5O50#W z&N==FrtVb0+smGDT$0H(Ko^%0u}Vtk(^K1uYtQAUOV>#MO-TY{XF(}C^{(z79)pX$ z^N^Ip+4G=c6J4B*N4W<;!vNL!7FiB7 zRO$;3yw)mpMt6YD08)hZh{tmcqJ^)ze)@}m_BZ-m(Sb+|<$e$);5d-lS~>07-;+gT zj-|i4*6U=ul2fXuEWN6G%tiY4I^rZRXyUsZMQ(WH8&YX%^Ca{AR_^2#iZ*HYAg{<% z&2dM#{~hT&uF|31KgAv0j{wd8Z`2I`73u#lRL6f1UYKP0a|RYEc)Ol@vyQqU2X7A= z8CkDeuG97YGSR}S2%BQ?2#1;Efm$n*sAK1>Dn zQo)C8yZ2)D>J^ZkBo$>m*BnL4)PcyTEG)mtbG`4kMxXWr!~KY44F1xg$k60UDpAC+ zYKtZaSw{_fzYpj&2!+b5Bl~2=>C{_33irF?qgYyD-}MTcR46cN^M-1TStSX>>SEJS|JDELB*4 zD$_M@lSId{0}(nYzhqkxlBKi1jvx;81A?t}bRH!{krqwFeKoNgGEfB`D2_8^oTiyE zMFxj|=(}$Y=?`3;rGg1b4ic$m*6e`;f-b@#H-kOLq|pRsv0yrAvFv-L+gXgSjdsE` z-8lCpDRQOl#`akg2(HU9u2zfL+{*Qu`?wJHWkH_gu+E%NPt{a*vtygu!`yfvNPgh< zx#M~SXtGO&d0EvS_~*F(4xTe0Yxxs_V~CdQHN^O|vl#p4_i%1?1R1BGe_hPY*AEE8 zT-@}B9GA>9xwY8t8$!hELC|+Pt-z!^m$qIoQI*CF-ChG+Y*E9gQe0-7E&8oP^e!za zoMF{^W(g;#8UVtOS_TT8)~YUfP+4}CdD;<*qZ$1=!vSp=FIyJ|Q9i00>?Jw+J}7=4 z4t9^ExjBFBU(i8cDyqivqac_6D9953J~{-9O>7;E|GyHUDyA@!kByod7^F14o_sA* zE*}69LcCazV97%h|q{5r%$4+;ND7O;3MfW4tcL=XwjH}B$f<(Ag z*>MZ5iRslwtLv3xc4}+)_v3x_uc5!tgn<~?X?_|D@F-TK>2RKX8;N25Ze*1MeuPg? zKTPw!b)Z9=49wD$*mM+n7pZWboAi1$T5F75n6=6V5&Sdz?rfMaVh$!F&r*?&pl0U|!yLeCgfy861dF;kVl8S>L+|%4rp@Ev zF<}l4K%fJ`>YWpY8=STnK}^-$C=gg{$zkQb$v@()hTJt5faBXT=-EGpfKU&FB4$i6 z$)ALavbd>q9&|Y=%wjKH2=xGKkYnw2C1raR(Lnki9gwD(7e4$NS9^qt9yv>fDRzZ{ zj;7#ay| z6&BvYo69P#D0`2GVRN^{#l$B%;K@3VEN45^GD^NHufp8)7Uf=wXFIK_%iQP_bBYW^ zug~j01Uzvw%%_;Gv;`ET|$c=BbAf&x`YY@to5Rz*n94Te^bnC>YKx+7cBQ?sP zD%V%q_j;N~R6d=$Z^-v^!_D@8&)re3%q9*$x!d?hRZ{x*qm!V%qw&w#0Am|Rb0>2b zW5u6Ee;d;uwr;2YGwuJsj$>>7M>_v9S+8rbGNwjF7VgM-@VDZRq9-OQ3KNfa5SMVn zZ4yMcGEHBlepCH`?RfDIgB>#Uji=9AwF#A5V4|OV_%YAB&bZFVyyorp0=@y5cC7hZ z7whu37pPw*hZE=8@mtM}+lM0IS?AtI*KGP)q8jJHL#r`eA&k39FgN*}3kez-0(nd< zD_o_Z@JvoE+Y$#jP2WI~0^ORvAiOXDi$uDXD!{W(wsrZiZ2uA`3ygP6A0j%cBLFj{ z>j2k)Vd90pVg(ih8`(@>f^h;lT~*MsFqpsnG)FI|4%I#Qydr>of^j7*QU4Gl@SM(i z!z3jNJ3!2(b6dUWoIgFMXwt|9q*E~W`BgueD#&E#{_6Mg+y|fhZyO#9AxETY>=`CZ(09c6z)r=(}%oMmk=8qaS;Z^ zFQ|7!auk%4?G}Aw`(!6mv_GC|M57aw;&IHv#o{Ow<;Nq|)ILHcw-YB<=<15}3cW&V ziYYZ%2NhgcmK-9~u#AXG`J2NETBUzL3)B|^0z%w`*kVGkKmYV^uqyecb`*V4-W7@+ zjVIcsXcRg|r`C7>9U(o;ni&Me`Vfx$}CQa4%Y62ci;afVu?|WKlXz>Vef^3 zqE>6LJ|$YXn|ZAlU`e`#^A+;HzwsO2j^8&wmt|~`fBlmD_usgr&CjK^fB5M?j8)M| z-^utNrh2KS>4rIo{571^8O{JM5-n{dL7)+`awi={a>JQA>Ob zS*KebvRYryc>Liw?*-G6@Ssw9d?wq1qUHcuW{aZN5` zEE>Ci&UOA7U5MF#?OVrs4zaHd8RlLe4#GN3jtvb+IkL(hh71-Pk^#S2Wr=J?y~K|% zR-sUnCg_sbLoIo?>~CgG&LZZVZpI8zg;K(m7hPK0kWXr;om7Z(J!?%G2%*H##tcyS zxK&q9T-B?g@syG#W!c0hJYAT|RT?0=D4`Vr3nu2MBL{4wgF>oy%Mtb%`qy37o?hoU zwNHbG>=u6kydqNf%}ZE0h{!;hRm@7LlP~o$NblVtWl$U|(M%}5=S+WcHGfTe$<9NG z5sMWd1gQbc%Cj4#&e0V&!t!b_058ktNtB7yTx{Up&}bjT(~wBt!exLiGc+G(k)RA- z-W!-2VvTIhCMUj(9&4S|Nhku5cdb^qS0xN~e+YQH{x@y+dV`2EKzC&q>9^%DHuoz8 zCkBLQ&`e}{N+33Xa)g;VnjRXfq|+Xu5nU;I|5WICH2@YN`JCTB526uYBK@Z& zyrOG^AVcK#qDx$|T_$#Gb^pE)bO}{4mI&%edkg9Z8N~Pq@0Dw*sVXegj~kM15ZcpT z<&TNTtP~bfQCBfM1e6)KQ0bJ=iFSf}3HGuQcLmv^%BOIdOiM;lXJ9lVd+$8ppPE?l z?%Km>Tr9x=Z^O5c;9f*GWJ#H+fIa6kgkHxN!$g|F`*`#1@qherL0~bKbGFs7nkPTG zLw2bN7gxEJ+nN}^vRh5%|4`GjP9kc<7JrE*rC@HK!AW`{7bQMP*;;_Z>CK10iDw&> zuh2639Ed>bCWekaM-LlT@23d2^z|4qH3jSLL4?RkV2daQve9@u65?ly;+Y>gTK^LE zZjPLcQE1V{Wlr z+RfMl>anL=ONZJm5c?XgGl@=*xKJ8B_q(TV^S-ArKwEAyY_|_su0~A$!>l^(?swJE zTeSuZDW`dEeX%D>@x04erRR^ygSN&ga^C&7Yv*AGGmu1dqeFdII*Sd9`CQf!^C;;)Ra;%StBKIw37X$J^git@d#Hm)Y%-_!h;>>i$Q zg+zeTvqR)$^7K)Ov+PPxGK5?~WoGk87I~A3Ei@X4DSeN#X?5gQZcB?JmmFk&+ybxe zV1L%0!!>TvmLe2a@MQAkGkP7baH)(daHscydlJ!H!zk(R6jTi^eybWh7^e`lhLa#% zd}Q;1$jXo3$in|pSwx-8*~Qo53_0qxqq;$0fld<9<&*w~Vv#jmr;I|kn)c}`ykQ(w zj;ddg_YWvAgSDi|Z0;e=2_-!}@<~E@X0m~s&QatFvAOMN@3Da8xAF5%8G_nPCuaW> z_joSm1MlfQ5K<~T;|RFgK@*TA?m(xWJ$MNauf`k#7=RVz=LqRnVZs}Rt`wo()<4}E zTv$B9%5@%%41ZQ2Sz}unmBmGNqRE*Ksm=Zzaet2l>@Dnnt-a-CPg|MYe@FA~ihy~{ z|CqtvQo>k${EWV_tFG+XVV*#Z6hc^K$7V-y?ytl`_q6AiDy)&yY>qO#YK07*jmj4D z)HQSj)%Ee>`+Zvax(3`3TQIS6?%0wI_OW^M%)mCf#_*#5BAPV;C_c7BivBU-$?N@F zKhBG(nDOP6-KX>59UBiJTveW&CP$`2WTHz9$PLgnjFp~dt55uvg=7%-6zUFUDwKEE z`PQ^UaJoCRdk=Td_9gkH{oLf}O?>YOYc@dryXyKz#^9ayHcmE`natJ;))N`a8;vA4~ffRvJ<1Fx3(eFjbCg)7*jT z52}Qh#_S-3Zu|Pbh1+||%^F&E)E&Xwtqprw;2ko`M=~BdLe!Z7BsU^|zEjeB(jPv! zF)P64fL#D=bDw4edx?kI25Y(yofe3TXYZU3p9o8 zM&VAI6^~YnvwM|Fk^_^`grTw;?0y_?V~%KYN=oPDh6Ba+x+92XJRzLaIj3W=h*SkW z1HeT)t~DzcZa=g=c_O7)aRGX~I$)6$7_C_%RXEdB1&p6P+(~tvus~DOYw6ML{9IJ; zz?9R9mxC{<)65lk59N{YuA?=oTdOB)fKRm0y}V$_7AZG}rHjBoV)iN><^;y%Q4s4B zH%fY~Sv%xqFmlPeyi1(N`o*Gb7VNB$tk0HQeXxEV$B&qeD)c$xiYCPes!N2v`z4a` zrAmOLW=qWAPYo+2_rhkQL}6#`m7=@P!J2ksj=;hk_Vq2gsjRB7XUrk`M9x5M`BhnF z2{8?a)i_Z<^Xruu1nM#At@P0Z13Z2j5qIkx_-M@*Xt$(3gzu}I z=@1leGooZ(zBkGE;yC{&4YpVkQh%sAoDk4I)9$0MtpEiM+d0@f0zMbN0(50}c-&fY zMf4Dp@9f9U3@8U&VETDpYIXIr{91?3Npo>EEh1TSZ%v}yBVS9`!Y z0@1vm>@)~#{3HWpcdKC4<#1<%^+Iw!5eL<%v6~=RuE49QHaU;sNIEkWTZXUU16OHw zctG5Xkm(Rr0Gs}Re)yF9I$ik}1x%&D^Y`u#Oul|#@;~6;|A`M*eFx+Jjej>PTmO`n za6U~7I_yQ#aj@QZqCEK}vJYOaz<%GmzkbChMkC7QQabQEdr9 zxDIexFpn9O<8MF?w4a^W)Gff^)v!PM1;r7mWfPO?(Dp=VZ;{=KGDe5*C9dqmD)QcNZ(<1xmVP zS}@TdQ({)8*=5~p#4~*wukTD!xJr?`Cg`uKqTzrVJ2_=jFc2jLHQOwUk81kgNlzhC ze>IVq`R`w5&f{D$83~0%!!v`dYt&YDhLwwAH|F%>MAC@>?msfvx+>(TTtE-QNfsf+ zg{T}8@dP{#)CDS9I4mO%kh^Q;U!BJx$(2ulRw4)c<--sM&1m=R>Yx3QZ*vqt`-_b% zMs$!Un1&NrT0=U@AgrLSBlaL`MB3b2cY&F3vA|-G{n^NR>Z!7}N~V+~k`aY3+D5c$ z2JLk4+n0!5Af?FOb_6sYR?u%J6_!cVq?If#^CR35_jyxv1SaX!0dv(AvlmJ`EpkhJ z=%GN2lae39!e z%9A}L_68@D3LJ)KnH-H^%Q>ibOvx{G-bkcy{nTTmqkf93_tH=WPpMt}x6+V;8!$oN zf9a|216S&u{UFKz2T8*JekJ=4lKxem$yE9WLr-fSau7%m%5p-#3lA^XAPBIkRix9D z=t}WtZ6#L|2rsoAU4?yvc>`&EeiMf6*7J_Bd8+cSm1X=KIdU;^Jx(<>Iew3+-u^|k zCyWFkK+#7pWEY`7Uq^{ieSeobWAUMuvId&IeBQS-rYtzF*@(dk8y-x)Ww#Fhv|zKz zOcj6OY~#3Ghi+4eUbJgN7pQRBN!E67xe0Yk=rhqs!AiMy^%YCjF8_d6l*by(^T0^8 z!Bm4Ai?0D+Rm}+nSn4zjIb#=9rh-saW$kvs83w(4Mu3w=H?PjWi z#$0T#DV&o&QZGUO1;S#hOeGA8H$rYQXP`-8P{!vo?GcrwGxgbaK;i7U>h|(De~+hM zhVRDxD%AfJY@S|gU#)?WF*xvpJ5nDY9?D|%9z6I|sTSF9%SIg4=$kvP7?&}@R;Egq zocrXZxO}4AbA#oe%^a#d1O(Zd(@d~| z2R+lQo=YAi3>jz$i!6Xhz`nJ>p(x}~p3DKQ2; zSnCF~XGWWWg2WZGj&bW7oL`cA$zP$C-!G52Tt9h`Qc#6#6~u%e#2^$|N^#|t!WC<` zWCe`Q=fg8J>uEIkf{RCqtGEq>I7wUIs8j#azRj2z_*90)1h+ zfGj1q+euJAg_!%uwg>A-oZYMwjDT^ zz@Ow%+&)IzZwM9cQp2c&K-Cy$D}w}rO2deQCN7lgJpI;aE|Gt=F=6E|oUZ?w(D)B4 z6OsQZnEtnnRH!H|yUvG{k(@#VZ4TB@5actPBsd2MA_Qwq0TiXwr~o8Z>af#9Pgy^r zqj?T}$a`byQMT}dbl$QvO;Q8_JNsMXBksxce=4})lmWr)AK%6V-s2xpoLmh+2FI1$DOm#Xfi(46e z_kO3Vdxek*adKe=&|UvoT5RRgDdKI*se&{uillbIt0sSH=dD4|G6BZ(`N1}L&Ift* z5k}^jO?N!roJjlbnp4=->amSb;M5?#M%ycC88$u)`~dZkro>yaepdmHsmq*NnioNx zq@F?tjwSq(fNHC4kYWi8_nTL-?*qEIIdC!$+|BaC!@^EC2)!H6jzsGZuv;j}&MhS$<*+c-;R{%dqn68Ol46tT5iXh}qhs582RE|Rq~jBi z?0s#bR(H5*WH}k5Z*;N_b~TzVW0(D%%H_YX71{1_rjDN&i}vF{_dn=n{}W^X5yJno zo2_*I|DKJJp|#RPDM^gbQd0Wsl53@Tt06}?GyudOU~sctvzajH(!8oIhdW4mLrVk@ zM#A$4R+y`PlVIhm20uM>JoUBfKGV_U=y^0o_ZP|yQy5qtgaO6g34Q{0b6G?%U6XVt z&6AYo_d&Qwzms#m$?3REC(XrJxN&-Q(0S_Bf<}KcmglA`b-Togy+1jAeI4Obpbnyo zvMo)L;sseQK^W4tW`otZuT;utldVa!z1i|}d!SmBjASZ5!d)O0!p4N}U5^pn7@D;W}Q zwX^9m^91S-AF{*j?+AojNN%!j8)x2iFDllHrQ6O#C}JxY?nM;HT@TFZ0hKr$#_vN7 zt44@nxU=5jnPTbc#+$gaQtZOofHfOFSu}x-T{?o{2mS3t^Jnl^IDrT~5qY%F8GqJg zyfoTTE?}=%Tdp1vwy@j8FuT(}u%n**d$iNh9ei+?!5--lYmB|JOm%H$3uoV?Et)m; z22XR%^ov;z`HkQxU&z`4v@_C+DqN~h@r@<_9YipI)79Zni%a0em${R4(HEoCEr}vV zMu7pCj$t?bXvO3dwjetj?6CN+gIX>`%H?bx=$ z3M4tv8$2`IJ$booFkfRTeW;kiZKplh|6cE^eHQNa|3Ks8r&;trCi4I19#Nvw=6?|R z@5{%rUi+Z<82>?kTrg_k=sR>p0ivih5@0C{u?K7N^rxCm%d4uBZUEV?*S-kazh(vx zi`}DWrqzkRfTeMteu&5u>wWs_dUkiW7hsLQGd2VPh7zFs109!ZXZRpyhZeF*CNB7} z$Mvm=(+3&nx8T?}Z|@Jzivr%TN!oOt20 z)592+H`Eb6@19B&C$gpMw_E}s_9q?F02GwoO?Y>ZxES-UlD|c$(u`e*e(^ZQ{RS%V zFlw|d=u>QqP6Z5Nf7};XzeU*!u^S8NYicMaT0dKW3XC6czg3xArgYVO9L)&$0J9Wb zWZ;&G-g3owr_xW8Xcu~{f^+h%>qh7P6GJ^X+$MGTsl{~Md%XlidEL})l{z+^G?h@q z=45ot3;R&FCD}~DXYmmr+|c&hW(0#0xZ}enoptR|+g$P-;edns6hJ%J8eVA=uq~=K&`Zro?d<1#mN#+x-c1fUX}!HB@Ulkt?5Jye&O_Y#!`NOB_2~fT9QBAGlt{0A zU~;wnHfk5h*?@qnG2)Z8@A86gRYNdy@Ssh5pm1AQr=Hl%d`_GUEx_f~>=ePMn8@)| zt~ZG=e_Yobv@u$I0cPbdsa+m%lJDTBUEI*W*ehch{HnYHioE<$R#UoLm8GMGC;4aK zd1K~xLS@6DWyQMsUHZppV{#8CGemQ-1rLuJBc#5m58aPiU8 z$Gv`*9V;0(xIaZ@4K5Mp8s3n=X_Lv*ndfX~e;gj$yDyHuhBSYpI_0GZ27ka$gxt#3 zz)3_5fnn$eK2X6+$rVvC6Z$E;Ph5Qd%U14Z$y+@54^|j{u)_E6vy1-|udtoxgY%AO zbGB1V1H#CWBa_23H`9W{!b27a=MxBDli+8!TPG?XQ0|Ccvhn*K2!a&Ddini9Hc*kN z^4b=tQD2}xZ?yGU%RRS+X(s=S>Q`31KgENX`A~jW5gz5 zkiziELK)Pu#lny~gbPBkN2P#!k#waiR83NBg^bm-`8-h;s2u*G<*5zc+3n1=;ERky zP=}l)pbD)i=t+u8ry99EG@8p#0<8L_h=S)W`mOBS5P_~M?u43n*4^37A7sSw#jPr#5fMq zLMZ3PlMlYDbtq}_B68xtfh12h`iKL8&Gw`uTYcI(q#NyWs!@hMris?lWch&%woEoL zh`P1XQR``vG%_cnS|_7BJU9d9u!bKnIJKKXX`jPnnlKbrY1wkEMKt+3@yX9=1t0w9!1DBNbr@3lIY3#R(~s{yK9>T*t4Vf)^xq`S6LJM@9Q^A79O3Vlw>x9EDjbN^B91@+40 zN%IpDvONEzX$O{Y`k_bt4dL`2qH!NrQ;24^c=M$C->*|L`q78h;282g{}RY) zlXDx~;D7ykApiGvuKtPO|C9ig8lHLyi;3TvMkZaO2Y>>2BX|-A_~K$>LVRL)Z~$h3 zKo&?Ca%agC$wqn%h^8cbR2JTgrj<*1z_mOY1(i#01o%U$n<|wtkBgO>&1Y*amse}W z&duRmPp;Qo4DnC`cHgPj?^oQ%8;(=l$F5VIqY)uEz7RcDt+b%(BP=^~yMdB)j7T<= z%^a0UF6|xtYgVA+&4HCuGMrjl2sg>g!5kbFIkttoX4Or7@SId5&#RgG?StWOg1w9S zzI0_EkSaC}ESiU3a;-QTm`{!^64Zw*v4Ampk;q_yO&O>gNKn?`RcA^Y@O~AFOhsYv zXyj(p{10G6%~@#m$~O}3NY72gfF9|$Vh@_ z*d-yG7ZY-^Dbpv*Ie`p&%0-IfBsu7{ZqVP7j*CU_QnSZ?GDFIpv`u&PBft#IhFOg5LGtzSfoiEu; zk0=bcNZkpXklESFBv<3;_(*FTuz?P`Jp8gFT3cDf%6`^kKU=Ucg=|9g?s5$Yt-!dl zfl~Zhm^ZVeQOVol3kXwIlm3f#2Ir?aScD7>PdilT-c7@!lNjMRW45D(c&sliAb}Cq zW7bRn{j{X!Q=y2Z%Q7423?M288zVg;6J-K;Tuj;lf(Fa7LkU8|q@SxU$1c@x7&BCY zTRig8Dqx;B03Pe&=Xpzrra?FosCysF%j@+#ylJB5?tslpNt#|Wgu>}#{q~5 ztlYm)Rg}mRL6{Hf1Ell|e*YpLXy#j%uLXWjCo!>dyXM9peQY5@DljoV3WidGAD$V7 zc{XU$KSNB_kqG7$SlD?`aI?t8qCCt-Ya#;%cz$Cet9KF|i&u-%U{CQWMZ&6|7=(t| z9=(f1?L!zCLS#r<{im290B9vkql)qu3gY&h zcfS&)00Z`*&X|}I`aCj{$;7QQ2F37t^GZ;z~j;5@wH%*kH_h5O99KbNnyT&)#yr*%|@O)9Fn#3s*X@xEY#23p+Ew`e-ksv-+2Xt>#DdtMwKHSm6FX1tF z7x0PC2oZf%VH~aN+E3A8zd*k&cYeOHw-|h$S+=tMiqcaBP>FBv9()+G4Y7$oKGynl~al8b1|FBdDXMn2>hBP>Aaw;VX3h$v51{J@k zdgd8qb5FBY6sU+Hie)3DXdgr&Du2nkcU=i&Z;nCTPZE8NF&*A2 z0^f%mo;1KE36K*oiQmF|3^Q9~q8BBUiHsr2X9^ls@~&MarC#V*R_f6qQ5!`g2P-Tz zme|nI&mrW`Rs?B|Xs~r!y-6i2-itT1tFaTas z)9-$ZhULh+^eI!O-v~gE+}&~HuxGin^Rk+pnnBTE#Tk_)@c_x)m@`@shT45~{Hn#E zBeDoXdkejiWEz$1a(ge2Cg;z#Q7nvZ$B|G%YJ^6wfak@>6LG?D7qpkIqbAn3Dq>`$ zlsVR0#&*VKWM9u897w+a)-7N(UMUVyb2TNHV8DK79B2>UhDTbe3wwn#)pnie7=|~G z2ca3lXiwYMM=b?^i*xo~s*y!sD?ST8?Fd~I0i2MN;OyOm3JQA*GmD54nXA55dhUsx zqQh4-Ps$m^^qL+3(-$``oKa=&7vE>o`>Tw)cp$9f!M&)NR_kmm)l4Fx!*S0?tYq4x zq-pNQ*wgr$5odD=FQ9*h=NZGNk|_QtWtJA(Zc;-r?APiT9esel#6px(vKp`DeiLi28mAEk3mUVyNS|Cxa0qq+ArUr$OO=~ z(Y7gMEXxTALa@nkIk?qgP1kO20>`(2T(FDrWB)9iu!4c+J`mp(>bt6Q3pZ?rkY4}7 za!(S;2#fWg-G6PrH2@naByd=&KX}8jBjhcOT4hD%S>Xs=u#5M@^FY}=aZBoRfShYU z7G&qZ5lBS92&TKvh^AY#KYwd6`}<`=)z=2-Zm8Un+b3S-b2kFZ^v3dM`4&VZ@qw`W z6h88DFiyB$Yj(1#(ZS%&3zb-6Cc$(moJ^?;sg=nI@M=XzqI*Ox) zBbS1OIj9ky@|xQ*htkA_a}o6zCJ*|+)7~)E`LMbO7k`r%*EM<>)pSp(?m0Z|dSPDe zeIh*SUGb`Mzeon#O7&wlPMwcHJ!e`05yeiOnoC2+wn5*eirTa%hXUiO1|5Ws>1NRu*i9 zZTMIni)?-|sf#I{Dwud`d%wt_xaeiX9fntzH1^Z(*HJ=Cn-7rF(w+}vBRQFVxq8|) z6LhtMZmUjHC)!lEgYvHUc~x`j(+%5z#e6cWI zXwu>ENclx!H0)V5>}oai`{Sn9z;AwZLjB$dg|QNaYlrVMJQ*fc##t-++ zfefit7txEz_*3bC&{hbCDoNi&4?!C%qD66TpK3L5I2T5FfS^Ubyid^zt2z$&u@!NC z0KS1Yy({95%sL*@BK#G6c}H)PJdG9_VkfGC;&S@p`$udBI(cDC;b_oBD$ckr!?r!O z%VHwO#KbD8ZQw+$oL+q@p?)V84CS_^HN$;A)P(!|sEz%$*`Nc@G=3@vhF*u2`dv)L zZXyW7T}$O|vXp@$*3YXv$-`vR?KPiigyQHJ$z4}vJUJ!cn5aisk(q&a`fvo`0J{$g z&=J~-&Ti`W1bt1H-O~diOirjRsQj=l;5v+4{%6Tn4Apfp8?hy?mKXNO0~<%y@H2BA z3yhj$OP2s-{y=T=FScI<^b_srW83lm?ji{H4h#`=!J#YC@Xy8w__{xK9Pq2}C)9h< z9ZNCZ5G1&yGhE`oJlewCZs&DADsrj9guLB&AT8f-ApqYNB}CP6bqJy8*A3|clNZy2 zbC)T#>FI4L=)VQ%F&I-YyCuNf(*=C`vFHpG96H$T$t@Q&u_m}EHgTLbqDFOGi>xmC zIgy$`<3WlvgJp2Lrq8FoFL^$)%H@K-l?<{8-N;rs^$&bUeuuCQpP%+;*CBfgKWP>F zFLaZqC%Vu8i)*yUFKTLW=J%8`y!Lv(xK%k$@46z7f8|oe5{>g82Jv7mU3lDv6&eza z-x86q8as+$`48dHo5?GiZ{*O&Ng6_Aa5ET09t>VM6wx!W?+F-Igj7>r#(spvqdCya z99_$*#o+p*!sesJ=%L^YS`Y*VbqYcH!{Yw z|Ip%ci(a|yIG}$w*+-4MK`lg~701*`qIMIu87jX6&`D0d0lD3k#`a{bb=wXuoGYkH zqx_Ovf;WV!axc%IMWwUl?NM6oS;eYyj`I?puN>N+ID|}HuMa~oJ(IExAWmY6PrgkX zv2c%i-N>8YbH5Fn9C?9#7{Wv#+%9Hc4G~fI>$Egi2zo8*ap{CROjX+4uEh7Ug%6K}MjOaE1hJt5{zf zB!?!!hGf=bjZofP;iVc?`fIv>Z<-I}vx>VH7Zxb}+Ftbh)|^=|dw2Zcpr(&!Y=E zsZ%n6aD>F-{&l@Ts_bfy*Vn`6(q-T0iFa=bQI->L!F51V3B>Y!xvI_yBt3`R+S~Pw zwx+W>JJV;;QLY9|#lNEm9keeqGO%+Q zg&G^$<35l6pVH0)oXWS4<3^%vjvcc1CL}9+9DA10A$uH~V~^~SRme&Xk`c-bWk-Y* zGLkfi>=l*w@%PrL=U=M#eXh&p829gU@B4o4@%{1E8*OC1zCDnUTF@j;RW9d3v#Osb z!R5hB9*FTy7Bb6kRSNBPe{{;=i%~R3(UEGV9`AfQ%BQmiMG%T2lUwAhYgVh(c)j&u z_g?q*rrDT07pu8)JCRF>|B*mx@5Fsh1ZPH>P4M7HV@aKs*}#<554mYDb9E;skOyOU`I(8sqwMaX@&lTdShwUy}~ zn9?71Gda^#+zt0WyyM8nQ@OP(2#H)rODneAd)onQx!x-ZxFd#*(E_z+e7APaWB0EE)fkA4H7G)$aDcm4wWhJByy$v zR;t98jtkRPJ3gW%#o5~Ex3wjo)l(%K;Y4cEya`vyhlEAA;GWBKupJsqaKeyNV9PzF z+W9Fo!%X<9xwdLkWo*wf9qc=4FbW z;jq&bqiuMUP!NBKloC;g;mc-8sVEk~5I5^1odbz_(^q}k;}kO=*I-N$i?7m=F={hg zN~a6?O3?;q!UXWUJp9pS@RgJaTXk*`g%|Cf3axNuLo2q(3<0$?vx$rFGciQK`?0g}oa!ON)7Yqov~Vx|3ex z@}leRIciocud*pAv&!S*L(vSeE9;O93tq9$5}Ynx;F&aNM9wg6vp4xJAJ00r-ayvFK@eaP84??3)ogn&f~C7g zC>XoS$t~H%v4_@S0a)LKY@b`HB}35SRvbAu3b*;};(avS&un$YiWZAI*`K-LLEgzC zS*S6@r!j$NJy-O&eqnawX*g$BpO3xUqe~T~1(>{ZaP^XOfrd zTvuHb+Vp83kz{XnKJU05Z=%t7g6?!M@$;yKZrRIY1)w<$^ezrc+9ycO=la2b>7amWw zCpmMgPCRE1Z6qXMPjph+gHHw{R0v#GiRZ_!R zpmZnL&}UyqNz^Y&LEziS5}Kr}(0NhO=g{`m@0Gk?~~5fy#;7c~f1|j8hCd+Tn6!bMD*aXB#qhrrNfsg5rvTg6Rd9MAi$2 zJ?TGZ<4DVx$QcmL@2);cMPN@#O~7@c)0pWOk1aktI;&1F(HU+WEi%1rgd=Ld-I;p! z>P_e^<$H~o)!V1L6GUw_Uh=qg%YEdLV)EY{8uh1r=66f4U!6r|MQwyQe!|H3v-h?l zek1RdFWelvjMM2%S9lX2@^OqDE1YNxM#>qle>q3=d7C(JLPn{6jg+2mFipBiQa>FNjZq4pyi-9ybJU1V~4ey0!Y(HMJ7sgA|e+bxL%oK zS>@M6gtVBIV~tbZh}4y!)6OQ-$rF*AP~sa8g$G9D?rs;5ZT@$z~{o?_X2Cs(- zi@WeP8zV9l>Y&=`sjhog;ZFEl zd%-F3h|){#8FO{k@?NT)c+NVf_|ha!_|~3llOLUYKC8zrYQucBcPF53% zv}dl!Fd|+M%Ms$&t#4w%ePX6(@RH+ci|$fH!FEpg$QDdKeauqw?(0e9qW2f>^O?rzbk>+)kni+vg0vcar&hyF2(zEi%s4&|i#@|zEen$U{vAof7 zEFg+ooJ>m3msDG}<$jQkavCP9=HL-Y>RJ)pOOmaLhP}FH<)^DoW{Ar_i4@I-W)!d% z(Kgr7%&$c25?rRGS*Kc|%=N3Wa2BS%Ctp`-bJk zIldoTkq`26Ukq@tRRmDqQvPi#a)aAjS$h15WOYIEBMl4zz-ixc48|AB&L(j*n5_IX z-ex2nb&RT^uI3RlT7p8^siD(l9#*efv6u7Wc&-bGX_MX)EBd?}R8#~tpUN>uJ7K|g znF?8@Ou-+ECkN%6dLyuP`gMfAOp@PipA#u=O)_;hWjO{DL-;K5NURNeK|I9M^4KVQ zL2Ak*h}>Hv`Lnr#NYyvvC*1H#ljL&ph`64!Xd0>~xU=(TiK1 zHj+^m7^Tq>I@gl`zO#oKn0)alHumTP+ACfSMcVn$IxsLrRO{5gc!Rlk^vvpHp#kG+ zyytG_MyN0adNq|7>1OAW=&f{kPxI=m&M5AQPsO#jKA`y-@k@6k2&aGMV&%=a;vgu5 z*nD|xVNl(=!qLK-*%{W+-Z~o0XrQ!BJ3-{WNyeP>)y`2Xi@ua%U zyQ0C*M^ZB!j7Bykek^YX=O*Ccp?d4qi>fA@w1(r_(Emem~Rhji^Zt7Tp} zYZoFw6uB-~oib*^>WapiXCQH1kk#t_B$U3mh&kazE&G&xR-)G^_GsiamoY&oOQ_2B z^1{~EuH>H6$F1Dl`)K~{+GJP|F7{^?A%b$|oKw>RTZOML`D-M(m+Y5&ql_5Ej6B!k z+-+5A6)+ejRX@eIVO$KO+iOiyBiz}orNLc)NRpf zV`ed4jSJVtRy&7vtN4@*y)u0R`xgmXg~ufchr|i3pU&x5^tr5*8ha0Ju#^-uXA#Ls zrrhss1%$}_Pf!+!r_vEBnnZJ(N3%$hMI#EPOEjgdY`539ljl53!{aD7$FirrrQT^g zV48BRCP{*;66U57D7zC6T$&cM;af>H@+@s|D?GEqEx4DxS2_F$?|L}Tnn;y4#v`f7 zXwMXJYisKl+b)D&Hsn|f=|*NzO9T9sHQX|!_i+6Qce(2Bg~s;vTozg1roX#Q5s(?y zY^-#?epZ&Cp+2FxUpAv&(ZF*XbP=SNq}UP?69X(a8)t}Id zdzf6KVyP*zcPzH-adp4+kSsj?h!L7_LC_SIvTACnShhw$VtB{+WG&oVMS*_A3Z3t! zaM~+-5Av)8GzCr}-qn)9nNP!ep6ddeH_ZK~?#*x{xkwlfrh}SoJb9#h>dpaMyzCZA6qW`LO1TZ zVEK7A)k&8-jA$bR${ToUF>O_GzahyNOQg$ll9T#R5vEE#aVXB=o zm$I`Tbwm7n5}g1VWAAnBD_$5`4@M05#0WK}Y0(?Cy+wTYGTnKeAH5{3(j8bT0tWb z?rWg;o=ApTU^>3@n0hj?KQ&v*>mxa=Yg0Ct-F>K~&%_n2bwe@kU~iwvG}C;W@;p_e zmOm$Oty#Trge@3J$kO6j!0pZWu*@qRzp$X+xvQl{&M~^?V?pxXidnwG8XtN=@&9v|o_T0Vb193Dy5Qx8i zb8d}i?9|PAm%6o~p*zdBckf*~q4w52FP;`_^~on4iJ5G5+M=MOUTCn?QRDeiksSic z0R&`dK)#^2Vm3m|%Uiq7=1xAD{!?d|g{YNw`9)J`Rr;$ z7ewIkgcH20)y{W8vz2U!)bb}bIr2_>l%6N0qUco zFrMcvAFJ@d_^>!SitvlikJS;7DTwlylIt}umU$Vb_YBI=SV-(`9%~UM^0rL#mX^&- z_o^h9g%Cvh@Z33WN2$=G?Y-j&%^Y?aNG0Ra9V2odhze-&x-Rz-8(&O1amv)*_bALU z3%=WAMMn2zhpK<6`elR^m$MnPPs%uQT>{z98JN1Ur&yXgCnUNGRi*9JoU__2jGzy_ zBXm!HPrI|_IezeYC6*88k@S&^b@9D->L%69VIk_I(#BHbFCNEe3KD2M-Drn9SYvb~HrTK+ zi@$erC7H}1OLANQaJHSne#+8)C?z2A$@-#nog{fwu}6pbGU*jJ=#r+uAg?uJUjn$HtVay=Od5hcn+iPGR}4L#(qV=tvo$d)c2w z$p2s6jEfr_=zl!ytlZVOIlI->)OlCbEBm0_YJEdIe5%~+$~>=B`Fi+x&|=}230fOQD6Rbr*)2a~o2UTF;1b+MNL58papTG5|P+1KXMFm|wUZ~<>V4y4h z@3Rly13m*?Ffc9qbyNXW)bBzt0I}E)anNZW8W1>&_FcgJ=zkaRp!+|JOZ7E0+I~zC zKMVeKcsR@q?GI)u4l}baa(kF5!XHe{1E#*^{_m5+{zG6&;N1}v_?JWBVNu!_?LBz* zGs)~Pto{?@Zv*TB16AoVl{(N}0mHaJA^|a?Zx1r0>U)N~f|i1Yyn=?Dih?fK#NE5E zBAkFMGvh`BN)YuRLkxiF-?zl8tH>#6=qi9i*WdT94F&?00$-?nM?*t~tdM*cT0>J0 z2oDZiJ6y;vNttZ%W@l~p)x{V%;zou7MPxwjDZW$9HIJ%O44JI8;CmOMNrFp9?j> z;Q7mHp#}4>m34Qwa?s7WYzbIKbA#JvY82xXt0`KJ3b~c`XnxY;27v&3fj{cQ_3=whq zJ>W-I>EQAN`xZpm*6}^W_WqFndryO47}(bu3U)i-4`F|@j0MJm{S%?EtD(Qaez$n? z3vWeW7}&oK3YL56&tagI8ZZRxCI$tOjQDfN_si*E0@%X=itsx2&j|-tB$x$$-WtIU z1W=5*xW8t|{?eTQIB8%ta};(c@qfb}WaNLf&A~XZJTwZolJeKML&T!NT(IyfihDWz zuepCD0}GA;Se6qN1NY3oj=^CfonSCnwhIOB&HrogAtGL2E?5T%#a%1>Ywkg%lKrVF z5*Q4YjX{AWZ~c#8u!sy82^QBtA!Ew^N8~|o@tsH-m!u>99!B>k>;MwZG2LCo!!8c4%G)>@T{JtqThrw6xQ0U5ge~bS4 z7y~{Mh9da&{f6+b?dP8pz+2iV0`0TEB^)*)gE#$99Lv$)asGS@5L`mwttS*!ckDM* z@XY+Xxzul_H{i_=6jX8IyG4wH#Ur4C{>4@ZIDOy+P!y`{<^O|1Er)8UVF7P7`_2|c O(fWavBF*XjpZ){(@cW1W literal 0 HcmV?d00001 diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000000..f5b763a229 --- /dev/null +++ b/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +wrapperVersion=3.3.2 +distributionType=bin +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.7/apache-maven-3.9.7-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar diff --git a/ci/release/Jenkinsfile b/ci/release/Jenkinsfile new file mode 100644 index 0000000000..14651ba547 --- /dev/null +++ b/ci/release/Jenkinsfile @@ -0,0 +1,107 @@ +/* + * Hibernate Tools, Tooling for your Hibernate Projects + * + * Copyright 2016-2024 Red Hat, Inc. + * + * Licensed under the GNU Lesser General Public License (LGPL), + * version 2.1 or later (the "License"). + * You may not use this file except in compliance with the License. + * You may read the licence in the 'lgpl.txt' file in the root folder of + * project or obtain a copy at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@Library('hibernate-jenkins-pipeline-helpers') _ + +import org.hibernate.jenkins.pipeline.helpers.version.Version + +pipeline { + agent { + label 'Release' + } + tools { + maven 'Apache Maven 3.9' + jdk 'OpenJDK 8 Latest' + } + options { + buildDiscarder logRotator(daysToKeepStr: '30', numToKeepStr: '10') + disableConcurrentBuilds(abortPrevious: false) + } + parameters { + string( + name: 'RELEASE_VERSION', + defaultValue: '', + description: 'The version to be released, e.g. 5.3.37.Final.', + trim: true + ) + string( + name: 'DEVELOPMENT_VERSION', + defaultValue: '', + description: 'The next version to be used after the release, e.g. 5.3.38-SNAPSHOT.', + trim: true + ) + booleanParam( + name: 'RELEASE_DRY_RUN', + defaultValue: false, + description: 'If true, just simulate the release, without pushing any commits or tags, and without uploading any artifacts or documentation.' + ) + } + stages { + stage('Release') { + when { + beforeAgent true + // Releases must be triggered explicitly + // This is just for safety; normally the Jenkins job for this pipeline + // should be configured to "Suppress automatic SCM triggering" + // See https://stackoverflow.com/questions/58259326/prevent-jenkins-multibranch-pipeline-from-triggering-builds-for-new-branches + triggeredBy cause: "UserIdCause" + } + steps { + script { + // Check that all the necessary parameters are set + if (!params.RELEASE_VERSION) { + throw new IllegalArgumentException("Missing value for parameter RELEASE_VERSION.") + } + if (!params.DEVELOPMENT_VERSION) { + throw new IllegalArgumentException("Missing value for parameter DEVELOPMENT_VERSION.") + } + + def releaseVersion = Version.parseReleaseVersion(params.RELEASE_VERSION) + def developmentVersion = Version.parseDevelopmentVersion(params.DEVELOPMENT_VERSION) + echo "Performing full release for version ${releaseVersion.toString()}" + + withMaven(mavenSettingsConfig: params.RELEASE_DRY_RUN ? null : 'ci-hibernate.deploy.settings.maven', + mavenLocalRepo: env.WORKSPACE_TMP + '/.m2repository') { + configFileProvider([configFile(fileId: 'release.config.ssh', targetLocation: env.HOME + '/.ssh/config'), + configFile(fileId: 'release.config.ssh.knownhosts', targetLocation: env.HOME + '/.ssh/known_hosts')]) { + // using MAVEN_GPG_PASSPHRASE (the default env variable name for passphrase in maven gpg plugin) + withCredentials([file(credentialsId: 'release.gpg.private-key', variable: 'RELEASE_GPG_PRIVATE_KEY_PATH'), + string(credentialsId: 'release.gpg.passphrase', variable: 'MAVEN_GPG_PASSPHRASE')]) { + sshagent(['ed25519.Hibernate-CI.github.com', 'hibernate.filemgmt.jboss.org', 'hibernate-ci.frs.sourceforge.net']) { + sh 'cat $HOME/.ssh/config' + sh 'git clone https://github.com/hibernate/hibernate-release-scripts.git' + env.RELEASE_GPG_HOMEDIR = env.WORKSPACE_TMP + '/.gpg' + sh """ + bash -xe hibernate-release-scripts/release.sh ${params.RELEASE_DRY_RUN ? '-d' : ''} \ + tools ${releaseVersion.toString()} ${developmentVersion.toString()} + """ + } + } + } + } + } + } + } + } + post { + always { + notifyBuildResult notifySuccessAfterSuccess: true, maintainers: 'koen@hibernate.org' + } + } +} diff --git a/main/pom.xml b/main/pom.xml index 63cb48c8d5..cf46899760 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -55,6 +55,11 @@ + + + false + + com.google.googlejavaformat diff --git a/maven-plugin/pom.xml b/maven-plugin/pom.xml index a5b41b5a46..7569905f80 100644 --- a/maven-plugin/pom.xml +++ b/maven-plugin/pom.xml @@ -52,7 +52,8 @@ - false + + false false 3.5 diff --git a/pom.xml b/pom.xml index 51e5d165b7..05401c81bb 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ org.jboss jboss-parent - 39 + 49 org.hibernate @@ -51,11 +51,37 @@ 5.6.15.Final 2.5.2 8.0.1 - 2.2 - 5.10.1 + 2.2 + 5.11.1 8.0.22 19.3.0.0 9.2.1.jre8 + + + 3.3.2 + 1.7.0 + 1.7.0 + + + true + true + + + ossrh + Sonatype OSSRH Releases + https://oss.sonatype.org/service/local/staging/deploy/maven2 + https://oss.sonatype.org + ossrh + Sonatype OSSRH Snapshots + https://oss.sonatype.org/content/repositories/snapshots + + 1.8 + 1.8 + 3.9.7 + @@ -155,36 +181,186 @@ - + - - false - - ossrh-releases-repository - Sonatype OSSRH Releases - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - - true - - ossrh-snapshots-repository - Sonatype OSSRH Snapshots - https://oss.sonatype.org/content/repositories/snapshots/ + ${ossrh.releases.repo.id} + ${ossrh.releases.repo.name} + ${ossrh.releases.repo.url} - - - - - ossrh-releases-repository - Sonatype OSSRH Releases - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - ossrh-snapshots-repository - Sonatype OSSRH Snapshots - https://oss.sonatype.org/content/repositories/snapshots/ - + + ${ossrh.snapshots.repo.id} + ${ossrh.snapshots.repo.name} + ${ossrh.snapshots.repo.url} + + + + + + org.apache.maven.plugins + maven-wrapper-plugin + ${maven-wrapper-plugin.version} + + ${maven.min.version} + bin + + + + + org.apache.maven.plugins + maven-gpg-plugin + + + sign-artifacts + verify + + sign + + + ${deploy.skip} + ${env.RELEASE_GPG_HOMEDIR} + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + ${nexus-staging.plugin.version} + false + + ${deploy.skip} + ${ossrh.releases.repo.id} + + ${ossrh.releases.repo.baseUrl} + + 60 + + + + org.codehaus.mojo + flatten-maven-plugin + ${flatten-maven-plugin.version} + + ${project.build.directory} + + ossrh + + true + + + + flatten-pom + process-resources + + flatten + + + + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + ${maven-deploy-plugin.skip} + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + + + default-deploy + deploy + + + deploy + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-java-version + + enforce + + + + + + To build this project JDK ${jdk.min.version} (or greater) is required. Please install it. + ${jdk.min.version} + + + + + + + + + + + + release + + + performRelease + true + + + + + + org.apache.maven.plugins + maven-gpg-plugin + + + + + + + + build-reports-as-last-module + + + !some.property.that.will.never.exist + + + + reports + + + + + + diff --git a/reports/pom.xml b/reports/pom.xml new file mode 100644 index 0000000000..7ca58593f7 --- /dev/null +++ b/reports/pom.xml @@ -0,0 +1,80 @@ + + + + 4.0.0 + + org.hibernate + hibernate-tools-parent + 5.6.16-SNAPSHOT + + hibernate-tools-reports + + Hibernate Tools Reports + Hibernate Tools build reports + pom + + + + org.hibernate + hibernate-tools + ${project.version} + + + org.hibernate + hibernate-tools-maven-plugin + ${project.version} + + + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + false + + + + + default-deploy + none + + + + deferred-deploy + deploy + + deploy-staged + + + + + + + From df274147949de354b18dd2ef8d23b3a8962eb1bb Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 14 Mar 2025 13:11:24 +0100 Subject: [PATCH 553/560] HBX-2995: Backport release automation to branch 5.6 - Modify file 'test/maven-plugin/src/it/noPropertiesFile/verify.groovy' to make sure it works as well on the CI runs Signed-off-by: Koen Aers --- .../src/it/noPropertiesFile/verify.groovy | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/test/maven-plugin/src/it/noPropertiesFile/verify.groovy b/test/maven-plugin/src/it/noPropertiesFile/verify.groovy index c71714aff6..040800a6dd 100644 --- a/test/maven-plugin/src/it/noPropertiesFile/verify.groovy +++ b/test/maven-plugin/src/it/noPropertiesFile/verify.groovy @@ -2,24 +2,26 @@ import java.io.*; println "start verify.groovy" -File entity = new File(basedir, "build.log") +File buildLog = new File(basedir, "build.log") + +if (!buildLog.isFile()) { + + println "'" + buildLog.absolutePath + "' is not a file." + + throw new FileNotFoundException("Could not find build log file: '" + buildLog + "'") -if (!entity.isFile()) { - - throw new FileNotFoundException("Could not find generated JPA Entity: " + entity) - } else { - + + println "inspecting build log lines" + boolean found = false - String searchString = - "[INFO] Property file '" + - basedir.absolutePath + - "/src/main/resources/hibernate.properties' cannot be found, aborting..." - entity.eachLine { - line -> if (line.startsWith(searchString)) found = true + String startString = "[INFO] Property file '" + String endString = "src/main/resources/hibernate.properties' cannot be found, aborting..." + buildLog.eachLine { + line -> if (line.startsWith(startString) && line.endsWith(endString)) found = true } return found - + } From 43a3c33596374db4bcc9dedccb152e26295e0f4a Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 14 Mar 2025 13:36:18 +0100 Subject: [PATCH 554/560] HBX-2995: Backport release automation to branch 5.6 - Disable test 'org.hibernate.tool.stat.Statistics.TestCase.testBrowser()' to make build stable for CI runs Signed-off-by: Koen Aers --- .../java/org/hibernate/tool/stat/Statistics/TestCase.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/common/src/main/java/org/hibernate/tool/stat/Statistics/TestCase.java b/test/common/src/main/java/org/hibernate/tool/stat/Statistics/TestCase.java index a86b718270..d94e938345 100644 --- a/test/common/src/main/java/org/hibernate/tool/stat/Statistics/TestCase.java +++ b/test/common/src/main/java/org/hibernate/tool/stat/Statistics/TestCase.java @@ -28,6 +28,7 @@ import org.hibernate.tools.test.util.JdbcUtil; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; public class TestCase { @@ -42,6 +43,9 @@ public void tearDown() { JdbcUtil.dropDatabase(this); } + // HBX-1554: Ignore the test for now + // TODO: re-enable the test + @Disabled @Test public void testBrowser() throws Exception { MetadataSources mds = new MetadataSources(); From c682d08f6cef552dca77e1364aed2122481df96c Mon Sep 17 00:00:00 2001 From: marko-bekhta Date: Tue, 13 May 2025 15:23:09 +0200 Subject: [PATCH 555/560] HBX-2995: Backport release automation to branch 5.6 - Use JReleaser to publish artifacts --- .release/.gitignore | 3 + ci/release/Jenkinsfile | 16 ++++-- pom.xml | 127 ++++++----------------------------------- reports/pom.xml | 80 -------------------------- 4 files changed, 31 insertions(+), 195 deletions(-) create mode 100644 .release/.gitignore delete mode 100644 reports/pom.xml diff --git a/.release/.gitignore b/.release/.gitignore new file mode 100644 index 0000000000..cdd9a17d6b --- /dev/null +++ b/.release/.gitignore @@ -0,0 +1,3 @@ +# The folder into which we checkout our release scripts into +* +!.gitignore \ No newline at end of file diff --git a/ci/release/Jenkinsfile b/ci/release/Jenkinsfile index 14651ba547..f8e9a6d2e1 100644 --- a/ci/release/Jenkinsfile +++ b/ci/release/Jenkinsfile @@ -74,6 +74,7 @@ pipeline { def releaseVersion = Version.parseReleaseVersion(params.RELEASE_VERSION) def developmentVersion = Version.parseDevelopmentVersion(params.DEVELOPMENT_VERSION) + env.JRELEASER_DRY_RUN = params.RELEASE_DRY_RUN echo "Performing full release for version ${releaseVersion.toString()}" withMaven(mavenSettingsConfig: params.RELEASE_DRY_RUN ? null : 'ci-hibernate.deploy.settings.maven', @@ -82,13 +83,20 @@ pipeline { configFile(fileId: 'release.config.ssh.knownhosts', targetLocation: env.HOME + '/.ssh/known_hosts')]) { // using MAVEN_GPG_PASSPHRASE (the default env variable name for passphrase in maven gpg plugin) withCredentials([file(credentialsId: 'release.gpg.private-key', variable: 'RELEASE_GPG_PRIVATE_KEY_PATH'), - string(credentialsId: 'release.gpg.passphrase', variable: 'MAVEN_GPG_PASSPHRASE')]) { + string(credentialsId: 'release.gpg.passphrase', variable: 'JRELEASER_GPG_PASSPHRASE'), + // TODO: Once we switch to maven-central publishing (from nexus2) we need to add a new credentials + // to use the following env variable names to set the user/password: + // JRELEASER_MAVENCENTRAL_USERNAME + // JRELEASER_MAVENCENTRAL_TOKEN + usernamePassword(credentialsId: 'ossrh.sonatype.org', passwordVariable: 'JRELEASER_NEXUS2_PASSWORD', usernameVariable: 'JRELEASER_NEXUS2_USERNAME'), + string(credentialsId: 'Hibernate-CI.github.com', variable: 'JRELEASER_GITHUB_TOKEN')]) { sshagent(['ed25519.Hibernate-CI.github.com', 'hibernate.filemgmt.jboss.org', 'hibernate-ci.frs.sourceforge.net']) { sh 'cat $HOME/.ssh/config' - sh 'git clone https://github.com/hibernate/hibernate-release-scripts.git' - env.RELEASE_GPG_HOMEDIR = env.WORKSPACE_TMP + '/.gpg' + dir('.release/scripts') { + sh 'git clone https://github.com/hibernate/hibernate-release-scripts.git .' + } sh """ - bash -xe hibernate-release-scripts/release.sh ${params.RELEASE_DRY_RUN ? '-d' : ''} \ + bash -xe .release/scripts/release.sh -j ${params.RELEASE_DRY_RUN ? '-d' : ''} \ tools ${releaseVersion.toString()} ${developmentVersion.toString()} """ } diff --git a/pom.xml b/pom.xml index 05401c81bb..7520c826db 100644 --- a/pom.xml +++ b/pom.xml @@ -59,7 +59,6 @@ 3.3.2 - 1.7.0 1.7.0 true - true - ossrh - Sonatype OSSRH Releases - https://oss.sonatype.org/service/local/staging/deploy/maven2 - https://oss.sonatype.org + + + staging-deploy + Local Staging Directory Releases Repository + file:${maven.multiModuleProjectDirectory}/target/staging-deploy/maven ossrh Sonatype OSSRH Snapshots https://oss.sonatype.org/content/repositories/snapshots @@ -182,16 +181,16 @@ - - ${ossrh.releases.repo.id} - ${ossrh.releases.repo.name} - ${ossrh.releases.repo.url} - - - ${ossrh.snapshots.repo.id} - ${ossrh.snapshots.repo.name} - ${ossrh.snapshots.repo.url} - + + ${local.staging.releases.repo.id} + ${local.staging.releases.repo.name} + ${local.staging.releases.repo.url} + + + ${ossrh.snapshots.repo.id} + ${ossrh.snapshots.repo.name} + ${ossrh.snapshots.repo.url} + @@ -206,39 +205,6 @@ bin - - - org.apache.maven.plugins - maven-gpg-plugin - - - sign-artifacts - verify - - sign - - - ${deploy.skip} - ${env.RELEASE_GPG_HOMEDIR} - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - ${nexus-staging.plugin.version} - false - - ${deploy.skip} - ${ossrh.releases.repo.id} - - ${ossrh.releases.repo.baseUrl} - - 60 - - org.codehaus.mojo flatten-maven-plugin @@ -269,30 +235,9 @@ org.apache.maven.plugins maven-deploy-plugin - ${maven-deploy-plugin.skip} + ${deploy.skip} - - - org.sonatype.plugins - nexus-staging-maven-plugin - - - default-deploy - deploy - - - deploy - - - - org.codehaus.mojo flatten-maven-plugin @@ -323,44 +268,4 @@ - - - release - - - performRelease - true - - - - - - org.apache.maven.plugins - maven-gpg-plugin - - - - - - - - build-reports-as-last-module - - - !some.property.that.will.never.exist - - - - reports - - - - - - diff --git a/reports/pom.xml b/reports/pom.xml deleted file mode 100644 index 7ca58593f7..0000000000 --- a/reports/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - 4.0.0 - - org.hibernate - hibernate-tools-parent - 5.6.16-SNAPSHOT - - hibernate-tools-reports - - Hibernate Tools Reports - Hibernate Tools build reports - pom - - - - org.hibernate - hibernate-tools - ${project.version} - - - org.hibernate - hibernate-tools-maven-plugin - ${project.version} - - - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - false - - - - - default-deploy - none - - - - deferred-deploy - deploy - - deploy-staged - - - - - - - From 041267cdfe68386ec5afd05818d0afb5e370df49 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 27 May 2025 16:17:57 +0200 Subject: [PATCH 556/560] HBX-2995: Backport release automation to branch 5.6 - Amend the version numbers in the Jenkinsfile - Default value 'true' for the dry run parameter in the Jenkinsfile Signed-off-by: Koen Aers --- ci/release/Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/release/Jenkinsfile b/ci/release/Jenkinsfile index f8e9a6d2e1..3122ab9ae8 100644 --- a/ci/release/Jenkinsfile +++ b/ci/release/Jenkinsfile @@ -37,18 +37,18 @@ pipeline { string( name: 'RELEASE_VERSION', defaultValue: '', - description: 'The version to be released, e.g. 5.3.37.Final.', + description: 'The version to be released, e.g. 5.6.16.Final.', trim: true ) string( name: 'DEVELOPMENT_VERSION', defaultValue: '', - description: 'The next version to be used after the release, e.g. 5.3.38-SNAPSHOT.', + description: 'The next version to be used after the release, e.g. 5.6.17-SNAPSHOT.', trim: true ) booleanParam( name: 'RELEASE_DRY_RUN', - defaultValue: false, + defaultValue: true, description: 'If true, just simulate the release, without pushing any commits or tags, and without uploading any artifacts or documentation.' ) } From 91db32b48a4e4ace4fa054eb62b6b17e442ce057 Mon Sep 17 00:00:00 2001 From: marko-bekhta Date: Mon, 16 Jun 2025 22:50:36 +0200 Subject: [PATCH 557/560] HBX-3011 Switch to Maven Central publishing --- ci/release/Jenkinsfile | 14 +++++++---- pom.xml | 54 ++++++++++++++++++++++++++++++++---------- 2 files changed, 50 insertions(+), 18 deletions(-) diff --git a/ci/release/Jenkinsfile b/ci/release/Jenkinsfile index 3122ab9ae8..6548c4177f 100644 --- a/ci/release/Jenkinsfile +++ b/ci/release/Jenkinsfile @@ -51,6 +51,11 @@ pipeline { defaultValue: true, description: 'If true, just simulate the release, without pushing any commits or tags, and without uploading any artifacts or documentation.' ) + booleanParam( + name: 'RELEASE_PUBLISH_AUTOMATICALLY', + defaultValue: true, + description: 'If true, staging repository will get closed and published automatically, otherwise the artifacts will only be uploaded and the publishing (releasing the staging repository) has to be performed manually at Maven Central portal.' + ) } stages { stage('Release') { @@ -75,6 +80,9 @@ pipeline { def releaseVersion = Version.parseReleaseVersion(params.RELEASE_VERSION) def developmentVersion = Version.parseDevelopmentVersion(params.DEVELOPMENT_VERSION) env.JRELEASER_DRY_RUN = params.RELEASE_DRY_RUN + if (!params.RELEASE_PUBLISH_AUTOMATICALLY) { + env.JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_STAGE='UPLOAD' + } echo "Performing full release for version ${releaseVersion.toString()}" withMaven(mavenSettingsConfig: params.RELEASE_DRY_RUN ? null : 'ci-hibernate.deploy.settings.maven', @@ -84,11 +92,7 @@ pipeline { // using MAVEN_GPG_PASSPHRASE (the default env variable name for passphrase in maven gpg plugin) withCredentials([file(credentialsId: 'release.gpg.private-key', variable: 'RELEASE_GPG_PRIVATE_KEY_PATH'), string(credentialsId: 'release.gpg.passphrase', variable: 'JRELEASER_GPG_PASSPHRASE'), - // TODO: Once we switch to maven-central publishing (from nexus2) we need to add a new credentials - // to use the following env variable names to set the user/password: - // JRELEASER_MAVENCENTRAL_USERNAME - // JRELEASER_MAVENCENTRAL_TOKEN - usernamePassword(credentialsId: 'ossrh.sonatype.org', passwordVariable: 'JRELEASER_NEXUS2_PASSWORD', usernameVariable: 'JRELEASER_NEXUS2_USERNAME'), + usernamePassword(credentialsId: 'central.sonatype.com', passwordVariable: 'JRELEASER_MAVENCENTRAL_TOKEN', usernameVariable: 'JRELEASER_MAVENCENTRAL_USERNAME'), string(credentialsId: 'Hibernate-CI.github.com', variable: 'JRELEASER_GITHUB_TOKEN')]) { sshagent(['ed25519.Hibernate-CI.github.com', 'hibernate.filemgmt.jboss.org', 'hibernate-ci.frs.sourceforge.net']) { sh 'cat $HOME/.ssh/config' diff --git a/pom.xml b/pom.xml index 7520c826db..4f6b77ad36 100644 --- a/pom.xml +++ b/pom.xml @@ -73,9 +73,13 @@ staging-deploy Local Staging Directory Releases Repository file:${maven.multiModuleProjectDirectory}/target/staging-deploy/maven - ossrh - Sonatype OSSRH Snapshots - https://oss.sonatype.org/content/repositories/snapshots + central-releases + Maven Central Releases Repository + https://central.sonatype.com/api/v1/publisher/ + central-snapshots + Maven Central Snapshots Repository + https://central.sonatype.com/repository/maven-snapshots/ + 1.8 1.8 @@ -181,16 +185,16 @@ - - ${local.staging.releases.repo.id} - ${local.staging.releases.repo.name} - ${local.staging.releases.repo.url} - - - ${ossrh.snapshots.repo.id} - ${ossrh.snapshots.repo.name} - ${ossrh.snapshots.repo.url} - + + ${central.releases.repo.id} + ${central.releases.repo.name} + ${central.releases.repo.url} + + + ${central.snapshots.repo.id} + ${central.snapshots.repo.name} + ${central.snapshots.repo.url} + @@ -268,4 +272,28 @@ + + + release + + + performRelease + true + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + ${local.staging.releases.repo.id}::${local.staging.releases.repo.url} + + + + + + + From 258c484b2293d861aca9f898f87750ef234b41d4 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Fri, 4 Jul 2025 15:33:43 +0200 Subject: [PATCH 558/560] HBX-3011: Switch to Maven Central publishing - change the default value of 'RELEASE_PUBLISH_AUTOMATICALLY' to 'false' - fill out default versions (5.6.16.Final and 5.6.17-SNAPSHOT respectively) Signed-off-by: Koen Aers --- ci/release/Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/release/Jenkinsfile b/ci/release/Jenkinsfile index 6548c4177f..c41042dea7 100644 --- a/ci/release/Jenkinsfile +++ b/ci/release/Jenkinsfile @@ -36,13 +36,13 @@ pipeline { parameters { string( name: 'RELEASE_VERSION', - defaultValue: '', + defaultValue: '5.6.16.Final', description: 'The version to be released, e.g. 5.6.16.Final.', trim: true ) string( name: 'DEVELOPMENT_VERSION', - defaultValue: '', + defaultValue: '5.6.17-SNAPSHOT', description: 'The next version to be used after the release, e.g. 5.6.17-SNAPSHOT.', trim: true ) @@ -53,7 +53,7 @@ pipeline { ) booleanParam( name: 'RELEASE_PUBLISH_AUTOMATICALLY', - defaultValue: true, + defaultValue: false, description: 'If true, staging repository will get closed and published automatically, otherwise the artifacts will only be uploaded and the publishing (releasing the staging repository) has to be performed manually at Maven Central portal.' ) } From cc62c08c8a7cdef01c7b3d8076337b245552a8f2 Mon Sep 17 00:00:00 2001 From: Jan Schatteman Date: Mon, 4 Aug 2025 17:27:27 +0200 Subject: [PATCH 559/560] HBX-1020 - Correction in javaDoc generation for getXXX() accessors Signed-off-by: Jan Schatteman --- main/src/main/resources/pojo/PojoPropertyAccessors.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/src/main/resources/pojo/PojoPropertyAccessors.ftl b/main/src/main/resources/pojo/PojoPropertyAccessors.ftl index 74f66a35f7..167e8515fb 100644 --- a/main/src/main/resources/pojo/PojoPropertyAccessors.ftl +++ b/main/src/main/resources/pojo/PojoPropertyAccessors.ftl @@ -3,7 +3,7 @@ <#if pojo.getMetaAttribAsBool(property, "gen-property", true)> <#if pojo.hasFieldJavaDoc(property)> /** - * ${pojo.getFieldJavaDoc(property, 4)} + ${pojo.getFieldJavaDoc(property, 4)} */ <#include "GetPropertyAnnotation.ftl"/> From 4bad6506149b3cffe3f55bb80ff2958d552edff2 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 1 Jul 2025 13:54:18 +0200 Subject: [PATCH 560/560] HBX-3083: Change the protocol of references to the hibernate mapping DTD to 'https' from 'http' Signed-off-by: Koen Aers --- .../src/main/resources/hbm/generalhbm.hbm.ftl | 2 +- .../resources/hbm/hibernate-mapping.hbm.ftl | 2 +- .../tool/ant/AntHibernateTool/TopDown.hbm.xml | 2 +- .../tool/ant/GenericExport/TopDown.hbm.xml | 2 +- .../Hbm2JavaConfiguration/SomeClass.hbm.xml | 2 +- .../SomeClass.hbm.xml | 2 +- .../hibernate/tool/ant/HbmLint/Column.hbm.xml | 2 +- .../tool/ant/HbmLint/SchemaIssues.hbm.xml | 2 +- .../tool/ant/Properties/SomeClass.hbm.xml | 2 +- .../hibernate/tool/ant/Query/query.hbm.xml | 2 +- .../ant/SchemaExportWarning/TopDown.hbm.xml | 2 +- .../ant/SchemaUpdateWarning/TopDown.hbm.xml | 2 +- .../query/QueryExporterTest/UserGroup.hbm.xml | 2 +- .../hbmlint/HbmLintTest/BrokenLazy.hbm.xml | 2 +- .../HbmLintTest/CachingSettings.hbm.xml | 2 +- .../HbmLintTest/IdentifierIssues.hbm.xml | 2 +- .../SchemaAnalyzer/SchemaIssues.hbm.xml | 2 +- .../tool/stat/Statistics/UserGroup.hbm.xml | 2 +- .../SchemaAnalyzer/SchemaIssues.hbm.xml | 2 +- .../tool/ant/Exception/TopDown.hbm.xml | 2 +- .../tool/ant/NoConnInfoExport/TopDown.hbm.xml | 2 +- .../hbm2x/DocExporterTest/Customer.hbm.xml | 2 +- .../DocExporterTest/DependentValue.hbm.xml | 2 +- .../hbm2x/DocExporterTest/HelloWorld.hbm.xml | 2 +- .../hbm2x/DocExporterTest/LineItem.hbm.xml | 2 +- .../tool/hbm2x/DocExporterTest/Order.hbm.xml | 2 +- .../hbm2x/DocExporterTest/Product.hbm.xml | 2 +- .../DocExporterTest/UnionSubclass.hbm.xml | 2 +- .../hbm2x/GenericExporterTest/Article.hbm.xml | 2 +- .../hbm2x/GenericExporterTest/Author.hbm.xml | 2 +- .../GenericExporterTest/HelloWorld.hbm.xml | 2 +- .../HashcodeEqualsTest/HashEquals.hbm.xml | 2 +- .../tool/hbm2x/Hbm2CfgTest/HelloWorld.hbm.xml | 2 +- .../tool/hbm2x/Hbm2DaoTest/Article.hbm.xml | 2 +- .../tool/hbm2x/Hbm2DaoTest/Author.hbm.xml | 2 +- .../tool/hbm2x/Hbm2EJBDaoTest/Article.hbm.xml | 2 +- .../tool/hbm2x/Hbm2EJBDaoTest/Author.hbm.xml | 2 +- .../Hbm2HibernateDAOTest/Article.hbm.xml | 2 +- .../hbm2x/Hbm2HibernateDAOTest/Author.hbm.xml | 2 +- .../Constructors.hbm.xml | 2 +- .../GenericModel.hbm.xml | 2 +- .../hbm2x/Hbm2JavaEjb3Test/Article.hbm.xml | 2 +- .../hbm2x/Hbm2JavaEjb3Test/Author.hbm.xml | 2 +- .../hbm2x/Hbm2JavaEjb3Test/Passenger.hbm.xml | 2 +- .../tool/hbm2x/Hbm2JavaEjb3Test/Train.hbm.xml | 2 +- .../Article.hbm.xml | 2 +- .../Hbm2JavaInitializationTest/Author.hbm.xml | 2 +- .../Passenger.hbm.xml | 2 +- .../Hbm2JavaInitializationTest/Train.hbm.xml | 2 +- .../tool/hbm2x/Hbm2JavaTest/Customer.hbm.xml | 2 +- .../hbm2x/Hbm2JavaTest/HelloWorld.hbm.xml | 2 +- .../tool/hbm2x/Hbm2JavaTest/LineItem.hbm.xml | 2 +- .../tool/hbm2x/Hbm2JavaTest/Order.hbm.xml | 2 +- .../tool/hbm2x/Hbm2JavaTest/Passenger.hbm.xml | 2 +- .../tool/hbm2x/Hbm2JavaTest/Product.hbm.xml | 2 +- .../tool/hbm2x/Hbm2JavaTest/Train.hbm.xml | 2 +- .../hbm2x/OtherCfg2HbmTest/Customer.hbm.xml | 2 +- .../hbm2x/OtherCfg2HbmTest/HelloWorld.hbm.xml | 2 +- .../hbm2x/OtherCfg2HbmTest/LineItem.hbm.xml | 2 +- .../tool/hbm2x/OtherCfg2HbmTest/Order.hbm.xml | 2 +- .../hbm2x/OtherCfg2HbmTest/Product.hbm.xml | 2 +- .../hbm2x/PropertiesTest/Properties.hbm.xml | 2 +- .../hbm2x/hbm2hbmxml/AbstractTest/Car.hbm.xml | 2 +- .../hbm2x/hbm2hbmxml/BackrefTest/Car.hbm.xml | 2 +- .../CompositeElementTest/Glarch.hbm.xml | 2 +- .../DynamicComponentTest/Glarch.hbm.xml | 2 +- .../hbm2hbmxml/Hbm2HbmXmlTest/Basic.hbm.xml | 22 +++++++++---------- .../Hbm2HbmXmlTest/BasicCompositeId.hbm.xml | 2 +- .../Hbm2HbmXmlTest/BasicGlobals.hbm.xml | 2 +- .../Hbm2HbmXmlTest/ClassFullAttribute.hbm.xml | 2 +- .../hbm2hbmxml/IdBagTest/UserGroup.hbm.xml | 2 +- .../hbm2hbmxml/InheritanceTest/Aliens.hbm.xml | 2 +- .../hbm2hbmxml/ListArrayTest/Glarch.hbm.xml | 2 +- .../ManyToManyTest/UserGroup.hbm.xml | 2 +- .../hbm2hbmxml/MapAndAnyTest/Person.hbm.xml | 2 +- .../MapAndAnyTest/Properties.hbm.xml | 2 +- .../PersonAddressOneToOnePrimaryKey.hbm.xml | 2 +- .../hbm2hbmxml/SetElementTest/Search.hbm.xml | 2 +- .../hbm2hbmxml/TypeParamsTest/Order.hbm.xml | 2 +- .../completion/ModelCompletion/City.hbm.xml | 2 +- .../ModelCompletion/Product.hbm.xml | 2 +- .../ProductOwnerAddress.hbm.xml | 2 +- .../completion/ModelCompletion/Store.hbm.xml | 2 +- .../ModelCompletion/StoreCity.hbm.xml | 2 +- .../SchemaAnalyzer/SchemaIssues.hbm.xml | 2 +- .../tools/test/util/HelloWorld.hbm.xml | 2 +- 86 files changed, 96 insertions(+), 96 deletions(-) diff --git a/main/src/main/resources/hbm/generalhbm.hbm.ftl b/main/src/main/resources/hbm/generalhbm.hbm.ftl index bf73afd337..5d9d8e982c 100644 --- a/main/src/main/resources/hbm/generalhbm.hbm.ftl +++ b/main/src/main/resources/hbm/generalhbm.hbm.ftl @@ -1,7 +1,7 @@ + "https://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> <#if hmgs?exists && hmgs.hasNonDefaultSettings()> diff --git a/test/common/src/main/resources/org/hibernate/tool/ant/AntHibernateTool/TopDown.hbm.xml b/test/common/src/main/resources/org/hibernate/tool/ant/AntHibernateTool/TopDown.hbm.xml index 7423324ed5..767bd5de29 100644 --- a/test/common/src/main/resources/org/hibernate/tool/ant/AntHibernateTool/TopDown.hbm.xml +++ b/test/common/src/main/resources/org/hibernate/tool/ant/AntHibernateTool/TopDown.hbm.xml @@ -1,7 +1,7 @@ + "https://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> diff --git a/test/common/src/main/resources/org/hibernate/tool/ant/GenericExport/TopDown.hbm.xml b/test/common/src/main/resources/org/hibernate/tool/ant/GenericExport/TopDown.hbm.xml index 7423324ed5..767bd5de29 100644 --- a/test/common/src/main/resources/org/hibernate/tool/ant/GenericExport/TopDown.hbm.xml +++ b/test/common/src/main/resources/org/hibernate/tool/ant/GenericExport/TopDown.hbm.xml @@ -1,7 +1,7 @@ + "https://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> diff --git a/test/common/src/main/resources/org/hibernate/tool/ant/Hbm2JavaConfiguration/SomeClass.hbm.xml b/test/common/src/main/resources/org/hibernate/tool/ant/Hbm2JavaConfiguration/SomeClass.hbm.xml index 6f660da374..a18a73271f 100644 --- a/test/common/src/main/resources/org/hibernate/tool/ant/Hbm2JavaConfiguration/SomeClass.hbm.xml +++ b/test/common/src/main/resources/org/hibernate/tool/ant/Hbm2JavaConfiguration/SomeClass.hbm.xml @@ -1,7 +1,7 @@ + "https://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> diff --git a/test/common/src/main/resources/org/hibernate/tool/ant/Hbm2JavaEJB3Configuration/SomeClass.hbm.xml b/test/common/src/main/resources/org/hibernate/tool/ant/Hbm2JavaEJB3Configuration/SomeClass.hbm.xml index 6f660da374..a18a73271f 100644 --- a/test/common/src/main/resources/org/hibernate/tool/ant/Hbm2JavaEJB3Configuration/SomeClass.hbm.xml +++ b/test/common/src/main/resources/org/hibernate/tool/ant/Hbm2JavaEJB3Configuration/SomeClass.hbm.xml @@ -1,7 +1,7 @@ + "https://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> diff --git a/test/common/src/main/resources/org/hibernate/tool/ant/HbmLint/Column.hbm.xml b/test/common/src/main/resources/org/hibernate/tool/ant/HbmLint/Column.hbm.xml index 658bef462f..54b5df61c2 100644 --- a/test/common/src/main/resources/org/hibernate/tool/ant/HbmLint/Column.hbm.xml +++ b/test/common/src/main/resources/org/hibernate/tool/ant/HbmLint/Column.hbm.xml @@ -1,7 +1,7 @@ + "https://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> diff --git a/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/DocExporterTest/HelloWorld.hbm.xml b/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/DocExporterTest/HelloWorld.hbm.xml index 8c4356fb7e..1154536904 100644 --- a/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/DocExporterTest/HelloWorld.hbm.xml +++ b/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/DocExporterTest/HelloWorld.hbm.xml @@ -1,7 +1,7 @@ + "https://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> @@ -24,24 +24,24 @@ next_hi_value - - description - + - + - + - anotherone + anotherone - + diff --git a/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/Hbm2HbmXmlTest/BasicCompositeId.hbm.xml b/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/Hbm2HbmXmlTest/BasicCompositeId.hbm.xml index a84fb49183..61302ff3d6 100644 --- a/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/Hbm2HbmXmlTest/BasicCompositeId.hbm.xml +++ b/test/nodb/src/test/resources/org/hibernate/tool/hbm2x/hbm2hbmxml/Hbm2HbmXmlTest/BasicCompositeId.hbm.xml @@ -1,7 +1,7 @@ + "https://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> diff --git a/test/nodb/src/test/resources/org/hibernate/tool/ide/completion/ModelCompletion/City.hbm.xml b/test/nodb/src/test/resources/org/hibernate/tool/ide/completion/ModelCompletion/City.hbm.xml index a685453b2b..156ecb7007 100644 --- a/test/nodb/src/test/resources/org/hibernate/tool/ide/completion/ModelCompletion/City.hbm.xml +++ b/test/nodb/src/test/resources/org/hibernate/tool/ide/completion/ModelCompletion/City.hbm.xml @@ -1,6 +1,6 @@ + "https://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> diff --git a/test/nodb/src/test/resources/org/hibernate/tool/ide/completion/ModelCompletion/Product.hbm.xml b/test/nodb/src/test/resources/org/hibernate/tool/ide/completion/ModelCompletion/Product.hbm.xml index 1b83e2f516..8ceb587ace 100644 --- a/test/nodb/src/test/resources/org/hibernate/tool/ide/completion/ModelCompletion/Product.hbm.xml +++ b/test/nodb/src/test/resources/org/hibernate/tool/ide/completion/ModelCompletion/Product.hbm.xml @@ -1,6 +1,6 @@ + "https://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> diff --git a/test/nodb/src/test/resources/org/hibernate/tool/ide/completion/ModelCompletion/ProductOwnerAddress.hbm.xml b/test/nodb/src/test/resources/org/hibernate/tool/ide/completion/ModelCompletion/ProductOwnerAddress.hbm.xml index 2acf2e0514..c52c608321 100644 --- a/test/nodb/src/test/resources/org/hibernate/tool/ide/completion/ModelCompletion/ProductOwnerAddress.hbm.xml +++ b/test/nodb/src/test/resources/org/hibernate/tool/ide/completion/ModelCompletion/ProductOwnerAddress.hbm.xml @@ -1,6 +1,6 @@ + "https://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> diff --git a/test/nodb/src/test/resources/org/hibernate/tool/ide/completion/ModelCompletion/Store.hbm.xml b/test/nodb/src/test/resources/org/hibernate/tool/ide/completion/ModelCompletion/Store.hbm.xml index 9e32e387e9..ae2dc5e0d1 100644 --- a/test/nodb/src/test/resources/org/hibernate/tool/ide/completion/ModelCompletion/Store.hbm.xml +++ b/test/nodb/src/test/resources/org/hibernate/tool/ide/completion/ModelCompletion/Store.hbm.xml @@ -1,6 +1,6 @@ + "https://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> diff --git a/test/nodb/src/test/resources/org/hibernate/tool/ide/completion/ModelCompletion/StoreCity.hbm.xml b/test/nodb/src/test/resources/org/hibernate/tool/ide/completion/ModelCompletion/StoreCity.hbm.xml index db806a886f..92c597c355 100644 --- a/test/nodb/src/test/resources/org/hibernate/tool/ide/completion/ModelCompletion/StoreCity.hbm.xml +++ b/test/nodb/src/test/resources/org/hibernate/tool/ide/completion/ModelCompletion/StoreCity.hbm.xml @@ -1,6 +1,6 @@ + "https://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> diff --git a/test/oracle/src/test/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/SchemaIssues.hbm.xml b/test/oracle/src/test/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/SchemaIssues.hbm.xml index bc82183d72..cf708c66bc 100644 --- a/test/oracle/src/test/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/SchemaIssues.hbm.xml +++ b/test/oracle/src/test/resources/org/hibernate/tool/hbmlint/SchemaAnalyzer/SchemaIssues.hbm.xml @@ -1,7 +1,7 @@ + "https://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> diff --git a/test/utils/src/test/resources/org/hibernate/tools/test/util/HelloWorld.hbm.xml b/test/utils/src/test/resources/org/hibernate/tools/test/util/HelloWorld.hbm.xml index 82989a5032..9588363b32 100644 --- a/test/utils/src/test/resources/org/hibernate/tools/test/util/HelloWorld.hbm.xml +++ b/test/utils/src/test/resources/org/hibernate/tools/test/util/HelloWorld.hbm.xml @@ -1,7 +1,7 @@ + "https://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">