[
http://jira.codehaus.org/browse/SUREFIRE-121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Benjamin Bentmann closed SUREFIRE-121.
--------------------------------------
Resolution: Fixed
Fix Version/s: (was: Backlog)
2.6
Assignee: Benjamin Bentmann
Fixed in [r981279|http://svn.apache.org/viewvc?view=revision&revision=981279]
by selectively propagating only those system properties to the tests that have
been set by the user on the Maven command line via {{-Dkey=value}}, system
props passed directly into the JVM via MAVEN_OPTS are not forwarded to the
tests.
For this actually to work, Maven 2.1.0 or newer is required. For Maven 2.0.x,
no system properties are propagated as in previous plugin versions and a
warning is emitted.
> System properties set on the command line get clobbered
> -------------------------------------------------------
>
> Key: SUREFIRE-121
> URL: http://jira.codehaus.org/browse/SUREFIRE-121
> Project: Maven Surefire
> Issue Type: Bug
> Affects Versions: 2.0 (2.2 plugin)
> Environment: Linux, Maven 2.0.4, Sun JDK 1.5U5, bash 3.0
> Reporter: Brenton Leanhardt
> Assignee: Benjamin Bentmann
> Priority: Critical
> Fix For: 2.6
>
> Attachments: testargs.zip
>
>
> Some system properties get clobbered if you set them on the command line. For
> example,
> mvn clean test -Dtest=LoginTest -Dselenium.user=test32
> The 'test' system property will work, but the 'selenium.user' property will
> be null at runtime. I have tried:
> * hard coding the system property in the unit test, this worked fine.
> * setting the system properties in the pom file, this worked fine also.
> * tried an older version of the surefire plugin, this worked fine.
--
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