You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Thomas Mortagne (JIRA)" <ji...@apache.org> on 2016/07/28 08:20:20 UTC

[jira] [Updated] (MRESOURCES-230) Can't escape the escape string

     [ https://issues.apache.org/jira/browse/MRESOURCES-230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Mortagne updated MRESOURCES-230:
---------------------------------------
    Description: 
I have the following use case in a XML file:

{code:xml}
    <variable name="xwikiDataDir" value="%APPDATA%\XWiki\${project.version}\data" condition="windowsSevenAndGreater"/>
{code}

Before 3.0 it used to produce

{code:xml}
    <variable name="xwikiDataDir" value="%APPDATA%\XWiki\8.2\data" condition="windowsSevenAndGreater"/>
{code}

\ is now the default escape character, I'm fine with that but then it should be possible to escape the escape string which is buggy right now.

The following source

{code:xml}
    <variable name="xwikiDataDir" value="%APPDATA%\XWiki\\${project.version}\data" condition="windowsSevenAndGreater"/>
{code}

gives me

{code:xml}
    <variable name="xwikiDataDir" value="%APPDATA%\\XWiki\8.2\data" condition="windowsSevenAndGreater"/>
{code}

Notice the still doubled \. The first one should be removed from the result.

I tried escapeWindowsPaths bu it does not seems to be matching my string as a Windows path which is probably another bug.

Since I can't find any way to disable escaping (see MRESOURCES-231),
I ended up finding a character I don't have in my file and set it as escapeString.

  was:
I have the following use case in a XML file:

{code:xml}
    <variable name="xwikiDataDir" value="%APPDATA%\XWiki\${project.version}\data" condition="windowsSevenAndGreater"/>
{code}

Before 3.0 it used to produce

{code:xml}
    <variable name="xwikiDataDir" value="%APPDATA%\XWiki\8.2\data" condition="windowsSevenAndGreater"/>
{code}

\ is now the default escape character, I'm fine with that but then it should be possible to escape the escape string which is buggy right now.

The following source

{code:xml}
    <variable name="xwikiDataDir" value="%APPDATA%\XWiki\\${project.version}\data" condition="windowsSevenAndGreater"/>
{code}

gives me

{code:xml}
    <variable name="xwikiDataDir" value="%APPDATA%\\XWiki\8.2\data" condition="windowsSevenAndGreater"/>
{code}

Notice the still doubled \. The first one should be removed from the result.

I tried escapeWindowsPaths bu it does not seems to be matching my string as a Windows path which is probably another bug.


> Can't escape the escape string
> ------------------------------
>
>                 Key: MRESOURCES-230
>                 URL: https://issues.apache.org/jira/browse/MRESOURCES-230
>             Project: Maven Resources Plugin
>          Issue Type: Bug
>          Components: escape string
>    Affects Versions: 3.0.1
>            Reporter: Thomas Mortagne
>
> I have the following use case in a XML file:
> {code:xml}
>     <variable name="xwikiDataDir" value="%APPDATA%\XWiki\${project.version}\data" condition="windowsSevenAndGreater"/>
> {code}
> Before 3.0 it used to produce
> {code:xml}
>     <variable name="xwikiDataDir" value="%APPDATA%\XWiki\8.2\data" condition="windowsSevenAndGreater"/>
> {code}
> \ is now the default escape character, I'm fine with that but then it should be possible to escape the escape string which is buggy right now.
> The following source
> {code:xml}
>     <variable name="xwikiDataDir" value="%APPDATA%\XWiki\\${project.version}\data" condition="windowsSevenAndGreater"/>
> {code}
> gives me
> {code:xml}
>     <variable name="xwikiDataDir" value="%APPDATA%\\XWiki\8.2\data" condition="windowsSevenAndGreater"/>
> {code}
> Notice the still doubled \. The first one should be removed from the result.
> I tried escapeWindowsPaths bu it does not seems to be matching my string as a Windows path which is probably another bug.
> Since I can't find any way to disable escaping (see MRESOURCES-231),
> I ended up finding a character I don't have in my file and set it as escapeString.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)