You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Christian Nelson (JIRA)" <ji...@codehaus.org> on 2008/08/27 07:52:27 UTC
[jira] Commented: (SUREFIRE-121) System properties set on the
command line get clobbered
[ http://jira.codehaus.org/browse/SUREFIRE-121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=146121#action_146121 ]
Christian Nelson commented on SUREFIRE-121:
-------------------------------------------
Just Confirming... with maven 2.0.9 and 2.0.10-RC11, properties set on the command line are not passed to unit tests run by surefire 2.4.3. v2.4.2 passes the system properties.
For example:
| mvn install -Djdbc.host=192.168.2.100
With v2.4.2, System.getProperty("jdbc.host") returns 192.168.2.100. With v.2.4.3 it returns null.
We rely on this behavior in unit tests frequently, sometime via System.getProperty() and other times indirectly through the use of Spring's [PropertyPlaceholderConfigurer|http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.html] in SYSTEM_PROPERTIES_MODE_OVERRIDEmode.
Is the plan to revert back to the 2.4.2 behavior?
> 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
> Priority: Critical
> Fix For: Future
>
>
> 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