You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Marco Rothe (JIRA)" <ji...@codehaus.org> on 2009/11/04 13:14:55 UTC
[jira] Created: (MRESOURCES-110) escapeString is broken - break
filtered output
escapeString is broken - break filtered output
----------------------------------------------
Key: MRESOURCES-110
URL: http://jira.codehaus.org/browse/MRESOURCES-110
Project: Maven 2.x Resources Plugin
Issue Type: Bug
Affects Versions: 2.4.1, 2.4
Environment: Maven 2.0.9, WinXP
Reporter: Marco Rothe
Priority: Critical
If the escapeString parameter is specified in plugin configuration this will break the filtered output.
For example the configuration
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<escapeString>!</escapeString>
</configuration>
</plugin>
an file to filter (an XML file)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<!-- This is a comment ... until filtering ... -->
<broken-tag>Why are my !\${\}\! static.content broken if the escapeString occure ?!?</broken-tag>
<broken-tag>Content with replacement: ${replaceThis} !</broken-tag>
<broken-tag>Content with escaped replacement: Do not !${replaceThis} !</broken-tag>
</root>
and a property
<properties>
<replaceThis>I am the replacement</replaceThis>
</properties>
from pom or profile.xml
result in
<?xml version="1.0" encoding="UTF-8"?>
<root>
<!- This is a comment ... until filtering ... -->
<broken-tag>Why are my !${\}\!static.content broken if the escapeString occure ?!</broken-tag>
<broken-tag>Content with replacement: I am the replacement !/broken-tag>
<broken-tag>Content with escaped replacement: Do not ${replaceThis} !/broken-tag>
</root>
Note the broken comment and tags!
If using Resources-Plugin 2.3 the output is like expected:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<!-- This is a comment ... until filtering ... -->
<broken-tag>Why are my !\${\}\! static.content broken if the escapeString occure ?!?</broken-tag>
<broken-tag>Content with replacement: I am the replacement !</broken-tag>
<broken-tag>Content with escaped replacement: Do not ${replaceThis} !</broken-tag>
</root>
Got even worse when using a complex escape string like <escapeString>static</escapeString> (I know it's a silly example ;)). The result is
<?xml version=".0" encoding="UTF-8"?>
<root>
<!-- This is acomment ... until filtering ... -->
<broken-tag>Why are my !\${\}\! staticcontent broken if the escapeSring occure ?!?</broken-tag>
<broken-tag>Content with replacement: I am the replacement !</broken-tag>
<broken-tag>Content with escapedreplacement: Do not !I am the replacement !</broken-tag>
</root>
Note the missing characters all over the file ... :-/
So the actual state of the escapeString feature is unpredictable and nearly useless.
--
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-110) escapeString is broken - break
filtered output
Posted by "Eric Chatellier (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=219845#action_219845 ]
Eric Chatellier commented on MRESOURCES-110:
--------------------------------------------
This bug happens for us too
> escapeString is broken - break filtered output
> ----------------------------------------------
>
> Key: MRESOURCES-110
> URL: http://jira.codehaus.org/browse/MRESOURCES-110
> Project: Maven 2.x Resources Plugin
> Issue Type: Bug
> Affects Versions: 2.4, 2.4.1
> Environment: Maven 2.0.9, WinXP
> Reporter: Marco Rothe
> Priority: Critical
>
> If the escapeString parameter is specified in plugin configuration this will break the filtered output.
> For example the configuration
> <plugin>
> <artifactId>maven-resources-plugin</artifactId>
> <version>2.4.1</version>
> <configuration>
> <escapeString>!</escapeString>
> </configuration>
> </plugin>
> an file to filter (an XML file)
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!-- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! static.content broken if the escapeString occure ?!?</broken-tag>
> <broken-tag>Content with replacement: ${replaceThis} !</broken-tag>
> <broken-tag>Content with escaped replacement: Do not !${replaceThis} !</broken-tag>
> </root>
> and a property
> <properties>
> <replaceThis>I am the replacement</replaceThis>
> </properties>
> from pom or profile.xml
> result in
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !${\}\!static.content broken if the escapeString occure ?!</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !/broken-tag>
> <broken-tag>Content with escaped replacement: Do not ${replaceThis} !/broken-tag>
> </root>
> Note the broken comment and tags!
> If using Resources-Plugin 2.3 the output is like expected:
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!-- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! static.content broken if the escapeString occure ?!?</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !</broken-tag>
> <broken-tag>Content with escaped replacement: Do not ${replaceThis} !</broken-tag>
> </root>
> Got even worse when using a complex escape string like <escapeString>static</escapeString> (I know it's a silly example ;)). The result is
> <?xml version=".0" encoding="UTF-8"?>
> <root>
> <!-- This is acomment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! staticcontent broken if the escapeSring occure ?!?</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !</broken-tag>
> <broken-tag>Content with escapedreplacement: Do not !I am the replacement !</broken-tag>
> </root>
> Note the missing characters all over the file ... :-/
> So the actual state of the escapeString feature is unpredictable and nearly useless.
--
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] Updated: (MRESOURCES-110) escapeString is broken - break
filtered output
Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dennis Lundberg updated MRESOURCES-110:
---------------------------------------
Description:
If the escapeString parameter is specified in plugin configuration this will break the filtered output.
For example the configuration
{code:xml}
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<escapeString>!</escapeString>
</configuration>
</plugin>
{code}
an file to filter (an XML file)
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<root>
<!-- This is a comment ... until filtering ... -->
<broken-tag>Why are my !\${\}\! static.content broken if the escapeString occure ?!?</broken-tag>
<broken-tag>Content with replacement: ${replaceThis} !</broken-tag>
<broken-tag>Content with escaped replacement: Do not !${replaceThis} !</broken-tag>
</root>
{code}
and a property
{code:xml}
<properties>
<replaceThis>I am the replacement</replaceThis>
</properties>
{code}
from pom or profile.xml
result in
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<root>
<!- This is a comment ... until filtering ... -->
<broken-tag>Why are my !${\}\!static.content broken if the escapeString occure ?!</broken-tag>
<broken-tag>Content with replacement: I am the replacement !/broken-tag>
<broken-tag>Content with escaped replacement: Do not ${replaceThis} !/broken-tag>
</root>
{code}
Note the broken comment and tags!
If using Resources-Plugin 2.3 the output is like expected:
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<root>
<!-- This is a comment ... until filtering ... -->
<broken-tag>Why are my !\${\}\! static.content broken if the escapeString occure ?!?</broken-tag>
<broken-tag>Content with replacement: I am the replacement !</broken-tag>
<broken-tag>Content with escaped replacement: Do not ${replaceThis} !</broken-tag>
</root>
{code}
Got even worse when using a complex escape string like <escapeString>static</escapeString> (I know it's a silly example ;)). The result is
{code:xml}
<?xml version=".0" encoding="UTF-8"?>
<root>
<!-- This is acomment ... until filtering ... -->
<broken-tag>Why are my !\${\}\! staticcontent broken if the escapeSring occure ?!?</broken-tag>
<broken-tag>Content with replacement: I am the replacement !</broken-tag>
<broken-tag>Content with escapedreplacement: Do not !I am the replacement !</broken-tag>
</root>
{code}
Note the missing characters all over the file ... :-/
So the actual state of the escapeString feature is unpredictable and nearly useless.
was:
If the escapeString parameter is specified in plugin configuration this will break the filtered output.
For example the configuration
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<escapeString>!</escapeString>
</configuration>
</plugin>
an file to filter (an XML file)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<!-- This is a comment ... until filtering ... -->
<broken-tag>Why are my !\${\}\! static.content broken if the escapeString occure ?!?</broken-tag>
<broken-tag>Content with replacement: ${replaceThis} !</broken-tag>
<broken-tag>Content with escaped replacement: Do not !${replaceThis} !</broken-tag>
</root>
and a property
<properties>
<replaceThis>I am the replacement</replaceThis>
</properties>
from pom or profile.xml
result in
<?xml version="1.0" encoding="UTF-8"?>
<root>
<!- This is a comment ... until filtering ... -->
<broken-tag>Why are my !${\}\!static.content broken if the escapeString occure ?!</broken-tag>
<broken-tag>Content with replacement: I am the replacement !/broken-tag>
<broken-tag>Content with escaped replacement: Do not ${replaceThis} !/broken-tag>
</root>
Note the broken comment and tags!
If using Resources-Plugin 2.3 the output is like expected:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<!-- This is a comment ... until filtering ... -->
<broken-tag>Why are my !\${\}\! static.content broken if the escapeString occure ?!?</broken-tag>
<broken-tag>Content with replacement: I am the replacement !</broken-tag>
<broken-tag>Content with escaped replacement: Do not ${replaceThis} !</broken-tag>
</root>
Got even worse when using a complex escape string like <escapeString>static</escapeString> (I know it's a silly example ;)). The result is
<?xml version=".0" encoding="UTF-8"?>
<root>
<!-- This is acomment ... until filtering ... -->
<broken-tag>Why are my !\${\}\! staticcontent broken if the escapeSring occure ?!?</broken-tag>
<broken-tag>Content with replacement: I am the replacement !</broken-tag>
<broken-tag>Content with escapedreplacement: Do not !I am the replacement !</broken-tag>
</root>
Note the missing characters all over the file ... :-/
So the actual state of the escapeString feature is unpredictable and nearly useless.
> escapeString is broken - break filtered output
> ----------------------------------------------
>
> Key: MRESOURCES-110
> URL: http://jira.codehaus.org/browse/MRESOURCES-110
> Project: Maven 2.x Resources Plugin
> Issue Type: Bug
> Affects Versions: 2.4, 2.4.1
> Environment: Maven 2.0.9, WinXP
> Reporter: Marco Rothe
> Priority: Critical
>
> If the escapeString parameter is specified in plugin configuration this will break the filtered output.
> For example the configuration
> {code:xml}
> <plugin>
> <artifactId>maven-resources-plugin</artifactId>
> <version>2.4.1</version>
> <configuration>
> <escapeString>!</escapeString>
> </configuration>
> </plugin>
> {code}
> an file to filter (an XML file)
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!-- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! static.content broken if the escapeString occure ?!?</broken-tag>
> <broken-tag>Content with replacement: ${replaceThis} !</broken-tag>
> <broken-tag>Content with escaped replacement: Do not !${replaceThis} !</broken-tag>
> </root>
> {code}
> and a property
> {code:xml}
> <properties>
> <replaceThis>I am the replacement</replaceThis>
> </properties>
> {code}
> from pom or profile.xml
> result in
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !${\}\!static.content broken if the escapeString occure ?!</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !/broken-tag>
> <broken-tag>Content with escaped replacement: Do not ${replaceThis} !/broken-tag>
> </root>
> {code}
> Note the broken comment and tags!
> If using Resources-Plugin 2.3 the output is like expected:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!-- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! static.content broken if the escapeString occure ?!?</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !</broken-tag>
> <broken-tag>Content with escaped replacement: Do not ${replaceThis} !</broken-tag>
> </root>
> {code}
> Got even worse when using a complex escape string like <escapeString>static</escapeString> (I know it's a silly example ;)). The result is
> {code:xml}
> <?xml version=".0" encoding="UTF-8"?>
> <root>
> <!-- This is acomment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! staticcontent broken if the escapeSring occure ?!?</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !</broken-tag>
> <broken-tag>Content with escapedreplacement: Do not !I am the replacement !</broken-tag>
> </root>
> {code}
> Note the missing characters all over the file ... :-/
> So the actual state of the escapeString feature is unpredictable and nearly useless.
--
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] Updated: (MRESOURCES-110) escapeString is broken - break
filtered output
Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olivier Lamy updated MRESOURCES-110:
------------------------------------
Fix Version/s: 2.5
Assignee: Olivier Lamy
> escapeString is broken - break filtered output
> ----------------------------------------------
>
> Key: MRESOURCES-110
> URL: http://jira.codehaus.org/browse/MRESOURCES-110
> Project: Maven 2.x Resources Plugin
> Issue Type: Bug
> Affects Versions: 2.4, 2.4.1
> Environment: Maven 2.0.9, WinXP
> Reporter: Marco Rothe
> Assignee: Olivier Lamy
> Priority: Critical
> Fix For: 2.5
>
> Attachments: MRESOURCES-110.zip
>
>
> If the escapeString parameter is specified in plugin configuration this will break the filtered output.
> For example the configuration
> {code:xml}
> <plugin>
> <artifactId>maven-resources-plugin</artifactId>
> <version>2.4.1</version>
> <configuration>
> <escapeString>!</escapeString>
> </configuration>
> </plugin>
> {code}
> an file to filter (an XML file)
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!-- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! static.content broken if the escapeString occure ?!?</broken-tag>
> <broken-tag>Content with replacement: ${replaceThis} !</broken-tag>
> <broken-tag>Content with escaped replacement: Do not !${replaceThis} !</broken-tag>
> </root>
> {code}
> and a property
> {code:xml}
> <properties>
> <replaceThis>I am the replacement</replaceThis>
> </properties>
> {code}
> from pom or profile.xml
> result in
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !${\}\!static.content broken if the escapeString occure ?!</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !/broken-tag>
> <broken-tag>Content with escaped replacement: Do not ${replaceThis} !/broken-tag>
> </root>
> {code}
> Note the broken comment and tags!
> If using Resources-Plugin 2.3 the output is like expected:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!-- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! static.content broken if the escapeString occure ?!?</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !</broken-tag>
> <broken-tag>Content with escaped replacement: Do not ${replaceThis} !</broken-tag>
> </root>
> {code}
> Got even worse when using a complex escape string like <escapeString>static</escapeString> (I know it's a silly example ;)). The result is
> {code:xml}
> <?xml version=".0" encoding="UTF-8"?>
> <root>
> <!-- This is acomment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! staticcontent broken if the escapeSring occure ?!?</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !</broken-tag>
> <broken-tag>Content with escapedreplacement: Do not !I am the replacement !</broken-tag>
> </root>
> {code}
> Note the missing characters all over the file ... :-/
> So the actual state of the escapeString feature is unpredictable and nearly useless.
--
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-110) escapeString is broken - break
filtered output
Posted by "Andrew Williams (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=201613#action_201613 ]
Andrew Williams commented on MRESOURCES-110:
--------------------------------------------
Yes, it strips the next character if the escapeString is not followed by a filter character.
Very annoying!
> escapeString is broken - break filtered output
> ----------------------------------------------
>
> Key: MRESOURCES-110
> URL: http://jira.codehaus.org/browse/MRESOURCES-110
> Project: Maven 2.x Resources Plugin
> Issue Type: Bug
> Affects Versions: 2.4, 2.4.1
> Environment: Maven 2.0.9, WinXP
> Reporter: Marco Rothe
> Priority: Critical
>
> If the escapeString parameter is specified in plugin configuration this will break the filtered output.
> For example the configuration
> <plugin>
> <artifactId>maven-resources-plugin</artifactId>
> <version>2.4.1</version>
> <configuration>
> <escapeString>!</escapeString>
> </configuration>
> </plugin>
> an file to filter (an XML file)
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!-- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! static.content broken if the escapeString occure ?!?</broken-tag>
> <broken-tag>Content with replacement: ${replaceThis} !</broken-tag>
> <broken-tag>Content with escaped replacement: Do not !${replaceThis} !</broken-tag>
> </root>
> and a property
> <properties>
> <replaceThis>I am the replacement</replaceThis>
> </properties>
> from pom or profile.xml
> result in
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !${\}\!static.content broken if the escapeString occure ?!</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !/broken-tag>
> <broken-tag>Content with escaped replacement: Do not ${replaceThis} !/broken-tag>
> </root>
> Note the broken comment and tags!
> If using Resources-Plugin 2.3 the output is like expected:
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!-- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! static.content broken if the escapeString occure ?!?</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !</broken-tag>
> <broken-tag>Content with escaped replacement: Do not ${replaceThis} !</broken-tag>
> </root>
> Got even worse when using a complex escape string like <escapeString>static</escapeString> (I know it's a silly example ;)). The result is
> <?xml version=".0" encoding="UTF-8"?>
> <root>
> <!-- This is acomment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! staticcontent broken if the escapeSring occure ?!?</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !</broken-tag>
> <broken-tag>Content with escapedreplacement: Do not !I am the replacement !</broken-tag>
> </root>
> Note the missing characters all over the file ... :-/
> So the actual state of the escapeString feature is unpredictable and nearly useless.
--
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-110) escapeString is broken - break
filtered output
Posted by "Marco Rothe (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=197155#action_197155 ]
Marco Rothe commented on MRESOURCES-110:
----------------------------------------
Hmm, those "Unable to render embedded object: File " warnings are NOT part of my bug report ...
> escapeString is broken - break filtered output
> ----------------------------------------------
>
> Key: MRESOURCES-110
> URL: http://jira.codehaus.org/browse/MRESOURCES-110
> Project: Maven 2.x Resources Plugin
> Issue Type: Bug
> Affects Versions: 2.4, 2.4.1
> Environment: Maven 2.0.9, WinXP
> Reporter: Marco Rothe
> Priority: Critical
>
> If the escapeString parameter is specified in plugin configuration this will break the filtered output.
> For example the configuration
> <plugin>
> <artifactId>maven-resources-plugin</artifactId>
> <version>2.4.1</version>
> <configuration>
> <escapeString>!</escapeString>
> </configuration>
> </plugin>
> an file to filter (an XML file)
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!-- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! static.content broken if the escapeString occure ?!?</broken-tag>
> <broken-tag>Content with replacement: ${replaceThis} !</broken-tag>
> <broken-tag>Content with escaped replacement: Do not !${replaceThis} !</broken-tag>
> </root>
> and a property
> <properties>
> <replaceThis>I am the replacement</replaceThis>
> </properties>
> from pom or profile.xml
> result in
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !${\}\!static.content broken if the escapeString occure ?!</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !/broken-tag>
> <broken-tag>Content with escaped replacement: Do not ${replaceThis} !/broken-tag>
> </root>
> Note the broken comment and tags!
> If using Resources-Plugin 2.3 the output is like expected:
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!-- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! static.content broken if the escapeString occure ?!?</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !</broken-tag>
> <broken-tag>Content with escaped replacement: Do not ${replaceThis} !</broken-tag>
> </root>
> Got even worse when using a complex escape string like <escapeString>static</escapeString> (I know it's a silly example ;)). The result is
> <?xml version=".0" encoding="UTF-8"?>
> <root>
> <!-- This is acomment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! staticcontent broken if the escapeSring occure ?!?</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !</broken-tag>
> <broken-tag>Content with escapedreplacement: Do not !I am the replacement !</broken-tag>
> </root>
> Note the missing characters all over the file ... :-/
> So the actual state of the escapeString feature is unpredictable and nearly useless.
--
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-110) escapeString is broken - break
filtered output
Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olivier Lamy closed MRESOURCES-110.
-----------------------------------
Resolution: Fixed
> escapeString is broken - break filtered output
> ----------------------------------------------
>
> Key: MRESOURCES-110
> URL: http://jira.codehaus.org/browse/MRESOURCES-110
> Project: Maven 2.x Resources Plugin
> Issue Type: Bug
> Affects Versions: 2.4, 2.4.1
> Environment: Maven 2.0.9, WinXP
> Reporter: Marco Rothe
> Assignee: Olivier Lamy
> Priority: Critical
> Fix For: 2.5
>
> Attachments: MRESOURCES-110.zip
>
>
> If the escapeString parameter is specified in plugin configuration this will break the filtered output.
> For example the configuration
> {code:xml}
> <plugin>
> <artifactId>maven-resources-plugin</artifactId>
> <version>2.4.1</version>
> <configuration>
> <escapeString>!</escapeString>
> </configuration>
> </plugin>
> {code}
> an file to filter (an XML file)
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!-- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! static.content broken if the escapeString occure ?!?</broken-tag>
> <broken-tag>Content with replacement: ${replaceThis} !</broken-tag>
> <broken-tag>Content with escaped replacement: Do not !${replaceThis} !</broken-tag>
> </root>
> {code}
> and a property
> {code:xml}
> <properties>
> <replaceThis>I am the replacement</replaceThis>
> </properties>
> {code}
> from pom or profile.xml
> result in
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !${\}\!static.content broken if the escapeString occure ?!</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !/broken-tag>
> <broken-tag>Content with escaped replacement: Do not ${replaceThis} !/broken-tag>
> </root>
> {code}
> Note the broken comment and tags!
> If using Resources-Plugin 2.3 the output is like expected:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!-- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! static.content broken if the escapeString occure ?!?</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !</broken-tag>
> <broken-tag>Content with escaped replacement: Do not ${replaceThis} !</broken-tag>
> </root>
> {code}
> Got even worse when using a complex escape string like <escapeString>static</escapeString> (I know it's a silly example ;)). The result is
> {code:xml}
> <?xml version=".0" encoding="UTF-8"?>
> <root>
> <!-- This is acomment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! staticcontent broken if the escapeSring occure ?!?</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !</broken-tag>
> <broken-tag>Content with escapedreplacement: Do not !I am the replacement !</broken-tag>
> </root>
> {code}
> Note the missing characters all over the file ... :-/
> So the actual state of the escapeString feature is unpredictable and nearly useless.
--
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-110) escapeString is broken - break
filtered output
Posted by "Andreas Höhmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=218746#action_218746 ]
Andreas Höhmann commented on MRESOURCES-110:
--------------------------------------------
I can reproduce the bug too.
In my case this results in broken utf-8 encoding string :-)
ist keine g\u00FCltige Zahl
will be "transformed" to
ist keine g\00FCltige Zahl
> escapeString is broken - break filtered output
> ----------------------------------------------
>
> Key: MRESOURCES-110
> URL: http://jira.codehaus.org/browse/MRESOURCES-110
> Project: Maven 2.x Resources Plugin
> Issue Type: Bug
> Affects Versions: 2.4, 2.4.1
> Environment: Maven 2.0.9, WinXP
> Reporter: Marco Rothe
> Priority: Critical
>
> If the escapeString parameter is specified in plugin configuration this will break the filtered output.
> For example the configuration
> <plugin>
> <artifactId>maven-resources-plugin</artifactId>
> <version>2.4.1</version>
> <configuration>
> <escapeString>!</escapeString>
> </configuration>
> </plugin>
> an file to filter (an XML file)
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!-- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! static.content broken if the escapeString occure ?!?</broken-tag>
> <broken-tag>Content with replacement: ${replaceThis} !</broken-tag>
> <broken-tag>Content with escaped replacement: Do not !${replaceThis} !</broken-tag>
> </root>
> and a property
> <properties>
> <replaceThis>I am the replacement</replaceThis>
> </properties>
> from pom or profile.xml
> result in
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !${\}\!static.content broken if the escapeString occure ?!</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !/broken-tag>
> <broken-tag>Content with escaped replacement: Do not ${replaceThis} !/broken-tag>
> </root>
> Note the broken comment and tags!
> If using Resources-Plugin 2.3 the output is like expected:
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!-- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! static.content broken if the escapeString occure ?!?</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !</broken-tag>
> <broken-tag>Content with escaped replacement: Do not ${replaceThis} !</broken-tag>
> </root>
> Got even worse when using a complex escape string like <escapeString>static</escapeString> (I know it's a silly example ;)). The result is
> <?xml version=".0" encoding="UTF-8"?>
> <root>
> <!-- This is acomment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! staticcontent broken if the escapeSring occure ?!?</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !</broken-tag>
> <broken-tag>Content with escapedreplacement: Do not !I am the replacement !</broken-tag>
> </root>
> Note the missing characters all over the file ... :-/
> So the actual state of the escapeString feature is unpredictable and nearly useless.
--
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] Updated: (MRESOURCES-110) escapeString is broken - break
filtered output
Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MRESOURCES-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dennis Lundberg updated MRESOURCES-110:
---------------------------------------
Attachment: MRESOURCES-110.zip
A sample project.
> escapeString is broken - break filtered output
> ----------------------------------------------
>
> Key: MRESOURCES-110
> URL: http://jira.codehaus.org/browse/MRESOURCES-110
> Project: Maven 2.x Resources Plugin
> Issue Type: Bug
> Affects Versions: 2.4, 2.4.1
> Environment: Maven 2.0.9, WinXP
> Reporter: Marco Rothe
> Priority: Critical
> Attachments: MRESOURCES-110.zip
>
>
> If the escapeString parameter is specified in plugin configuration this will break the filtered output.
> For example the configuration
> {code:xml}
> <plugin>
> <artifactId>maven-resources-plugin</artifactId>
> <version>2.4.1</version>
> <configuration>
> <escapeString>!</escapeString>
> </configuration>
> </plugin>
> {code}
> an file to filter (an XML file)
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!-- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! static.content broken if the escapeString occure ?!?</broken-tag>
> <broken-tag>Content with replacement: ${replaceThis} !</broken-tag>
> <broken-tag>Content with escaped replacement: Do not !${replaceThis} !</broken-tag>
> </root>
> {code}
> and a property
> {code:xml}
> <properties>
> <replaceThis>I am the replacement</replaceThis>
> </properties>
> {code}
> from pom or profile.xml
> result in
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !${\}\!static.content broken if the escapeString occure ?!</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !/broken-tag>
> <broken-tag>Content with escaped replacement: Do not ${replaceThis} !/broken-tag>
> </root>
> {code}
> Note the broken comment and tags!
> If using Resources-Plugin 2.3 the output is like expected:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> <!-- This is a comment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! static.content broken if the escapeString occure ?!?</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !</broken-tag>
> <broken-tag>Content with escaped replacement: Do not ${replaceThis} !</broken-tag>
> </root>
> {code}
> Got even worse when using a complex escape string like <escapeString>static</escapeString> (I know it's a silly example ;)). The result is
> {code:xml}
> <?xml version=".0" encoding="UTF-8"?>
> <root>
> <!-- This is acomment ... until filtering ... -->
> <broken-tag>Why are my !\${\}\! staticcontent broken if the escapeSring occure ?!?</broken-tag>
> <broken-tag>Content with replacement: I am the replacement !</broken-tag>
> <broken-tag>Content with escapedreplacement: Do not !I am the replacement !</broken-tag>
> </root>
> {code}
> Note the missing characters all over the file ... :-/
> So the actual state of the escapeString feature is unpredictable and nearly useless.
--
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