You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Bryan Carpenter (JIRA)" <ji...@codehaus.org> on 2006/08/01 17:45:31 UTC
[jira] Created: (MRESOURCES-25) Filtering of property values
containing backslashes in path names still does not escape them?
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
[jira] Commented: (MRESOURCES-25) Filtering of property values
containing backslashes in path names still does not escape them?
Posted by "Bryan Carpenter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-25?page=comments#action_74170 ]
Bryan Carpenter commented on MRESOURCES-25:
-------------------------------------------
... I should perhaps add that the filtered resources are being specified
in a <testResources/> in the <build/> section of the POM.
> 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
[jira] Commented: (MRESOURCES-25) Filtering of property values
containing backslashes in path names still does not escape them?
Posted by "Heinrich Nirschl (JIRA)" <ji...@codehaus.org>.
[ 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
[jira] Commented: (MRESOURCES-25) Filtering of property values
containing backslashes in path names still does not escape them?
Posted by "Bryan Carpenter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-25?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_92558 ]
Bryan Carpenter commented on MRESOURCES-25:
-------------------------------------------
Perhaps what is needed is the ability to do something similar to
this:
<resources>
<resource>
<includes>
<include>*.xml</include>
<includes>
<filtering>true</filtering>
</resource>
<resource>
<includes>
<include>*.properties</include>
<includes>
<filtering escapeBackSlash="true">true</filtering>
</resource>
</resources>
An alternative would be a filtering option that just allowed
the standard path-valued macros to be expanded with forward
slashes. In my example if "${basedir}" expanded to:
D:/cygwin/home/dbc/cvs/omii-packaging/source/ws-wss4j
I would be quite happy.
> 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
[jira] Commented: (MRESOURCES-25) Filtering of property values
containing backslashes in path names still does not escape them?
Posted by "Brian Fox (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-25?page=comments#action_75262 ]
Brian Fox commented on MRESOURCES-25:
-------------------------------------
We are seeing this also and are using 2.2
> 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
[jira] Commented: (MRESOURCES-25) Filtering of property values
containing backslashes in path names still does not escape them?
Posted by "Bryan Carpenter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-25?page=comments#action_74169 ]
Bryan Carpenter commented on MRESOURCES-25:
-------------------------------------------
Hi, thanks for the response.
Well I added
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.2</version>
</plugin>
to my POM, and deleted the directory:
org/apache/maven/plugins/maven-resources-plugin/
from my repository. When a ran mvn again it said:
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.2/maven-resources-plugin-2.2.pom
1K downloaded
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.2/maven-resources-plugin-2.2.jar
13K downloaded
The above-mentioned directory was recreated in my repository,
containing (only) subdirectory "2.2/".
There were no more plugin downloads during the build, and nothing
else appeared in my "maven-resource-plugin" directory.
But I still have the same problem! Backslashes are not being escaped.
> 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
[jira] Closed: (MRESOURCES-25) Filtering of property values
containing backslashes in path names still does not escape them?
Posted by "Jason van Zyl (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason van Zyl closed MRESOURCES-25.
-----------------------------------
Resolution: Duplicate
This is, in fact, a problem with interpolation and the issue is already raised in the resources plugin.
> 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
[jira] Commented: (MRESOURCES-25) Filtering of property values
containing backslashes in path names still does not escape them?
Posted by "Holger Riegel (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-25?page=comments#action_73290 ]
Holger Riegel commented on MRESOURCES-25:
-----------------------------------------
Are you sure you are using version 2.2 of Maven resources plugin?
Look at your local Maven repository in the path org/apache/maven/plugins/maven-resources-plugin. If there's a directory with name "2.1" you are using the old 2.1 version of the plugin.
I had the same effect as the one you described.
But when I specified in the pom.xml the version 2.2 it worked:
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.2</version>
</plugin>
Alternatively you may delete your local repository. Maven should then get the latest version of the resources plugin.
> 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
[jira] Commented: (MRESOURCES-25) Filtering of property values
containing backslashes in path names still does not escape them?
Posted by "Guillaume Wallet (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-25?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=130373#action_130373 ]
Guillaume Wallet commented on MRESOURCES-25:
--------------------------------------------
Hello,
I think it would be great if that issue could be solved, because it will enable ability to share project between unix/linux and windows developpers.
Thx in advance for this work (I can't vote for this Issue)
Guillaume WALLET.
> 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