From e608ecb7893260d1b11c6d2a57112856de280790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20D=C3=A9nari=C3=A9?= Date: Tue, 14 May 2024 11:49:33 +0200 Subject: [PATCH] fix: Update to JDK21 - EXO-71474 - Meeds-io/MIPs#91 Remove usage of SecurityManager as it is deprecated for removal in jdk21 Remove also usage of classes - SecurityHelper - PrivilegedSystemHelper - PrivilegedFileHelper - SecureList - SecureSet - SecureCollections These classes are here only to use securityManager, and as it is removed, it is no more necessary --- exo.jcr.component.core/pom.xml | 2 +- exo.jcr.component.ext/pom.xml | 1 + exo.jcr.component.ftp/pom.xml | 6 ++++++ exo.jcr.component.webdav/pom.xml | 1 + exo.jcr.ext.services/pom.xml | 2 +- exo.jcr.framework.command/pom.xml | 6 ++++++ exo.jcr.framework.ftpclient/pom.xml | 3 ++- 7 files changed, 18 insertions(+), 3 deletions(-) diff --git a/exo.jcr.component.core/pom.xml b/exo.jcr.component.core/pom.xml index e57385eb5..81c0de7f1 100644 --- a/exo.jcr.component.core/pom.xml +++ b/exo.jcr.component.core/pom.xml @@ -388,7 +388,7 @@ org.apache.maven.plugins maven-surefire-plugin - @{surefire.argLine} -Djava.net.preferIPv4Stack=true + @{argLine} ${env.MAVEN_OPTS} --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED -Djava.net.preferIPv4Stack=true ${debug.opts} jcr.test.configuration.file diff --git a/exo.jcr.component.ext/pom.xml b/exo.jcr.component.ext/pom.xml index f69597b53..6739d4a53 100644 --- a/exo.jcr.component.ext/pom.xml +++ b/exo.jcr.component.ext/pom.xml @@ -93,6 +93,7 @@ org.apache.maven.plugins maven-surefire-plugin + @{argLine} ${env.MAVEN_OPTS} --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED ${debug.opts} jcr.test.configuration.file diff --git a/exo.jcr.component.ftp/pom.xml b/exo.jcr.component.ftp/pom.xml index 48484bb34..ca66c480d 100644 --- a/exo.jcr.component.ftp/pom.xml +++ b/exo.jcr.component.ftp/pom.xml @@ -52,6 +52,12 @@ + + maven-surefire-plugin + + @{argLine} ${env.MAVEN_OPTS} --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED + + org.apache.maven.plugins maven-jar-plugin diff --git a/exo.jcr.component.webdav/pom.xml b/exo.jcr.component.webdav/pom.xml index 6d156aa93..a1fd338df 100644 --- a/exo.jcr.component.webdav/pom.xml +++ b/exo.jcr.component.webdav/pom.xml @@ -55,6 +55,7 @@ org.apache.maven.plugins maven-surefire-plugin + @{argLine} ${env.MAVEN_OPTS} --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED **/TestUtils.java **/OrderPatchTest.java diff --git a/exo.jcr.ext.services/pom.xml b/exo.jcr.ext.services/pom.xml index 67b916426..57389d5c9 100644 --- a/exo.jcr.ext.services/pom.xml +++ b/exo.jcr.ext.services/pom.xml @@ -87,7 +87,7 @@ maven-surefire-plugin - @{argLine} @{surefire.argLine} -Djava.net.preferIPv4Stack=true + @{argLine} ${env.MAVEN_OPTS} --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED -Djava.net.preferIPv4Stack=true ${debug.opts} diff --git a/exo.jcr.framework.command/pom.xml b/exo.jcr.framework.command/pom.xml index 01b9e90a6..8cac50ef9 100644 --- a/exo.jcr.framework.command/pom.xml +++ b/exo.jcr.framework.command/pom.xml @@ -52,6 +52,12 @@ + + maven-surefire-plugin + + @{argLine} ${env.MAVEN_OPTS} --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED + + maven-antrun-plugin diff --git a/exo.jcr.framework.ftpclient/pom.xml b/exo.jcr.framework.ftpclient/pom.xml index fe89705df..e1a9a671b 100644 --- a/exo.jcr.framework.ftpclient/pom.xml +++ b/exo.jcr.framework.ftpclient/pom.xml @@ -61,7 +61,8 @@ org.apache.maven.plugins maven-surefire-plugin - true + @{argLine} ${env.MAVEN_OPTS} + true **/*.java