maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arne Franken (JIRA)" <j...@codehaus.org>
Subject [jira] (SUREFIRE-649) Might be impossible to have empty strings in systemPropertyVariables element
Date Thu, 13 Nov 2014 14:39:10 GMT

    [ https://jira.codehaus.org/browse/SUREFIRE-649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=356077#comment-356077
] 

Arne Franken commented on SUREFIRE-649:
---------------------------------------

I just updated to Surefire 2.18.

Before the fix, it was possible to set empty and null System Properties, after the fix, it's
not possible to pass null System Properties (which are in turn ignored by Surefire) any more.

Is there a proposed workaround?

We rely on it being possible to optionally set System Properties for Maven builds by passing
-Dpropertyname to the mvn executable, otherwise the system property should be ignored by Surefire
(maven-tomcat-plugin behaves the same way, it even logs "[INFO] skip sysProps propertyname
with empty value")

> Might be impossible to have empty strings in systemPropertyVariables element
> ----------------------------------------------------------------------------
>
>                 Key: SUREFIRE-649
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-649
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>    Affects Versions: 2.6
>            Reporter: Laird Nelson
>            Assignee: Tibor Digana
>            Priority: Minor
>             Fix For: 2.18
>
>         Attachments: surefireEmptyStringIssue.tar.gz
>
>
> This stanza:
> <systemProperties>
>   <property>
>     <name>emptyProperty</name>
>     <value></value>
>   </property>
> </systemProperties>
> ...yields "" from System.getProperty("emptyProperty").
> This (supposedly better) stanza:
> <systemPropertyVariables>
>   <emptyProperty></emptyProperty>
> </systemPropertyVariables>
> ...yields null from System.getProperty("emptyProperty").
> A test case is attached that demonstrates the issue.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Mime
View raw message