HBASE-27870 Eliminate the 'WARNING: package jdk.internal.util.random not in java.base' when running UTs with jdk11 (#5242)

Signed-off-by: Tianhang Tang <tianhang@apache.org>
This commit is contained in:
Duo Zhang 2023-05-18 23:17:01 +08:00 committed by GitHub
parent 93ddd7060d
commit 71d7996047
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 25 additions and 12 deletions

37
pom.xml
View File

@ -952,6 +952,18 @@
"-Djava.library.path=${hadoop.library.path};${java.library.path}"
-Dorg.apache.hbase.thirdparty.io.netty.leakDetection.level=advanced
-Dio.opentelemetry.context.enableStrictContext=true</hbase-surefire.cygwin-argLine>
<hbase-surefire.jdk11.flags>-Dorg.apache.hbase.thirdparty.io.netty.tryReflectionSetAccessible=true
--add-modules jdk.unsupported
--add-opens java.base/java.nio=ALL-UNNAMED
--add-opens java.base/sun.nio.ch=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/jdk.internal.ref=ALL-UNNAMED
--add-opens java.base/java.lang.reflect=ALL-UNNAMED
--add-opens java.base/java.util=ALL-UNNAMED
--add-opens java.base/java.util.concurrent=ALL-UNNAMED
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED
--add-exports java.security.jgss/sun.security.krb5=ALL-UNNAMED</hbase-surefire.jdk11.flags>
<hbase-surefire.jdk17.flags>--add-opens java.base/jdk.internal.util.random=ALL-UNNAMED</hbase-surefire.jdk17.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>
@ -3234,18 +3246,7 @@
<properties>
<maven.compiler.release>${releaseTarget}</maven.compiler.release>
<!-- TODO: replicate logic for windows support -->
<argLine>-Dorg.apache.hbase.thirdparty.io.netty.tryReflectionSetAccessible=true
--add-modules jdk.unsupported
--add-opens java.base/java.nio=ALL-UNNAMED
--add-opens java.base/sun.nio.ch=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/jdk.internal.ref=ALL-UNNAMED
--add-opens java.base/java.lang.reflect=ALL-UNNAMED
--add-opens java.base/java.util=ALL-UNNAMED
--add-opens java.base/java.util.concurrent=ALL-UNNAMED
--add-opens java.base/jdk.internal.util.random=ALL-UNNAMED
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED
--add-exports java.security.jgss/sun.security.krb5=ALL-UNNAMED
<argLine>${hbase-surefire.jdk11.flags}
${hbase-surefire.argLine}
@{jacocoArgLine}</argLine>
<!--
@ -3285,6 +3286,18 @@
</pluginManagement>
</build>
</profile>
<profile>
<id>build-with-jdk17</id>
<activation>
<jdk>[17,)</jdk>
</activation>
<properties>
<argLine>${hbase-surefire.jdk11.flags}
${hbase-surefire.jdk17.flags}
${hbase-surefire.argLine}
@{jacocoArgLine}</argLine>
</properties>
</profile>
<!-- profile activated by the Jenkins patch testing job -->
<profile>
<id>jenkins.patch</id>