From f6311d32a8b43918ab5d777be8a9a183927d9778 Mon Sep 17 00:00:00 2001 From: Christian Beikov Date: Mon, 22 Apr 2024 19:16:28 +0200 Subject: [PATCH] Wip --- jpa/bin/pom.xml | 112 +++++++++++++++++- jpa/platform-tests/pom.xml | 8 ++ jpa/pom.xml | 14 +++ jpa/spec-tests/pom.xml | 58 +++++++++ .../discriminatorColumn/Client.java | 5 +- .../annotations/enumerated/Client.java | 5 +- .../annotations/id/Client.java | 5 +- .../annotations/index/Client.java | 18 ++- .../annotations/joinTable/Client.java | 29 +++-- .../annotations/orderColumn/Client.java | 21 +++- .../annotations/secondaryTable/Client.java | 18 ++- .../annotations/table/Client.java | 8 +- .../annotations/temporal/Client.java | 5 +- .../annotations/uniqueConstraint/Client.java | 10 +- .../annotations/version/Client.java | 5 +- .../se/schemaGeneration/scripts/Client.java | 52 ++++++-- jpa/tck-dist/artifact-install.bat | 43 +++++++ jpa/tck-dist/src/main/assembly/assembly.xml | 3 +- pom.xml | 9 +- sql/postgresql/postgresql.ddl.persistence.sql | 4 +- .../src/main/jbake/content/rules-wp.adoc | 2 +- .../src/main/jbake/content/rules.adoc | 2 +- websocket/common/pom.xml | 8 ++ websocket/platform-tests/pom.xml | 8 ++ websocket/pom.xml | 8 ++ websocket/spec-tests/pom.xml | 8 ++ websocket/tck-dist/pom.xml | 8 ++ 27 files changed, 424 insertions(+), 52 deletions(-) create mode 100644 jpa/tck-dist/artifact-install.bat diff --git a/jpa/bin/pom.xml b/jpa/bin/pom.xml index ecbf2c0869..35a961b313 100644 --- a/jpa/bin/pom.xml +++ b/jpa/bin/pom.xml @@ -361,8 +361,8 @@ ${jakarta.persistence.jdbc.url} ${jakarta.persistence.jdbc.user} ${jakarta.persistence.jdbc.password} - eclipselink.logging.level=OFF - true + ${jpa.provider.implementation.specific.properties} + ${persistence.second.level.caching.supported} standalone /tmp ${db.supports.sequence} @@ -370,7 +370,7 @@ SELECT ID, TOTAL FROM PURCHASE_ORDER WHERE ID=? /tmp ${jdbc.db} - ${glassfish.module.dir}/jakarta.persistence-api.jar:${project.build.directory}/jdk11-bundle/java.base:${project.build.directory}/jdk11-bundle/java.rmi:${project.build.directory}/jdk11-bundle/java.sql:${project.build.directory}/jdk11-bundle/java.naming + ${glassfish.module.dir}/jakarta.persistence-api.jar${path.separator}${project.build.directory}/jdk11-bundle/java.base${path.separator}${project.build.directory}/jdk11-bundle/java.rmi${path.separator}${project.build.directory}/jdk11-bundle/java.sql${path.separator}${project.build.directory}/jdk11-bundle/java.naming ${project.build.directory}/jdk11-bundle @@ -399,8 +399,8 @@ ${jakarta.persistence.jdbc.url} ${jakarta.persistence.jdbc.user} ${jakarta.persistence.jdbc.password} - eclipselink.logging.level=OFF - true + ${jpa.provider.implementation.specific.properties} + ${persistence.second.level.caching.supported} standalone /tmp ${db.supports.sequence} @@ -593,5 +593,107 @@ + + hibernate + + glassfish + 7.0.0-SNAPSHOT + + + + + org.hibernate.orm + hibernate-platform + ${hibernate.version} + pom + import + + + + + + org.hibernate.orm + hibernate-core + + + org.hibernate.orm + hibernate-testing + + + org.hibernate.models + hibernate-models + + + io.smallrye + jandex + + + org.antlr + antlr4-runtime + + + net.bytebuddy + byte-buddy + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-hibernate-lib + pre-integration-test + + copy + + + ${glassfish.module.dir} + + + org.hibernate.orm + hibernate-core + true + hibernate-core.jar + + + org.hibernate.orm + hibernate-testing + true + hibernate-testing.jar + + + org.hibernate.models + hibernate-models + true + hibernate-models.jar + + + io.smallrye + jandex + true + jandex.jar + + + org.antlr + antlr4-runtime + true + antlr4-runtime.jar + + + net.bytebuddy + byte-buddy + true + byte-buddy.jar + + + + + + + + + \ No newline at end of file diff --git a/jpa/platform-tests/pom.xml b/jpa/platform-tests/pom.xml index a36f23892d..a6fc03058e 100644 --- a/jpa/platform-tests/pom.xml +++ b/jpa/platform-tests/pom.xml @@ -26,6 +26,14 @@ persistence-tck-platform-tests jar + + + + repo2 + staging repo + https://jakarta.oss.sonatype.org/content/repositories/staging + + jakarta.servlet diff --git a/jpa/pom.xml b/jpa/pom.xml index 5b8cc358eb..c47f7f1d8a 100644 --- a/jpa/pom.xml +++ b/jpa/pom.xml @@ -30,6 +30,14 @@ pom persistence persistence tck tests + + + + repo2 + staging repo + https://jakarta.oss.sonatype.org/content/repositories/staging + + common docs/userguide @@ -96,6 +104,12 @@ shrinkwrap-api 1.2.6 + + org.jboss.shrinkwrap.resolver + shrinkwrap-resolver-depchain + 3.1.4 + pom + diff --git a/jpa/spec-tests/pom.xml b/jpa/spec-tests/pom.xml index 041de1980b..30f2ec9ee6 100644 --- a/jpa/spec-tests/pom.xml +++ b/jpa/spec-tests/pom.xml @@ -89,4 +89,62 @@ + + + hibernate + + 7.0.0-SNAPSHOT + + + + + org.hibernate.orm + hibernate-platform + ${hibernate.version} + pom + import + + + + + + org.hibernate.orm + hibernate-core + + + org.hibernate.orm + hibernate-testing + + + org.hibernate.models + hibernate-models + + + io.smallrye + jandex + + + org.antlr + antlr4-runtime + + + net.bytebuddy + byte-buddy + + + + + postgresql + + 7.0.0-SNAPSHOT + + + + org.postgresql + postgresql + 42.6.2 + + + + diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/discriminatorColumn/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/discriminatorColumn/Client.java index b4eeea9d44..7002dfb984 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/discriminatorColumn/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/discriminatorColumn/Client.java @@ -131,7 +131,10 @@ public void discriminatorColumnTest() throws Exception { // CREATE TABLE SCHEMAGENSIMPLE (ID INTEGER NOT NULL, PRODUCT_TYPE // VARCHAR(31), PRIMARY KEY (ID)) - pass2 = findDataInFile(f2, "DROP TABLE SCHEMAGENSIMPLE"); + expected.clear(); + expected.add("DROP TABLE"); + expected.add("SCHEMAGENSIMPLE"); + pass2 = findDataInFile(f2, expected); logger.log(Logger.Level.TRACE, "Execute the create script"); props = getPersistenceUnitProperties(); diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/enumerated/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/enumerated/Client.java index 89a3645cdc..70deaa180a 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/enumerated/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/enumerated/Client.java @@ -131,7 +131,10 @@ public void enumeratedTest() throws Exception { // CREATE TABLE SCHEMAGENSIMPLE (ID INTEGER NOT NULL, ENUMDATA VARCHAR(255), // PRIMARY KEY (ID)) - pass2 = findDataInFile(f2, "DROP TABLE SCHEMAGENSIMPLE"); + expected.clear(); + expected.add("DROP TABLE"); + expected.add("SCHEMAGENSIMPLE"); + pass2 = findDataInFile(f2, expected); logger.log(Logger.Level.TRACE, "Execute the create script"); props = getPersistenceUnitProperties(); diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/id/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/id/Client.java index 3d5f804769..de0f305069 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/id/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/id/Client.java @@ -131,7 +131,10 @@ public void idTest() throws Exception { pass1 = findDataInFile(f1, expected); // CREATE TABLE SCHEMAGENSIMPLE (ID INTEGER NOT NULL, PRIMARY KEY (ID)) - pass2 = findDataInFile(f2, "DROP TABLE SCHEMAGENSIMPLE"); + expected.clear(); + expected.add("DROP TABLE"); + expected.add("SCHEMAGENSIMPLE"); + pass2 = findDataInFile(f2, expected); logger.log(Logger.Level.TRACE, "Execute the create script"); props = getPersistenceUnitProperties(); diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/index/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/index/Client.java index 5204ae0233..ce783bf1e6 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/index/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/index/Client.java @@ -157,7 +157,8 @@ public void indexTest() throws Exception { * INDEX SCHEMAGENSIMPLE_SVALUE3 ON SCHEMAGENSIMPLE (SVALUE3) */ expected.clear(); - expected.add("ALTER TABLE SCHEMAGENSIMPLE"); + expected.add("ALTER TABLE"); + expected.add("SCHEMAGENSIMPLE"); expected.add("ADD"); expected.add("INDEX SCHEMAGENSIMPLE_SVALUE_ASC"); @@ -165,7 +166,8 @@ public void indexTest() throws Exception { pass1b = pass1b || findDataInFile(f1, expected); expected.clear(); - expected.add("ALTER TABLE SCHEMAGENSIMPLE"); + expected.add("ALTER TABLE"); + expected.add("SCHEMAGENSIMPLE"); expected.add("ADD"); expected.add("INDEX SCHEMAGENSIMPLE_SVALUE2_DESC"); @@ -173,7 +175,8 @@ public void indexTest() throws Exception { pass1c = pass1c || findDataInFile(f1, expected); expected.clear(); - expected.add("ALTER TABLE SCHEMAGENSIMPLE"); + expected.add("ALTER TABLE"); + expected.add("SCHEMAGENSIMPLE"); expected.add("ADD"); expected.add("UNIQUE"); expected.add("INDEX SCHEMAGENSIMPLE_SVALUE3"); @@ -182,15 +185,20 @@ public void indexTest() throws Exception { pass1d = pass1d || findDataInFile(f1, expected); expected.clear(); - expected.add("ALTER TABLE SCHEMAGENSIMPLE"); + expected.add("ALTER TABLE"); + expected.add("SCHEMAGENSIMPLE"); expected.add("ADD"); expected.add("CONSTRAINT"); expected.add("SCHEMAGENSIMPLE_SVALUE3"); expected.add("UNIQUE"); + pass1d = pass1d || findDataInFile(f1, "CONSTRAINT SCHEMAGENSIMPLE_SVALUE3 UNIQUE (SVALUE3)"); pass1d = pass1d || findDataInFile(f1, expected); - pass2a = findDataInFile(f2, "DROP TABLE SCHEMAGENSIMPLE"); + expected.clear(); + expected.add("DROP TABLE"); + expected.add("SCHEMAGENSIMPLE"); + pass2a = findDataInFile(f2, expected); /* * Index can be dropped using ALTER TABLE AS WELL Bug 27422087: Some databases * do drop things such as indexes and constraints associated with a table when diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/joinTable/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/joinTable/Client.java index 90565f0d36..24ca305dd0 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/joinTable/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/joinTable/Client.java @@ -160,13 +160,15 @@ public void joinTableTest() throws Exception { pass1c = findDataInFile(f1, expected); expected.clear(); - expected.add("ALTER TABLE SCHEMAGEN_COURSE_STUDENT ADD"); + expected.add("ALTER TABLE"); + expected.add("SCHEMAGEN_COURSE_STUDENT ADD"); expected.add("CONSTRAINT STUDENTIDCONSTRAINT"); expected.add("SCHEMAGENSTUDENT"); pass1d = findDataInFile(f1, expected); expected.clear(); - expected.add("ALTER TABLE SCHEMAGEN_COURSE_STUDENT ADD"); + expected.add("ALTER TABLE"); + expected.add("SCHEMAGEN_COURSE_STUDENT ADD"); expected.add("CONSTRAINT COURSEIDCONSTRAINT"); expected.add("SCHEMAGENCOURSE"); pass1e = findDataInFile(f1, expected); @@ -186,20 +188,33 @@ public void joinTableTest() throws Exception { pass2a = findDataInFile(f2, new LinkedList() { private static final long serialVersionUID = 22L; { - add("ALTER TABLE SCHEMAGEN_COURSE_STUDENT DROP"); + add("ALTER TABLE"); + add("SCHEMAGEN_COURSE_STUDENT DROP"); add("STUDENTIDCONSTRAINT"); } }); pass2b = findDataInFile(f2, new LinkedList() { private static final long serialVersionUID = 22L; { - add("ALTER TABLE SCHEMAGEN_COURSE_STUDENT DROP"); + add("ALTER TABLE"); + add("SCHEMAGEN_COURSE_STUDENT DROP"); add("COURSEIDCONSTRAINT"); } }); - pass2c = findDataInFile(f2, "DROP TABLE SCHEMAGEN_COURSE_STUDENT"); - pass2d = findDataInFile(f2, "DROP TABLE SCHEMAGENCOURSE"); - pass2e = findDataInFile(f2, "DROP TABLE SCHEMAGENSTUDENT"); + expected.clear(); + expected.add("DROP TABLE"); + expected.add("SCHEMAGEN_COURSE_STUDENT"); + pass2c = findDataInFile(f2, expected); + + expected.clear(); + expected.add("DROP TABLE"); + expected.add("SCHEMAGENCOURSE"); + pass2d = findDataInFile(f2, expected); + + expected.clear(); + expected.add("DROP TABLE"); + expected.add("SCHEMAGENSTUDENT"); + pass2e = findDataInFile(f2, expected); logger.log(Logger.Level.TRACE, "Execute the create script"); props = getPersistenceUnitProperties(); diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/orderColumn/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/orderColumn/Client.java index 65801e3868..fc632f6943 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/orderColumn/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/orderColumn/Client.java @@ -146,8 +146,10 @@ public void orderColumnTest() throws Exception { expected.add("PRIMARY KEY (DEPTID)"); pass1b = findDataInFile(f1, expected); - pass1c = findDataInFile(f1, - "ALTER TABLE SCHEMAGENEMP ADD CONSTRAINT MYCONSTRANT FOREIGN KEY (FK_DEPT) REFERENCES SCHEMAGENDEPT (DEPTID)"); + expected.clear(); + expected.add("ALTER TABLE"); + expected.add("SCHEMAGENEMP ADD CONSTRAINT MYCONSTRANT FOREIGN KEY (FK_DEPT) REFERENCES SCHEMAGENDEPT (DEPTID)"); + pass1c = findDataInFile(f1, expected); /* * CREATE TABLE SCHEMAGENDEPT (DEPTID INTEGER NOT NULL, PRIMARY KEY (DEPTID)) @@ -157,9 +159,18 @@ public void orderColumnTest() throws Exception { * (DEPTID) */ - pass2a = findDataInFile(f2, "DROP TABLE SCHEMAGENEMP"); - pass2b = findDataInFile(f2, "DROP TABLE SCHEMAGENDEPT"); - pass2c = findDataInFile(f2, "ALTER TABLE SCHEMAGENEMP DROP"); + expected.clear(); + expected.add("DROP TABLE"); + expected.add("SCHEMAGENEMP"); + pass2a = findDataInFile(f2, expected); + expected.clear(); + expected.add("DROP TABLE"); + expected.add("SCHEMAGENDEPT"); + pass2b = findDataInFile(f2, expected); + expected.clear(); + expected.add("ALTER TABLE"); + expected.add("SCHEMAGENEMP DROP"); + pass2c = findDataInFile(f2, expected); logger.log(Logger.Level.TRACE, "Execute the create script"); props = getPersistenceUnitProperties(); diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/secondaryTable/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/secondaryTable/Client.java index d7f04eb46f..bc3fe2d769 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/secondaryTable/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/secondaryTable/Client.java @@ -142,7 +142,8 @@ public void secondaryTableTest() throws Exception { pass1b = findDataInFile(f1, expected); expected.clear(); - expected.add("ALTER TABLE SCHEMAGENSIMPLE_SECOND ADD"); + expected.add("ALTER TABLE"); + expected.add("SCHEMAGENSIMPLE_SECOND ADD"); expected.add("CONSTRAINT MYCONSTRAINT FOREIGN KEY (SECONDARY_ID) REFERENCES SCHEMAGENSIMPLE (SIMPLEID)"); pass1c = findDataInFile(f1, expected); @@ -154,9 +155,18 @@ public void secondaryTableTest() throws Exception { * REFERENCES SCHEMAGENSIMPLE (SIMPLEID) */ - pass2a = findDataInFile(f2, "ALTER TABLE SCHEMAGENSIMPLE_SECOND DROP"); - pass2b = findDataInFile(f2, "DROP TABLE SCHEMAGENSIMPLE"); - pass2c = findDataInFile(f2, "DROP TABLE SCHEMAGENSIMPLE_SECOND"); + expected.clear(); + expected.add("ALTER TABLE"); + expected.add("SCHEMAGENSIMPLE_SECOND DROP"); + pass2a = findDataInFile(f2, expected); + expected.clear(); + expected.add("DROP TABLE"); + expected.add("SCHEMAGENSIMPLE"); + pass2b = findDataInFile(f2, expected); + expected.clear(); + expected.add("DROP TABLE"); + expected.add("SCHEMAGENSIMPLE_SECOND"); + pass2c = findDataInFile(f2, expected); logger.log(Logger.Level.TRACE, "Execute the create script"); props = getPersistenceUnitProperties(); diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/table/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/table/Client.java index bf35eaf8ca..bc018643c1 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/table/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/table/Client.java @@ -18,6 +18,8 @@ import java.io.File; import java.lang.System.Logger; +import java.util.ArrayList; +import java.util.List; import java.util.Properties; import org.jboss.shrinkwrap.api.spec.JavaArchive; @@ -122,7 +124,11 @@ public void tableTest() throws Exception { logger.log(Logger.Level.INFO, "Check script(s) content"); pass1 = findDataInFile(f1, "CREATE TABLE SCHEMAGENSIMPLE"); - pass2 = findDataInFile(f2, "DROP TABLE SCHEMAGENSIMPLE"); + + List expected = new ArrayList(); + expected.add("DROP TABLE"); + expected.add("SCHEMAGENSIMPLE"); + pass2 = findDataInFile(f2, expected); logger.log(Logger.Level.TRACE, "Execute the create script"); props = getPersistenceUnitProperties(); diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/temporal/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/temporal/Client.java index b5bd9dfbfa..e36f1c1e07 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/temporal/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/temporal/Client.java @@ -134,7 +134,10 @@ public void temporalTest() throws Exception { // CREATE TABLE SCHEMAGENSIMPLE (ID INTEGER NOT NULL, UTILDATE DATE, PRIMARY // KEY (ID)) - pass2 = findDataInFile(f2, "DROP TABLE SCHEMAGENSIMPLE"); + expected.clear(); + expected.add("DROP TABLE"); + expected.add("SCHEMAGENSIMPLE"); + pass2 = findDataInFile(f2, expected); logger.log(Logger.Level.TRACE, "Execute the create script"); props = getPersistenceUnitProperties(); diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/uniqueConstraint/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/uniqueConstraint/Client.java index 90c9431040..4a4ee755b5 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/uniqueConstraint/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/uniqueConstraint/Client.java @@ -134,10 +134,7 @@ public void uniqueConstraintTest() throws Exception { expected.add("PRIMARY KEY (ID)"); pass1a = findDataInFile(f1, expected); - expected.clear(); - expected.add("ALTER TABLE SCHEMAGENSIMPLE ADD"); - expected.add("CONSTRAINT MYUNIQUECONSTRAINT UNIQUE (ID, NAME)"); - pass1b = findDataInFile(f1, expected); + pass1b = findDataInFile(f1, "CONSTRAINT MYUNIQUECONSTRAINT UNIQUE (ID, NAME)"); pass1b = pass1b || findDataInFile(f1, "CREATE UNIQUE INDEX MYUNIQUECONSTRAINT ON SCHEMAGENSIMPLE (ID, NAME)"); /* @@ -152,7 +149,10 @@ public void uniqueConstraintTest() throws Exception { * findDataInFile(f2, "ALTER TABLE SCHEMAGENSIMPLE DROP"); */ - pass2b = findDataInFile(f2, "DROP TABLE SCHEMAGENSIMPLE"); + expected.clear(); + expected.add("DROP TABLE"); + expected.add("SCHEMAGENSIMPLE"); + pass2b = findDataInFile(f2, expected); logger.log(Logger.Level.TRACE, "Execute the create script"); props = getPersistenceUnitProperties(); diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/version/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/version/Client.java index 993ded6714..f6271c180d 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/version/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/annotations/version/Client.java @@ -132,7 +132,10 @@ public void versionTest() throws Exception { // CREATE TABLE SCHEMAGENSIMPLE (ID INTEGER NOT NULL, VERSION INTEGER, // PRIMARY KEY (ID)) - pass2 = findDataInFile(f2, "DROP TABLE SCHEMAGENSIMPLE"); + expected.clear(); + expected.add("DROP TABLE"); + expected.add("SCHEMAGENSIMPLE"); + pass2 = findDataInFile(f2, expected); logger.log(Logger.Level.TRACE, "Execute the create script"); props = getPersistenceUnitProperties(); diff --git a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/scripts/Client.java b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/scripts/Client.java index 39f557797a..137ff0f3af 100644 --- a/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/scripts/Client.java +++ b/jpa/spec-tests/src/main/java/ee/jakarta/tck/persistence/se/schemaGeneration/scripts/Client.java @@ -29,6 +29,8 @@ import java.io.PrintWriter; import java.io.Reader; import java.lang.System.Logger; +import java.util.ArrayList; +import java.util.List; import java.util.Properties; import org.jboss.shrinkwrap.api.spec.JavaArchive; @@ -131,7 +133,10 @@ public void scriptsURLTest() throws Exception { logger.log(Logger.Level.INFO, "Check script(s) content"); pass1 = findDataInFile(f1, "create table schemaGenSimple"); - pass2 = findDataInFile(f2, "drop table schemaGenSimple"); + List expected = new ArrayList(); + expected.add("drop table"); + expected.add("schemaGenSimple"); + pass2 = findDataInFile(f2, expected); if (!pass1 || !pass2) { throw new Exception("scriptsURLTest failed"); } @@ -200,7 +205,10 @@ public void scriptsPrintWriterTest() throws Exception { logger.log(Logger.Level.INFO, "Check script(s) content"); pass1 = findDataInFile(f1, "create table schemaGenSimple"); - pass2 = findDataInFile(f2, "drop table schemaGenSimple"); + List expected = new ArrayList(); + expected.add("drop table"); + expected.add("schemaGenSimple"); + pass2 = findDataInFile(f2, expected); if (!pass1 || !pass2) { throw new Exception("scriptsPrintWriterTest failed"); } @@ -248,7 +256,10 @@ public void scriptsURL2Test() throws Exception { logger.log(Logger.Level.INFO, "Check script(s) content"); pass1 = findDataInFile(f1, "create table schemaGenSimple"); - pass2 = findDataInFile(f2, "drop table schemaGenSimple"); + List expected = new ArrayList(); + expected.add("drop table"); + expected.add("schemaGenSimple"); + pass2 = findDataInFile(f2, expected); if (!pass1 || !pass2) { throw new Exception("scriptsURL2Test failed"); } @@ -317,7 +328,10 @@ public void scriptsPrintWriter2Test() throws Exception { logger.log(Logger.Level.INFO, "Check script(s) content"); pass1 = findDataInFile(f1, "create table schemaGenSimple"); - pass2 = findDataInFile(f2, "drop table schemaGenSimple"); + List expected = new ArrayList(); + expected.add("drop table"); + expected.add("schemaGenSimple"); + pass2 = findDataInFile(f2, expected); if (!pass1 || !pass2) { throw new Exception("scriptsPrintWriter2Test failed"); } @@ -366,7 +380,10 @@ public void databaseAndScriptsURLTest() throws Exception { logger.log(Logger.Level.INFO, "Check script(s) content"); pass2 = findDataInFile(f1, "create table schemaGenSimple"); - pass3 = findDataInFile(f2, "drop table schemaGenSimple"); + List expected = new ArrayList(); + expected.add("drop table"); + expected.add("schemaGenSimple"); + pass3 = findDataInFile(f2, expected); clearEMAndEMF(); try { @@ -455,7 +472,10 @@ public void databaseAndScriptsPrintWriterTest() throws Exception { logger.log(Logger.Level.INFO, "Check script(s) content"); pass2 = findDataInFile(f1, "create table schemaGenSimple"); - pass3 = findDataInFile(f2, "drop table schemaGenSimple"); + List expected = new ArrayList(); + expected.add("drop table"); + expected.add("schemaGenSimple"); + pass3 = findDataInFile(f2, expected); clearEMAndEMF(); try { @@ -632,7 +652,10 @@ public void databaseAndScriptsPrintWriter2Test() throws Exception { logger.log(Logger.Level.INFO, "Check script(s) content"); pass2 = findDataInFile(f1, "create table schemaGenSimple"); - pass3 = findDataInFile(f2, "drop table schemaGenSimple"); + List expected = new ArrayList(); + expected.add("drop table"); + expected.add("schemaGenSimple"); + pass3 = findDataInFile(f2, expected); if (!pass1 || !pass2 || !pass3) { throw new Exception("databaseAndScriptsPrintWriter2Test failed"); } @@ -837,6 +860,8 @@ public void executeCreateScriptReaderTest() throws Exception { Persistence.generateSchema(getPersistenceUnitName(), props); if (pw1 != null) pw1.close(); + if (reader != null) + reader.close(); clearEMAndEMF(); @@ -903,7 +928,10 @@ public void executeDropScriptURLTest() throws Exception { logger.log(Logger.Level.INFO, "Check script(s) content"); - pass1 = findDataInFile(f2, "drop table schemaGenSimple"); + List expected = new ArrayList(); + expected.add("drop table"); + expected.add("schemaGenSimple"); + pass1 = findDataInFile(f2, expected); logger.log(Logger.Level.TRACE, "Generate schema"); props = getPersistenceUnitProperties(); @@ -1013,7 +1041,10 @@ public void executeDropScriptReaderTest() throws Exception { logger.log(Logger.Level.INFO, "Check script(s) content"); - pass1 = findDataInFile(f2, "drop table schemaGenSimple"); + List expected = new ArrayList(); + expected.add("drop table"); + expected.add("schemaGenSimple"); + pass1 = findDataInFile(f2, expected); logger.log(Logger.Level.TRACE, "Generate schema"); props = getPersistenceUnitProperties(); @@ -1066,6 +1097,9 @@ public void executeDropScriptReaderTest() throws Exception { Persistence.generateSchema(getPersistenceUnitName(), props); clearEMAndEMF(); + if (reader != null) + reader.close(); + logger.log(Logger.Level.INFO, "Try to persist an entity, it should fail because table should not exist"); try { getEntityTransaction(true).begin(); diff --git a/jpa/tck-dist/artifact-install.bat b/jpa/tck-dist/artifact-install.bat new file mode 100644 index 0000000000..a581fd0ca4 --- /dev/null +++ b/jpa/tck-dist/artifact-install.bat @@ -0,0 +1,43 @@ +@echo off +REM +REM Copyright (c) 2008, 2018 Oracle and/or its affiliates. All rights reserved. +REM +REM This program and the accompanying materials are made available under the +REM terms of the Eclipse Public License v. 2.0, which is available at +REM http://www.eclipse.org/legal/epl-2.0. +REM +REM This Source Code may also be made available under the following Secondary +REM Licenses when the conditions for such availability set forth in the +REM Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +REM version 2 with the GNU Classpath Exception, which is available at +REM https://www.gnu.org/software/classpath/license.html. +REM +REM SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +REM + +@setlocal + +REM script to install the artifact directory contents into a local maven repository + +echo %1|findstr /r "^[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*.*$">nul 2>&1 +if errorlevel 1 (SET VERSION="3.2.0") else (SET VERSION=%1) + +SET JAKARTAEE_VERSION="11.0.0-M1" + +REM dbprocedures jar +call mvn org.apache.maven.plugins:maven-install-plugin:3.1.1:install-file "-Dfile=dbprocedures-%VERSION%.jar" "-DgroupId=jakarta.tck" -DartifactId=dbprocedures -Dversion=%VERSION% -Dpackaging=jar + +REM persistence-tck pom +call mvn org.apache.maven.plugins:maven-install-plugin:3.1.1:install-file "-Dfile=persistence-tck-%VERSION%.pom" "-DgroupId=jakarta.tck" -DartifactId=persistence-tck -Dversion=%VERSION% -Dpackaging=pom + +REM persistence-tck-common jar +call mvn org.apache.maven.plugins:maven-install-plugin:3.1.1:install-file "-Dfile=persistence-tck-common-%VERSION%.jar" "-DgroupId=jakarta.tck" -DartifactId=persistence-tck-common -Dversion=%VERSION% -Dpackaging=jar + +REM persistence-tck-common pom +call mvn org.apache.maven.plugins:maven-install-plugin:3.1.1:install-file "-Dfile=persistence-tck-common-%VERSION%.pom" "-DgroupId=jakarta.tck" -DartifactId=persistence-tck-common -Dversion=%VERSION% -Dpackaging=pom + +REM persistence-tck-spec-tests jar +call mvn org.apache.maven.plugins:maven-install-plugin:3.1.1:install-file "-Dfile=persistence-tck-spec-tests-%VERSION%.jar" "-DgroupId=jakarta.tck" -DartifactId=persistence-tck-spec-tests -Dversion=%VERSION% -Dpackaging=jar + +REM persistence-tck-spec-tests pom +call mvn org.apache.maven.plugins:maven-install-plugin:3.1.1:install-file "-Dfile=persistence-tck-spec-tests-%VERSION%.pom" "-DgroupId=jakarta.tck" -DartifactId=persistence-tck-spec-tests -Dversion=%VERSION% -Dpackaging=pom diff --git a/jpa/tck-dist/src/main/assembly/assembly.xml b/jpa/tck-dist/src/main/assembly/assembly.xml index d79f599595..d8d4b8b0f9 100644 --- a/jpa/tck-dist/src/main/assembly/assembly.xml +++ b/jpa/tck-dist/src/main/assembly/assembly.xml @@ -83,8 +83,9 @@ 755 *.sh + *.bat - + diff --git a/pom.xml b/pom.xml index a13767fb0b..25949d1895 100644 --- a/pom.xml +++ b/pom.xml @@ -33,6 +33,14 @@ project project + + + repo2 + staging repo + https://jakarta.oss.sonatype.org/content/repositories/staging + + + appclient assembly @@ -913,5 +921,4 @@ - diff --git a/sql/postgresql/postgresql.ddl.persistence.sql b/sql/postgresql/postgresql.ddl.persistence.sql index 3374fba1eb..d22ad45c27 100644 --- a/sql/postgresql/postgresql.ddl.persistence.sql +++ b/sql/postgresql/postgresql.ddl.persistence.sql @@ -331,8 +331,8 @@ DROP TABLE SEQUENCE cascade; CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(10), SEQ_COUNT INTEGER, CONSTRAINT SEQUENCE_PK PRIMARY KEY (SEQ_NAME) ); INSERT into SEQUENCE(SEQ_NAME, SEQ_COUNT) values ('SEQ_GEN', 0) ; -DROP TABLE PURCHASE_ORDER cascade; -CREATE TABLE PURCHASE_ORDER (ID INTEGER PRIMARY KEY NOT NULL, TOTAL INTEGER, DESCRIPTION VARCHAR(50)); +DROP TABLE "PURCHASE_ORDER" cascade; +CREATE TABLE "PURCHASE_ORDER" (ID INTEGER PRIMARY KEY NOT NULL, TOTAL INTEGER, DESCRIPTION VARCHAR(50)); DROP TABLE "ORDER1" cascade; CREATE TABLE "ORDER1" ("ID" INTEGER PRIMARY KEY NOT NULL, "TOTALPRICE" DOUBLE PRECISION , "FK1_FOR_ITEM" INTEGER); diff --git a/user_guides/platform/src/main/jbake/content/rules-wp.adoc b/user_guides/platform/src/main/jbake/content/rules-wp.adoc index 92df71a10f..52e47f3d8a 100644 --- a/user_guides/platform/src/main/jbake/content/rules-wp.adoc +++ b/user_guides/platform/src/main/jbake/content/rules-wp.adoc @@ -62,7 +62,7 @@ and are not intended for any other purpose. [[sthref11]][[sthref12]] -Table 3-1 Definitions  +Table 3-1 Definitions [width="100%",cols="25%,75%",options="header",] |======================================================================= diff --git a/user_guides/platform/src/main/jbake/content/rules.adoc b/user_guides/platform/src/main/jbake/content/rules.adoc index 0842d3dd10..0a6443955a 100644 --- a/user_guides/platform/src/main/jbake/content/rules.adoc +++ b/user_guides/platform/src/main/jbake/content/rules.adoc @@ -65,7 +65,7 @@ and are not intended for any other purpose. [[sthref7]][[sthref8]] -===== Table 2-1 Definitions  +===== Table 2-1 Definitions [width="100%",cols="25%,75%",options="header",] |======================================================================= diff --git a/websocket/common/pom.xml b/websocket/common/pom.xml index 0c0702c148..cba8bcf540 100644 --- a/websocket/common/pom.xml +++ b/websocket/common/pom.xml @@ -26,6 +26,14 @@ websocket-tck-common jar + + + + repo2 + staging repo + https://jakarta.oss.sonatype.org/content/repositories/staging + + diff --git a/websocket/platform-tests/pom.xml b/websocket/platform-tests/pom.xml index 34848f162c..ecd9c97011 100644 --- a/websocket/platform-tests/pom.xml +++ b/websocket/platform-tests/pom.xml @@ -26,6 +26,14 @@ websocket-tck-platform-tests jar + + + + repo2 + staging repo + https://jakarta.oss.sonatype.org/content/repositories/staging + + ${project.groupId} diff --git a/websocket/pom.xml b/websocket/pom.xml index 0e94c3d395..86dae5edae 100644 --- a/websocket/pom.xml +++ b/websocket/pom.xml @@ -30,6 +30,14 @@ pom websocket tck websocket tck tests + + + + repo2 + staging repo + https://jakarta.oss.sonatype.org/content/repositories/staging + + common docs/userguide diff --git a/websocket/spec-tests/pom.xml b/websocket/spec-tests/pom.xml index e550cc9f58..b21581aeef 100644 --- a/websocket/spec-tests/pom.xml +++ b/websocket/spec-tests/pom.xml @@ -26,6 +26,14 @@ websocket-tck-spec-tests jar + + + + repo2 + staging repo + https://jakarta.oss.sonatype.org/content/repositories/staging + + diff --git a/websocket/tck-dist/pom.xml b/websocket/tck-dist/pom.xml index da92fc5483..6b18a3a4a6 100644 --- a/websocket/tck-dist/pom.xml +++ b/websocket/tck-dist/pom.xml @@ -27,6 +27,14 @@ websocket-tck-dist jar + + + + repo2 + staging repo + https://jakarta.oss.sonatype.org/content/repositories/staging + + ${project.groupId}