This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new a89b6957b0d Fix JDK 8 compatibility issue with
EnableDynamicAgentLoading (#37048)
a89b6957b0d is described below
commit a89b6957b0d6e85eee164876a82dd29598445014
Author: Liang Zhang <[email protected]>
AuthorDate: Sun Nov 9 12:30:53 2025 +0800
Fix JDK 8 compatibility issue with EnableDynamicAgentLoading (#37048)
* Fix JDK 8 compatibility issue with EnableDynamicAgentLoading
- Remove global EnableDynamicAgentLoading from maven-surefire-plugin
configuration
- Add EnableDynamicAgentLoading to jdk11+ profile for JDK 11+ environments
- Add EnableDynamicAgentLoading to coverage-check profile for enhanced
coverage analysis
- Ensure JDK 8 builds use basic configuration while maintaining enhanced
functionality for JDK 11+
Resolves CI build failures in JDK 8 environments while preserving
improved agent loading capabilities for modern JDK versions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* Fix maven jacoco plugin
* Fix maven jacoco plugin
* Fix maven jacoco plugin
---------
Co-authored-by: Claude <[email protected]>
---
pom.xml | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index ebabde22285..dea3627051a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -809,7 +809,7 @@
<version>${maven-surefire-plugin.version}</version>
<configuration>
<trimStackTrace>false</trimStackTrace>
- <argLine>${argLine}
-XX:+EnableDynamicAgentLoading</argLine>
+ <argLine>${argLine}</argLine>
</configuration>
</plugin>
<plugin>
@@ -1118,13 +1118,13 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <argLine>${argLine} --add-opens
java.base/java.lang=ALL-UNNAMED --add-opens
java.base/java.lang.reflect=ALL-UNNAMED --add-opens
java.base/sun.net=ALL-UNNAMED --add-opens
java.base/java.net=ALL-UNNAMED</argLine>
+ <argLine>${argLine} --add-opens
java.base/java.lang=ALL-UNNAMED --add-opens
java.base/java.lang.reflect=ALL-UNNAMED --add-opens
java.base/sun.net=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED
-XX:+EnableDynamicAgentLoading</argLine>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
- <argLine>${argLine} --add-opens
java.base/java.lang=ALL-UNNAMED --add-opens
java.base/java.lang.reflect=ALL-UNNAMED --add-opens
java.base/sun.net=ALL-UNNAMED --add-opens
java.base/java.net=ALL-UNNAMED</argLine>
+ <argLine>${argLine} --add-opens
java.base/java.lang=ALL-UNNAMED --add-opens
java.base/java.lang.reflect=ALL-UNNAMED --add-opens
java.base/sun.net=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED
-XX:+EnableDynamicAgentLoading</argLine>
</configuration>
</plugin>
</plugins>
@@ -1443,6 +1443,22 @@
<jacoco.minimum.coverage>0.95</jacoco.minimum.coverage>
</properties>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>${argLine}
-XX:+EnableDynamicAgentLoading</argLine>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <configuration>
+ <argLine>${argLine}
-XX:+EnableDynamicAgentLoading</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>