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

stoty pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.5 by this push:
     new d81fd5cc48b HBASE-29602 Add -Djava.security.manager=allow to JDK18+ 
surefire JVM flags (#7316)
d81fd5cc48b is described below

commit d81fd5cc48b12003d514ad892102a4471acffb30
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]>
    (cherry picked from commit 78f333bedefbeab656196919100935742d0fb645)
---
 pom.xml | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/pom.xml b/pom.xml
index a2f73010298..d812abfeba0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -764,6 +764,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>
@@ -3082,6 +3091,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>

Reply via email to