maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brett Porter <>
Subject Re: Dependency on system property user.dir
Date Mon, 08 Feb 2010 01:32:30 GMT

On 07/02/2010, at 6:16 AM, Kristian Rosenvold wrote:

> I just discovered that the source of the hideous concurrency problem
> I've been tracking for some time is the system property "user.dir".
> Surefire basically sets the following three system properties:
> "basedir" = basedir.getAbsolutePath() 
> "user.dir" = workingDirectory.getAbsolutePath();
> "localRepository" =  localRepository.getBasedir();
> These properties are also used inside maven core, and creates 
> some interesting concurrency problems because by the time surefire sets
> these values they may have changed already ;)

Where are they used in the core? I thought it had been removed and would only be accessed
on the initial set up from the cli.

> The method in question is SurefirePlugin.processSystemProperties, with
> non-forking operation. 

I wouldn't be opposed to Surefire not supporting setting system properties in non-forking
mode in a future release, it seems like a recipe for disaster in an embedded / concurrent
environment. I think it was done to encourage some consistency between the forked and non-forked

- Brett

Brett Porter

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message