You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jochen Wiedmann (JIRA)" <ji...@codehaus.org> on 2009/11/04 15:53:55 UTC

[jira] Created: (MRESOURCES-111) escapeWindowsPath doesn't work when applying properties

escapeWindowsPath doesn't work when applying properties
-------------------------------------------------------

                 Key: MRESOURCES-111
                 URL: http://jira.codehaus.org/browse/MRESOURCES-111
             Project: Maven 2.x Resources Plugin
          Issue Type: Bug
    Affects Versions: 2.4.1
            Reporter: Jochen Wiedmann
         Attachments: mydemo.zip

The attached project contains a property file "src/test/main/hibernate.properties". I'd like to inject the projects build path into that file. More precisely, I have a property "jdbc.url" in my pom.xml, which looks like this:

    <jdbc.url>jdbc:derby:${project.build.directory}/derby-db;create=true</jdbc.url>

In hibernate.properties, I have

    hibernate.connection.url=${jdbc.url}

Which resolves to

    hibernate.connection.url=jdbc:derby:C:\workspace\mydemo\target/derby-db;create=true

which is invalid, because the backslashes aren't escaped.


-- 
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] (MRESOURCES-111) escapeWindowsPath doesn't work when applying properties

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MRESOURCES-111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy closed MRESOURCES-111.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.6
         Assignee: Olivier Lamy
    
> escapeWindowsPath doesn't work when applying properties
> -------------------------------------------------------
>
>                 Key: MRESOURCES-111
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-111
>             Project: Maven 2.x Resources Plugin
>          Issue Type: Bug
>    Affects Versions: 2.4.1
>            Reporter: Jochen Wiedmann
>            Assignee: Olivier Lamy
>             Fix For: 2.6
>
>         Attachments: mydemo.zip
>
>
> The attached project contains a property file "src/test/main/hibernate.properties". I'd like to inject the projects build path into that file. More precisely, I have a property "jdbc.url" in my pom.xml, which looks like this:
>     <jdbc.url>jdbc:derby:${project.build.directory}/derby-db;create=true</jdbc.url>
> In hibernate.properties, I have
>     hibernate.connection.url=${jdbc.url}
> Which resolves to
>     hibernate.connection.url=jdbc:derby:C:\workspace\mydemo\target/derby-db;create=true
> which is invalid, because the backslashes aren't escaped.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRESOURCES-111) escapeWindowsPath doesn't work when applying properties

Posted by "Jochen Wiedmann (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRESOURCES-111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=304537#comment-304537 ] 

Jochen Wiedmann commented on MRESOURCES-111:
--------------------------------------------

Recommended workaround: Use property files in XML format and replace Properties.load with Properties.loadFromXML.

See http://www.ibm.com/developerworks/java/library/j-tiger02254/index.html
                
> escapeWindowsPath doesn't work when applying properties
> -------------------------------------------------------
>
>                 Key: MRESOURCES-111
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-111
>             Project: Maven 2.x Resources Plugin
>          Issue Type: Bug
>    Affects Versions: 2.4.1
>            Reporter: Jochen Wiedmann
>            Assignee: Olivier Lamy
>             Fix For: 2.6
>
>         Attachments: mydemo.zip
>
>
> The attached project contains a property file "src/test/main/hibernate.properties". I'd like to inject the projects build path into that file. More precisely, I have a property "jdbc.url" in my pom.xml, which looks like this:
>     <jdbc.url>jdbc:derby:${project.build.directory}/derby-db;create=true</jdbc.url>
> In hibernate.properties, I have
>     hibernate.connection.url=${jdbc.url}
> Which resolves to
>     hibernate.connection.url=jdbc:derby:C:\workspace\mydemo\target/derby-db;create=true
> which is invalid, because the backslashes aren't escaped.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira