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

andy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/jena.git

commit 3b2658418c90a23da86e9fb244ca4a9e4bdbf1c8
Author: Andy Seaborne <[email protected]>
AuthorDate: Tue Dec 30 21:35:47 2025 +0000

    Use -XX:+EnableDynamicAgentLoading for surefire to avoid variable setting
---
 jena-core/pom.xml                     | 4 ++++
 jena-extras/jena-querybuilder/pom.xml | 3 ++-
 jena-fuseki2/jena-fuseki-core/pom.xml | 3 ++-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/jena-core/pom.xml b/jena-core/pom.xml
index 6c2bd867ea..d11d60b14f 100644
--- a/jena-core/pom.xml
+++ b/jena-core/pom.xml
@@ -151,7 +151,11 @@
           </dependency>
         </dependencies>
         <configuration>
+          <!-- One possibility
           <argLine>-javaagent:${org.mockito:mockito-core:jar} 
-Xshare:off</argLine>
+          -->
+          <!-- Without needing ${org.mockito:mockito-core:jar} -->
+          <argLine>-XX:+EnableDynamicAgentLoading -Xshare:off</argLine>
           <includes>
             <include>org/apache/jena/test/JenaCoreTestAll.java</include>
           </includes>
diff --git a/jena-extras/jena-querybuilder/pom.xml 
b/jena-extras/jena-querybuilder/pom.xml
index 60c5b8246d..dda1cc395d 100644
--- a/jena-extras/jena-querybuilder/pom.xml
+++ b/jena-extras/jena-querybuilder/pom.xml
@@ -93,7 +93,8 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
-          <argLine>@{argLine} -javaagent:${org.mockito:mockito-core:jar} 
-Xshare:off</argLine>
+          <!--<argLine>@{argLine} -javaagent:${org.mockito:mockito-core:jar} 
-Xshare:off</argLine>-->
+          <argLine>@{argLine} -XX:+EnableDynamicAgentLoading 
-Xshare:off</argLine>
         </configuration>
       </plugin>
       <plugin>
diff --git a/jena-fuseki2/jena-fuseki-core/pom.xml 
b/jena-fuseki2/jena-fuseki-core/pom.xml
index 5296f67b6c..1df7dc45c6 100644
--- a/jena-fuseki2/jena-fuseki-core/pom.xml
+++ b/jena-fuseki2/jena-fuseki-core/pom.xml
@@ -166,7 +166,8 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
-          <argLine>@{argLine} -javaagent:${org.mockito:mockito-core:jar} 
-Xshare:off</argLine>
+          <!--<argLine>@{argLine} -javaagent:${org.mockito:mockito-core:jar} 
-Xshare:off</argLine>-->
+          <argLine>@{argLine} -XX:+EnableDynamicAgentLoading 
-Xshare:off</argLine>
           <includes>
             <include>**/TS_*.java</include>
           </includes>

Reply via email to