You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Heinrich Nirschl (JIRA)" <ji...@codehaus.org> on 2007/04/09 13:56:46 UTC

[jira] Commented: (MRESOURCES-25) Filtering of property values containing backslashes in path names still does not escape them?

    [ http://jira.codehaus.org/browse/MRESOURCES-25?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_92378 ] 

Heinrich Nirschl commented on MRESOURCES-25:
--------------------------------------------

I am not sure that there should be automatic escaping. The problem appears, because the resulting file is later interpreted as a properties file. If the same expansion is used in an xml file:

<location>${basedir}/keys/x509.PFX.MSFT</location>

it will get interpolated to

<location>D:\cygwin\home\dbc\cvs\omii-packaging\source\ws-wss4j/keys/x509.PFX.MSFT</location>

There is no problem at all since backslash is not treated specially in xml.

On the other hand, the xml usage would have problems if the expansion text contains a character with special meaning to xml like an ampersand for example.

It seems hard, to guess the correct escaping rules automatically. It may be better, to allow to specify them explicitly.

> Filtering of property values containing backslashes in path names still does not escape them?
> ---------------------------------------------------------------------------------------------
>
>                 Key: MRESOURCES-25
>                 URL: http://jira.codehaus.org/browse/MRESOURCES-25
>             Project: Maven 2.x Resources Plugin
>          Issue Type: Bug
>         Environment: Windows
>            Reporter: Bryan Carpenter
>
> This was originally reported as MRESOURCES-17, and I understood from the comments
> there it was fixed in version 2.2 of the plugin.  But I have tried using that version of the
> resources plugin, and I am still seeing the same problem.
> My source property file contains:
>   org.apache.ws.security.crypto.merlin.file=${basedir}/keys/x509.PFX.MSFT
> After filtering it looks like this:
>   org.apache.ws.security.crypto.merlin.file=D:\cygwin\home\dbc\cvs\omii-packaging\source\ws-wss4j/keys/x509.PFX.MSFT
> and when the this is read in by `Properties.load()'  the value ends up as:
>   d:cygwinhomedbccvsomii-packagingsourcews-wss4j/keys/x509.PFX.MSFT

-- 
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