Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: maven-filtering-1.0
-
Fix Version/s: maven-filtering-1.1
-
Component/s: maven-filtering
-
Labels:None
-
Environment:java version "1.6.0_33"
Java(TM) SE Runtime Environment (build 1.6.0_33-b03-424-10M3720)
Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03-424, mixed mode)
-
Number of attachments :
Description
When an attempt is made to filter the following string:
export SERVER_ENV=\${SERVER_ENV:${httpd.server.env}}
The escape character "\" ends up escaping the entire token, or failing that the entire line, and the filter "$
{httpd.server.env}" is unresolved.
Expected:
export SERVER_ENV=$
{SERVER_ENV:sandbox}Actual:
export SERVER_ENV=${SERVER_ENV:${httpd.server.env}}
Patch to follow.
Issue Links
- is depended upon by
-
MRESOURCES-166
Escaping on a line suppresses filtering for the rest of the token/line
-
Turned out there were many edge cases not covered by the original code, and arbitrary assumptions made (such as the closing token only works if it is one character long), so my only option to fix this was to rewrite the filter parsing code.
Patch attached, new tests, all existing tests pass.