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

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

commit 61a6808c2ee45495cb9f2de1309c0ea33cabfa42
Author: rfscholte <rfscho...@apache.org>
AuthorDate: Wed Jan 30 19:58:22 2019 +0100

    https://stackoverflow.com/questions/54366277
    OpenJDK developers advice never to touch user.dir: "Changing this system 
property in the running VM leads to unpredictable behavior and could cause a 
lot of code to misbehave."
---
 .../java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 b6bafc4..a79f821 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
@@ -1057,7 +1057,7 @@ public abstract class AbstractSurefireMojo
                                                              
getUserProperties(), sysProps );
 
         result.setProperty( "basedir", getBasedir().getAbsolutePath() );
-        result.setProperty( "user.dir", 
getWorkingDirectory().getAbsolutePath() );
+//        result.setProperty( "user.dir", 
getWorkingDirectory().getAbsolutePath() );
         result.setProperty( "localRepository", 
getLocalRepository().getBasedir() );
         if ( isForking() )
         {

Reply via email to