This is an automated email from the ASF dual-hosted git repository.

jlmonteiro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee-tck.git


The following commit(s) were added to refs/heads/master by this push:
     new 3c29fab  Fix for EE8 execution under JDK17 - hopefully does not break 
JDK8 and JDK11
3c29fab is described below

commit 3c29fab0cbf561acd6370386b8a0393b84eb75bc
Author: Jean-Louis Monteiro <[email protected]>
AuthorDate: Wed Jun 29 16:13:21 2022 +0200

    Fix for EE8 execution under JDK17 - hopefully does not break JDK8 and JDK11
---
 .mvn/jvm.config                                       |  1 +
 pom.xml                                               | 19 +++++++++++++------
 .../openejb/tck/commands/JavaTestCommand.groovy       | 16 +++++++++++++++-
 3 files changed, 29 insertions(+), 7 deletions(-)

diff --git a/.mvn/jvm.config b/.mvn/jvm.config
new file mode 100644
index 0000000..62826ad
--- /dev/null
+++ b/.mvn/jvm.config
@@ -0,0 +1 @@
+--add-opens java.base/java.lang=ALL-UNNAMED --add-opens 
java.base/java.util=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED 
--add-opens java.base/java.util.regex=ALL-UNNAMED --add-opens 
java.base/java.lang.reflect=ALL-UNNAMED
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 6bde8df..d6c62ec 100644
--- a/pom.xml
+++ b/pom.xml
@@ -133,12 +133,12 @@
     <dependency>
       <groupId>com.icegreen</groupId>
       <artifactId>greenmail-standalone</artifactId>
-      <version>1.5.10</version>
+      <version>1.6.9</version>
     </dependency>
     <dependency>
       <groupId>com.unboundid</groupId>
       <artifactId>unboundid-ldapsdk</artifactId>
-      <version>5.1.0</version>
+      <version>6.0.4</version>
     </dependency>
 
     <!--<dependency>-->
@@ -209,6 +209,7 @@
       <artifactId>backport-util-concurrent</artifactId>
       <version>3.1</version>
     </dependency>
+
     <dependency>
       <groupId>commons-lang</groupId>
       <artifactId>commons-lang</artifactId>
@@ -336,6 +337,12 @@
       <version>2.6</version>
     </dependency>
     -->
+
+    <dependency>
+      <groupId>org.apache.yoko</groupId>
+      <artifactId>yoko-spec-corba</artifactId>
+      <version>1.4</version>
+    </dependency>
   </dependencies>
 
   <profiles>
@@ -553,7 +560,7 @@
           <plugin> <!-- not used by tomee yet -->
             <groupId>org.codehaus.gmaven</groupId>
             <artifactId>gmaven-plugin</artifactId>
-            <version>1.5</version>
+            <version>${version.gmaven-plugin}</version>
             <executions>
               <execution>
                 <id>generate-reverse-tests</id>
@@ -661,7 +668,7 @@
         <plugin>
           <groupId>org.codehaus.gmaven</groupId>
           <artifactId>gmaven-plugin</artifactId>
-          <version>1.5</version>
+          <version>${version.gmaven-plugin}</version>
           <configuration>
             <scriptpath>
               <element>${pom.basedir}/src/test/script</element>
@@ -826,7 +833,7 @@
               <overWriteReleases>false</overWriteReleases>
               <overWriteSnapshots>true</overWriteSnapshots>
               <excludeTransitive>true</excludeTransitive>
-              
<includeArtifactIds>hawtbuf,activemq-client,tsharness,tssv,cts,whitebox,dbprocedures,geronimo-mail,derby,derbynet,derbyclient,webdeployer</includeArtifactIds>
+              
<includeArtifactIds>yoko-spec-corba,hawtbuf,activemq-client,tsharness,tssv,cts,whitebox,dbprocedures,geronimo-mail,derby,derbynet,derbyclient,webdeployer</includeArtifactIds>
             </configuration>
           </execution>
 
@@ -1053,7 +1060,7 @@
     <repository>
       <id>apache-m2-snapshot</id>
       <name>Apache M2 Snapshot Repository</name>
-      <url>http://repository.apache.org/snapshots/</url>
+      <url>https://repository.apache.org/snapshots/</url>
       <releases>
         <enabled>false</enabled>
       </releases>
diff --git a/src/test/script/openejb/tck/commands/JavaTestCommand.groovy 
b/src/test/script/openejb/tck/commands/JavaTestCommand.groovy
index 6d9666c..149b180 100644
--- a/src/test/script/openejb/tck/commands/JavaTestCommand.groovy
+++ b/src/test/script/openejb/tck/commands/JavaTestCommand.groovy
@@ -235,8 +235,22 @@ class JavaTestCommand
 
                 def containerJavaOpts = get('container.java.opts', "")
 
+                // http://openjdk.java.net/jeps/252
+                // need to set back java locale to COMPAT,SPI for Java 9 and 
above
+                // tomcat requires add-opens to function properly as well
+                def matches = containerJavaVersion ==~ /1[0-9]/;
+                if (matches || new File(containerJavaHome as String, 
'jmods').exists()) {
+                    containerJavaOpts += " -Djava.locale.providers=COMPAT,SPI"
+                    containerJavaOpts += " 
--add-opens=java.base/java.lang=ALL-UNNAMED"
+                    containerJavaOpts += " 
--add-opens=java.base/java.io=ALL-UNNAMED"
+                    containerJavaOpts += " 
--add-opens=java.base/java.util=ALL-UNNAMED"
+                    containerJavaOpts += " 
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED"
+                    containerJavaOpts += " 
--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED"
+                }
+
+
                 // not sure about this ....
-                if (tckJavaHome == null || !new File(tckJavaHome, 
'jmods').exists()/*j9 doesnt support it*/) {
+                if (tckJavaHome == null || !new File(tckJavaHome as String, 
'jmods').exists()/*j9 doesnt support it*/) {
                     sysproperty(key: "java.endorsed.dirs", file: 
"${javaeeRiHome}/lib/endorsed")
                     sysproperty(key: "command.testExecute.endorsed.dir", 
value: "-Djava.endorsed.dirs=${javaeeCtsHome}/endorsedlib")
                     sysproperty(key: 
"command.testExecuteEjbEmbed.endorsed.dir", value: 
"-Djava.endorsed.dirs=${openejbHome}/endorsed")

Reply via email to