From 2e85504dc64f3b334f8c90f31c678b00f629c244 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 5 Apr 2019 10:47:43 +0200 Subject: [PATCH] Added an explicit test against Hibernate 5.2.18.Final --- src/it/{hib-test => hib-test-4.3.0}/h2.sql | 0 .../{hib-test => hib-test-4.3.0}/oracle.sql | 0 src/it/{hib-test => hib-test-4.3.0}/pom.xml | 0 .../{hib-test => hib-test-4.3.0}/postgres.sql | 0 .../tests/SimplestMavenHib4Test.java | 0 .../hibernate4/tests/package-info.java | 0 .../{hib-test => hib-test-4.3.0}/verify.bsh | 0 src/it/hib-test-5.2.18/h2.sql | 10 +++ src/it/hib-test-5.2.18/oracle.sql | 10 +++ src/it/hib-test-5.2.18/pom.xml | 87 +++++++++++++++++++ src/it/hib-test-5.2.18/postgres.sql | 10 +++ .../tests/SimplestMavenHib4Test.java | 37 ++++++++ .../hibernate4/tests/package-info.java | 2 + src/it/hib-test-5.2.18/verify.bsh | 11 +++ 14 files changed, 167 insertions(+) rename src/it/{hib-test => hib-test-4.3.0}/h2.sql (100%) rename src/it/{hib-test => hib-test-4.3.0}/oracle.sql (100%) rename src/it/{hib-test => hib-test-4.3.0}/pom.xml (100%) rename src/it/{hib-test => hib-test-4.3.0}/postgres.sql (100%) rename src/it/{hib-test => hib-test-4.3.0}/src/main/java/de/juplo/plugins/hibernate4/tests/SimplestMavenHib4Test.java (100%) rename src/it/{hib-test => hib-test-4.3.0}/src/main/java/de/juplo/plugins/hibernate4/tests/package-info.java (100%) rename src/it/{hib-test => hib-test-4.3.0}/verify.bsh (100%) create mode 100644 src/it/hib-test-5.2.18/h2.sql create mode 100644 src/it/hib-test-5.2.18/oracle.sql create mode 100644 src/it/hib-test-5.2.18/pom.xml create mode 100644 src/it/hib-test-5.2.18/postgres.sql create mode 100644 src/it/hib-test-5.2.18/src/main/java/de/juplo/plugins/hibernate4/tests/SimplestMavenHib4Test.java create mode 100644 src/it/hib-test-5.2.18/src/main/java/de/juplo/plugins/hibernate4/tests/package-info.java create mode 100644 src/it/hib-test-5.2.18/verify.bsh diff --git a/src/it/hib-test/h2.sql b/src/it/hib-test-4.3.0/h2.sql similarity index 100% rename from src/it/hib-test/h2.sql rename to src/it/hib-test-4.3.0/h2.sql diff --git a/src/it/hib-test/oracle.sql b/src/it/hib-test-4.3.0/oracle.sql similarity index 100% rename from src/it/hib-test/oracle.sql rename to src/it/hib-test-4.3.0/oracle.sql diff --git a/src/it/hib-test/pom.xml b/src/it/hib-test-4.3.0/pom.xml similarity index 100% rename from src/it/hib-test/pom.xml rename to src/it/hib-test-4.3.0/pom.xml diff --git a/src/it/hib-test/postgres.sql b/src/it/hib-test-4.3.0/postgres.sql similarity index 100% rename from src/it/hib-test/postgres.sql rename to src/it/hib-test-4.3.0/postgres.sql diff --git a/src/it/hib-test/src/main/java/de/juplo/plugins/hibernate4/tests/SimplestMavenHib4Test.java b/src/it/hib-test-4.3.0/src/main/java/de/juplo/plugins/hibernate4/tests/SimplestMavenHib4Test.java similarity index 100% rename from src/it/hib-test/src/main/java/de/juplo/plugins/hibernate4/tests/SimplestMavenHib4Test.java rename to src/it/hib-test-4.3.0/src/main/java/de/juplo/plugins/hibernate4/tests/SimplestMavenHib4Test.java diff --git a/src/it/hib-test/src/main/java/de/juplo/plugins/hibernate4/tests/package-info.java b/src/it/hib-test-4.3.0/src/main/java/de/juplo/plugins/hibernate4/tests/package-info.java similarity index 100% rename from src/it/hib-test/src/main/java/de/juplo/plugins/hibernate4/tests/package-info.java rename to src/it/hib-test-4.3.0/src/main/java/de/juplo/plugins/hibernate4/tests/package-info.java diff --git a/src/it/hib-test/verify.bsh b/src/it/hib-test-4.3.0/verify.bsh similarity index 100% rename from src/it/hib-test/verify.bsh rename to src/it/hib-test-4.3.0/verify.bsh diff --git a/src/it/hib-test-5.2.18/h2.sql b/src/it/hib-test-5.2.18/h2.sql new file mode 100644 index 00000000..fd15b3fa --- /dev/null +++ b/src/it/hib-test-5.2.18/h2.sql @@ -0,0 +1,10 @@ + + create table test_simple ( + uuid varchar(36) not null, + content clob, + created timestamp, + externalid varchar(148), + sources varchar(255), + primary key (uuid) + ); +create index idx_test_simple_tuple on test_simple (sources, uuid); diff --git a/src/it/hib-test-5.2.18/oracle.sql b/src/it/hib-test-5.2.18/oracle.sql new file mode 100644 index 00000000..38caf329 --- /dev/null +++ b/src/it/hib-test-5.2.18/oracle.sql @@ -0,0 +1,10 @@ + + create table test_simple ( + uuid varchar2(36 char) not null, + content clob, + created timestamp, + externalid varchar2(148 char), + sources varchar2(255 char), + primary key (uuid) + ); +create index idx_test_simple_tuple on test_simple (sources, uuid); diff --git a/src/it/hib-test-5.2.18/pom.xml b/src/it/hib-test-5.2.18/pom.xml new file mode 100644 index 00000000..b60eb245 --- /dev/null +++ b/src/it/hib-test-5.2.18/pom.xml @@ -0,0 +1,87 @@ + + + 4.0.0 + de.juplo + hibernate4-basictest + Hibernate 4 Test + 0.1-SNAPSHOT + jar + + + + + + org.hibernate + hibernate-core + 5.2.18.Final + + + org.jadira.usertype + usertype.jodatime + 2.0.1 + + + joda-time + joda-time + 2.7 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.0.2 + + 1.7 + 1.7 + utf8 + true + + + + + de.juplo + hibernate-maven-plugin + @project.version@ + + + false + true + + + + create-h2-ddl + + create + + + org.hibernate.dialect.H2Dialect + h2.sql + + + + create-postgres-ddl + + create + + + org.hibernate.dialect.PostgreSQL82Dialect + postgres.sql + + + + create-oracle-ddl + + create + + + org.hibernate.dialect.Oracle10gDialect + oracle.sql + + + + + + + diff --git a/src/it/hib-test-5.2.18/postgres.sql b/src/it/hib-test-5.2.18/postgres.sql new file mode 100644 index 00000000..7624731c --- /dev/null +++ b/src/it/hib-test-5.2.18/postgres.sql @@ -0,0 +1,10 @@ + + create table test_simple ( + uuid varchar(36) not null, + content text, + created timestamp, + externalid varchar(148), + sources varchar(255), + primary key (uuid) + ); +create index idx_test_simple_tuple on test_simple (sources, uuid); diff --git a/src/it/hib-test-5.2.18/src/main/java/de/juplo/plugins/hibernate4/tests/SimplestMavenHib4Test.java b/src/it/hib-test-5.2.18/src/main/java/de/juplo/plugins/hibernate4/tests/SimplestMavenHib4Test.java new file mode 100644 index 00000000..3e647471 --- /dev/null +++ b/src/it/hib-test-5.2.18/src/main/java/de/juplo/plugins/hibernate4/tests/SimplestMavenHib4Test.java @@ -0,0 +1,37 @@ +package de.juplo.plugins.hibernate4.tests; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Lob; +import javax.persistence.Table; + +import org.hibernate.annotations.Index; +import org.hibernate.annotations.Type; +import org.joda.time.DateTime; + +@Entity +@Table(name = "test_simple") +@org.hibernate.annotations.Table( + appliesTo="test_simple", + indexes = { + @Index(name="idx_test_simple_tuple", columnNames={"sources", "uuid"} ), + } +) +public class SimplestMavenHib4Test { + + private String sources; + + @Lob + private String content; + + @Id + @Column (length=36) + private String uuid; + + @Column(name = "externalid", length=148) + private String externalXyzId; + + @Type(type = "joda") + private DateTime created; +} diff --git a/src/it/hib-test-5.2.18/src/main/java/de/juplo/plugins/hibernate4/tests/package-info.java b/src/it/hib-test-5.2.18/src/main/java/de/juplo/plugins/hibernate4/tests/package-info.java new file mode 100644 index 00000000..23554cc4 --- /dev/null +++ b/src/it/hib-test-5.2.18/src/main/java/de/juplo/plugins/hibernate4/tests/package-info.java @@ -0,0 +1,2 @@ +@org.hibernate.annotations.TypeDef(name = "joda", typeClass = org.jadira.usertype.dateandtime.joda.PersistentDateTime.class) +package de.juplo.plugins.hibernate4.tests; diff --git a/src/it/hib-test-5.2.18/verify.bsh b/src/it/hib-test-5.2.18/verify.bsh new file mode 100644 index 00000000..ac2ae58a --- /dev/null +++ b/src/it/hib-test-5.2.18/verify.bsh @@ -0,0 +1,11 @@ +import de.juplo.test.FileComparator; + + +FileComparator comparator = new FileComparator(basedir); + +if (!comparator.isEqual("h2.sql","target/h2.sql")) + return false; +if (!comparator.isEqual("oracle.sql","target/oracle.sql")) + return false; +if (!comparator.isEqual("postgres.sql","target/postgres.sql")) + return false; -- 2.20.1