[
http://jira.codehaus.org/browse/SUREFIRE-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dan Fabulich closed SUREFIRE-308.
---------------------------------
Resolution: Cannot Reproduce
Fix Version/s: (was: 2.x)
Can't reproduce in latest 2.4 trunk; integration test checked in.
> Setting environment variables in surefire configuration overwrite the
> existing environment
> ------------------------------------------------------------------------------------------
>
> Key: SUREFIRE-308
> URL: http://jira.codehaus.org/browse/SUREFIRE-308
> Project: Maven Surefire
> Issue Type: Bug
> Components: plugin
> Affects Versions: 2.0 (2.2 plugin), 2.3
> Environment: Linux
> Reporter: Renaud Julienne
>
> It's possible to set additional environment properties in surefire plugin
> configuration using:
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <configuration>
> <environmentVariables>
> <NAME>value</NAME>
> </environmentVariables>
> </configuration>
> </plugin>
> As described in plugin documentation, this should ADD the environment
> variable NAME to the existing environment when forking to launch the tests.
> What happens in fact is that it completely OVERWRITE the existing environment
> as soon as you use this configuration property : no more $HOME, no more
> $PATH, etc... Whereas when this property is not set, the existing environment
> ($HOME, $PATH, ...) remains present.
> This is not critical as there is a workaround to still have $HOME or $PATH
> for example by setting:
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> <configuration>
> <environmentVariables>
> <NAME>value</NAME>
> <HOME>${env.HOME}</HOME>
> <PATH>${env.PATH}</PATH>
> </environmentVariables>
> </configuration>
> </plugin>
> but afaic, this remains a high issue.
> I did not have time to investigate much, but it seems the problem comes from
> org.codehaus.plexus.util.cli.CommandLine, so this bug may be also opened
> there.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira