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

tibordigana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git


The following commit(s) were added to refs/heads/master by this push:
     new d033faa  [SUREFIRE-1858] Change default debug options to not use 
legacy options
d033faa is described below

commit d033faab83a8e9f151454dc161746e0c72968b57
Author: Thiago Henrique Hüpner <[email protected]>
AuthorDate: Wed Oct 28 19:54:16 2020 -0300

    [SUREFIRE-1858] Change default debug options to not use legacy options
    
    Using the -Xdebug -Xnoagent -Djava.compiler=NONE causes the OpenJ9 JVM to 
run the tests in interpreted mode, thus running them VERY slowly. In Hotspot 
JVM these options are ignored.
---
 .../java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java   | 3 +--
 maven-surefire-plugin/src/site/apt/examples/debugging.apt.vm          | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
index 5c2eea3..06556e1 100644
--- 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
@@ -2570,8 +2570,7 @@ public abstract class AbstractSurefireMojo
         String debugForkedProcess = getDebugForkedProcess();
         if ( "true".equals( debugForkedProcess ) )
         {
-            return "-Xdebug -Xnoagent -Djava.compiler=NONE"
-                + " 
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005";
+            return 
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=localhost:5005";
         }
         return debugForkedProcess;
     }
diff --git a/maven-surefire-plugin/src/site/apt/examples/debugging.apt.vm 
b/maven-surefire-plugin/src/site/apt/examples/debugging.apt.vm
index 339bbb8..8f33e40 100644
--- a/maven-surefire-plugin/src/site/apt/examples/debugging.apt.vm
+++ b/maven-surefire-plugin/src/site/apt/examples/debugging.apt.vm
@@ -54,11 +54,11 @@ mvn -Dmaven.${thisPlugin.toLowerCase()}.debug verify
 
 #{if}(${project.artifactId}=="maven-surefire-plugin")
 +---+
-mvn -Dmaven.${thisPlugin.toLowerCase()}.debug="-Xdebug 
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent 
-Djava.compiler=NONE" test
+mvn 
-Dmaven.${thisPlugin.toLowerCase()}.debug="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=localhost:8000"
 test
 +---+
 #{else}
 +---+
-mvn -Dmaven.${thisPlugin.toLowerCase()}.debug="-Xdebug 
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent 
-Djava.compiler=NONE" verify
+mvn 
-Dmaven.${thisPlugin.toLowerCase()}.debug="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=localhost:8000"
 verify
 +---+
 #{end}
 

Reply via email to