From 22e92b744686549bfd193340d904aa1f85894c49 Mon Sep 17 00:00:00 2001 From: Bauke Scholtz Date: Sat, 14 Sep 2024 09:24:39 -0400 Subject: [PATCH] Fix test configuration and replaced Payara by GlassFish and downgraded H2 to 1.x because EclipseLink apparently still generates wrong DDL for H2 2.x --- .github/workflows/jakartified.maven.yml | 10 +- pom.xml | 98 +++++++++++-------- .../optimusfaces/test/OptimusFacesIT.java | 10 +- ...ipselink.xml => glassfish-eclipselink.xml} | 0 ...-hibernate.xml => glassfish-hibernate.xml} | 0 5 files changed, 69 insertions(+), 49 deletions(-) rename src/test/resources/META-INF/persistence.xml/{payara-eclipselink.xml => glassfish-eclipselink.xml} (100%) rename src/test/resources/META-INF/persistence.xml/{payara-hibernate.xml => glassfish-hibernate.xml} (100%) diff --git a/.github/workflows/jakartified.maven.yml b/.github/workflows/jakartified.maven.yml index fcd3638..cd23dba 100644 --- a/.github/workflows/jakartified.maven.yml +++ b/.github/workflows/jakartified.maven.yml @@ -26,14 +26,14 @@ jobs: continue-on-error: true strategy: matrix: - server: [wildfly-hibernate, wildfly-eclipselink, payara-hibernate, payara-eclipselink, tomee-openjpa] + server: [wildfly-hibernate, wildfly-eclipselink, glassfish-hibernate, glassfish-eclipselink, tomee-openjpa] steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v2 + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 with: - java-version: '11' + java-version: '17' distribution: 'adopt' cache: maven - name : Set up MySQL diff --git a/pom.xml b/pom.xml index 350b26e..bea0531 100644 --- a/pom.xml +++ b/pom.xml @@ -68,11 +68,11 @@ 33.0.1.Final - 6.2024.8 + 7.0.17 9.1.3 5.0.0-B02 - 6.1.7.Final - 2.3.232 + 6.1.7.Final + 1.4.200 8.0.33 42.7.4 4.5.1 @@ -145,7 +145,7 @@ org.hibernate.orm hibernate-core - ${test.payara-hibernate.version} + ${test.glassfish-hibernate.version} test @@ -170,11 +170,33 @@ + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.5.0 + + + validate + + enforce + + + + + [${javase.version},) + + + + + + + com.mycila license-maven-plugin - 4.1 + 4.5
license.txt
@@ -231,7 +253,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.2.2 + 3.4.2 @@ -265,7 +287,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.10.0 ${java.home}/bin/javadoc ${javase.version} @@ -275,7 +297,7 @@ OptimusFaces API documentation https://jakarta.ee/specifications/platform/${jakartaee.version}/apidocs/ - https://static.javadoc.io/org.omnifaces/omnipersistence/0.16.J1/ + https://static.javadoc.io/org.omnifaces/omnipersistence/0.21.J1/ -J-Dhttp.agent=maven-javadoc-plugin-${pom‌​.name} @@ -293,7 +315,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.13 + 1.7.0 true ossrh @@ -318,7 +340,7 @@ com.mycila license-maven-plugin - [4.1,) + [4.4,) format @@ -353,7 +375,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.3.0 + 3.8.0 process-test-classes @@ -369,7 +391,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.22.2 + 3.5.0 @@ -385,7 +407,7 @@ ${project.build.directory}/${project.build.finalName}.jar ${test.omnifaces.version} ${test.primefaces.version} - ${test.payara-hibernate.version} + ${test.glassfish-hibernate.version} @@ -476,7 +498,6 @@ ${project.build.directory}/wildfly-preview-${test.wildfly.version} - org.jboss.logmanager.LogManager @@ -603,7 +624,6 @@ ${project.build.directory}/wildfly-preview-${test.wildfly.version} - org.jboss.logmanager.LogManager @@ -611,9 +631,9 @@ - + - payara-hibernate + glassfish-hibernate org.jboss.arquillian.container @@ -632,16 +652,16 @@ - fish.payara.distributions - payara-web - ${test.payara.version} + org.glassfish.main.distributions + glassfish + ${test.glassfish.version} zip - install-h2-in-payara + install-h2-in-glassfish pre-integration-test copy @@ -653,13 +673,13 @@ h2 ${test.h2.version} jar - ${project.build.directory}/payara6/glassfish/modules + ${project.build.directory}/glassfish7/glassfish/modules
- install-mysql-driver-in-payara + install-mysql-driver-in-glassfish pre-integration-test copy @@ -671,13 +691,13 @@ mysql-connector-java ${test.mysql-driver.version} jar - ${project.build.directory}/payara6/glassfish/modules + ${project.build.directory}/glassfish7/glassfish/modules - install-psql-driver-in-payara + install-psql-driver-in-glassfish pre-integration-test copy @@ -689,7 +709,7 @@ postgresql ${test.postgresql-driver.version} jar - ${project.build.directory}/payara6/glassfish/modules + ${project.build.directory}/glassfish7/glassfish/modules @@ -701,7 +721,7 @@ maven-failsafe-plugin - ${project.build.directory}/payara6 + ${project.build.directory}/glassfish7
@@ -709,9 +729,9 @@ - + - payara-eclipselink + glassfish-eclipselink org.jboss.arquillian.container @@ -730,16 +750,16 @@ - fish.payara.distributions - payara-web - ${test.payara.version} + org.glassfish.main.distributions + glassfish + ${test.glassfish.version} zip - install-h2-in-payara + install-h2-in-glassfish pre-integration-test copy @@ -751,13 +771,13 @@ h2 ${test.h2.version} jar - ${project.build.directory}/payara6/glassfish/modules + ${project.build.directory}/glassfish7/glassfish/modules - install-mysql-driver-in-payara + install-mysql-driver-in-glassfish pre-integration-test copy @@ -769,13 +789,13 @@ mysql-connector-java ${test.mysql-driver.version} jar - ${project.build.directory}/payara6/glassfish/modules + ${project.build.directory}/glassfish7/glassfish/modules - install-psql-driver-in-payara + install-psql-driver-in-glassfish pre-integration-test copy @@ -787,7 +807,7 @@ postgresql ${test.postgresql-driver.version} jar - ${project.build.directory}/payara6/glassfish/modules + ${project.build.directory}/glassfish7/glassfish/modules @@ -799,7 +819,7 @@ maven-failsafe-plugin - ${project.build.directory}/payara6 + ${project.build.directory}/glassfish7 diff --git a/src/test/java/org/omnifaces/optimusfaces/test/OptimusFacesIT.java b/src/test/java/org/omnifaces/optimusfaces/test/OptimusFacesIT.java index 964a933..d45c366 100644 --- a/src/test/java/org/omnifaces/optimusfaces/test/OptimusFacesIT.java +++ b/src/test/java/org/omnifaces/optimusfaces/test/OptimusFacesIT.java @@ -129,7 +129,7 @@ protected static WebArchive createArchive(Class te } private static void addDataSourceConfig(Database database, WebArchive archive) { - var dataSourceConfigXml = isWildFly() ? "wildfly-ds.xml" : isPayara() ? "glassfish-resources.xml" : isTomEE() ? "resources.xml" : null; + var dataSourceConfigXml = isWildFly() ? "wildfly-ds.xml" : isGlassFish() ? "glassfish-resources.xml" : isTomEE() ? "resources.xml" : null; if (dataSourceConfigXml != null) { archive.addAsWebInfResource("WEB-INF/" + dataSourceConfigXml + "/" + database.name().toLowerCase() + ".xml", dataSourceConfigXml); @@ -142,9 +142,9 @@ private static void addPersistenceConfig(MavenResolverSystem maven, WebArchive a archive.addAsResource(persistenceXml + "/" + persistenceConfigXml, persistenceXml); - if (isPayara() && isHibernate()) { + if (isGlassFish() && isHibernate()) { // Does not work when placed in glassfish/modules? TODO: investigate. - archive.addAsLibraries(maven.resolve("org.hibernate.orm:hibernate-core:" + getProperty("test.payara-hibernate.version"), "dom4j:dom4j:1.6.1").withTransitivity().asFile()); + archive.addAsLibraries(maven.resolve("org.hibernate.orm:hibernate-core:" + getProperty("test.glassfish-hibernate.version"), "dom4j:dom4j:1.6.1").withTransitivity().asFile()); } } @@ -252,8 +252,8 @@ protected static boolean isWildFly() { return getProperty("profile.id").startsWith("wildfly-"); } - protected static boolean isPayara() { - return getProperty("profile.id").startsWith("payara-"); + protected static boolean isGlassFish() { + return getProperty("profile.id").startsWith("glassfish-"); } protected static boolean isTomEE() { diff --git a/src/test/resources/META-INF/persistence.xml/payara-eclipselink.xml b/src/test/resources/META-INF/persistence.xml/glassfish-eclipselink.xml similarity index 100% rename from src/test/resources/META-INF/persistence.xml/payara-eclipselink.xml rename to src/test/resources/META-INF/persistence.xml/glassfish-eclipselink.xml diff --git a/src/test/resources/META-INF/persistence.xml/payara-hibernate.xml b/src/test/resources/META-INF/persistence.xml/glassfish-hibernate.xml similarity index 100% rename from src/test/resources/META-INF/persistence.xml/payara-hibernate.xml rename to src/test/resources/META-INF/persistence.xml/glassfish-hibernate.xml