You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2007/08/05 22:55:14 UTC

[jira] Updated: (SUREFIRE-308) Setting environment variables in surefire configuration overwrite the existing environment

     [ http://jira.codehaus.org/browse/SUREFIRE-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated SUREFIRE-308:
----------------------------------

    Fix Version/s: 2.x

> 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
>             Fix For: 2.x
>
>
> 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