This is an automated email from the ASF dual-hosted git repository.
stoty pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2 by this push:
new 78f333bedef HBASE-29602 Add -Djava.security.manager=allow to JDK18+
surefire JVM flags (#7316)
78f333bedef is described below
commit 78f333bedefbeab656196919100935742d0fb645
Author: Istvan Toth <[email protected]>
AuthorDate: Thu Sep 18 08:42:48 2025 +0200
HBASE-29602 Add -Djava.security.manager=allow to JDK18+ surefire JVM flags
(#7316)
Signed-off-by: Duo Zhang <[email protected]>
Signed-off-by: Balazs Meszaros <[email protected]>
---
pom.xml | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/pom.xml b/pom.xml
index 67bf69fa0a7..10664732814 100644
--- a/pom.xml
+++ b/pom.xml
@@ -765,6 +765,15 @@
--add-opens java.base/sun.security.x509=ALL-UNNAMED
--add-opens java.base/sun.security.util=ALL-UNNAMED
--add-opens java.base/java.net=ALL-UNNAMED</hbase-surefire.jdk17.flags>
+ <!--
+ Java 18+ disables the Security Manager by default. Hadoop 3.4.2 and
earlier doesn't work
+ without Security Manager.
+ When Hadoop 3.5.0 is released and HBase adds support for it, this can be
removed, or moved
+ to a Hadoop version dependent profile.
+ This is NOT added to the startup scripts, as this is a major change, and
the user better be
+ aware of this requirement (and add this in hbase-env.sh) and/or in their
application
+ -->
+
<hbase-surefire.jdk18.flags>-Djava.security.manager=allow</hbase-surefire.jdk18.flags>
<!-- Surefire argLine defaults to Linux, cygwin argLine is used in the
os.windows profile -->
<argLine>${hbase-surefire.argLine} @{jacocoArgLine}</argLine>
<extra.enforcer.version>1.5.1</extra.enforcer.version>
@@ -3108,6 +3117,19 @@
${hbase-surefire.argLine}
@{jacocoArgLine}</argLine>
</properties>
+ </profile>
+ <profile>
+ <id>build-with-jdk18</id>
+ <activation>
+ <jdk>[18,)</jdk>
+ </activation>
+ <properties>
+ <argLine>${hbase-surefire.jdk11.flags}
+ ${hbase-surefire.jdk17.flags}
+ ${hbase-surefire.jdk18.flags}
+ ${hbase-surefire.argLine}
+ @{jacocoArgLine}</argLine>
+ </properties>
</profile>
<!-- profile activated by the Jenkins patch testing job -->
<profile>