From a40ca945c2a1784202a77fd8b2841838c5315808 Mon Sep 17 00:00:00 2001 From: spbolton Date: Tue, 27 Aug 2024 15:22:42 +0100 Subject: [PATCH] chore: Cleanup Java21 arguments (#29756) (#29758) ### Proposed Changes * Remove old Pre java 21 java arguments ### Checklist - [ ] Tests - [ ] Translations - [ ] Security Implications Contemplated (add notes if applicable) ### Additional Info Related to #29756 (Cleanup Java21 arguments). ### Screenshots Original | Updated :-------------------------:|:-------------------------: ** original screenshot ** | ** updated screenshot ** --- dotCMS/src/main/docker/original/ROOT/srv/00-config-defaults.sh | 2 +- dotCMS/src/main/resources/container/tomcat9/bin/setenv.bat | 2 +- dotCMS/src/main/resources/container/tomcat9/bin/setenv.sh | 1 - parent/pom.xml | 2 -- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/dotCMS/src/main/docker/original/ROOT/srv/00-config-defaults.sh b/dotCMS/src/main/docker/original/ROOT/srv/00-config-defaults.sh index 76b86379e005..3c4a5df92951 100755 --- a/dotCMS/src/main/docker/original/ROOT/srv/00-config-defaults.sh +++ b/dotCMS/src/main/docker/original/ROOT/srv/00-config-defaults.sh @@ -14,7 +14,7 @@ export LANG=${LANG:-"C.UTF-8"} export TOMCAT_HOME=/srv/dotserver/tomcat # JAVA args to pass to the Tomcat JVM -export JAVA_OPTS_BASE=${JAVA_OPTS_BASE:-"-Djava.awt.headless=true -Xverify:none -Dfile.encoding=UTF8 -server -Dpdfbox.fontcache=/data/local/dotsecure -Dlog4j2.formatMsgNoLookups=true -Djava.library.path=/usr/lib/$( uname -m )-linux-gnu/ -XX:+UseShenandoahGC -XX:+UnlockExperimentalVMOptions -XX:ShenandoahUncommitDelay=1000 -XX:ShenandoahGuaranteedGCInterval=10000 "} +export JAVA_OPTS_BASE=${JAVA_OPTS_BASE:-"-Djava.awt.headless=true -Dfile.encoding=UTF8 -server -Dpdfbox.fontcache=/data/local/dotsecure -Dlog4j2.formatMsgNoLookups=true -Djava.library.path=/usr/lib/$( uname -m )-linux-gnu/ -XX:+UseShenandoahGC -XX:+UnlockExperimentalVMOptions -XX:ShenandoahUncommitDelay=1000 -XX:ShenandoahGuaranteedGCInterval=10000 "} export JAVA_OPTS_MEMORY=${JAVA_OPTS_MEMORY:-"-Xmx1G"} # $CMS_JAVA_OPTS is last so it trumps them all diff --git a/dotCMS/src/main/resources/container/tomcat9/bin/setenv.bat b/dotCMS/src/main/resources/container/tomcat9/bin/setenv.bat index 3eb097ec102f..27bf2fd56cc8 100644 --- a/dotCMS/src/main/resources/container/tomcat9/bin/setenv.bat +++ b/dotCMS/src/main/resources/container/tomcat9/bin/setenv.bat @@ -2,7 +2,7 @@ rem Set CATALINA_OPTS with multiple options set "CATALINA_OPTS=%CATALINA_OPTS% -Dfile.encoding=UTF8" -set "CATALINA_OPTS=%CATALINA_OPTS% --illegal-access=deny" + set "CATALINA_OPTS=%CATALINA_OPTS% --add-opens java.base/java.lang=ALL-UNNAMED" set "CATALINA_OPTS=%CATALINA_OPTS% --add-opens java.base/java.io=ALL-UNNAMED" set "CATALINA_OPTS=%CATALINA_OPTS% --add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED" diff --git a/dotCMS/src/main/resources/container/tomcat9/bin/setenv.sh b/dotCMS/src/main/resources/container/tomcat9/bin/setenv.sh index 08cdacb27f73..ec68ddc4cfa6 100644 --- a/dotCMS/src/main/resources/container/tomcat9/bin/setenv.sh +++ b/dotCMS/src/main/resources/container/tomcat9/bin/setenv.sh @@ -1,7 +1,6 @@ #!/bin/sh export CATALINA_OPTS="$CATALINA_OPTS -Dfile.encoding=UTF8" -export CATALINA_OPTS="$CATALINA_OPTS --illegal-access=deny" export CATALINA_OPTS="$CATALINA_OPTS --add-opens java.base/java.lang=ALL-UNNAMED" export CATALINA_OPTS="$CATALINA_OPTS --add-opens java.base/java.io=ALL-UNNAMED" export CATALINA_OPTS="$CATALINA_OPTS --add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED" diff --git a/parent/pom.xml b/parent/pom.xml index 2c94adbf8d21..6bb01b74ae6d 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -32,7 +32,6 @@ ${maven.compiler.source} ${maven.compiler.target} - --illegal-access=deny --add-modules java.se --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED @@ -861,7 +860,6 @@ ${surefire.fork.count} true @{argLine} -Xmx1024m - --illegal-access=deny ${java.module.args}