slachiewicz opened a new issue, #572:
URL: https://github.com/apache/maven-resources-plugin/issues/572

   A single-character delimiter such as `$` stops a longer delimiter that 
starts with the same character, such as `${*}`, from matching. With
   
   ```xml
   <useDefaultDelimiters>false</useDefaultDelimiters>
   <delimiters>
     <delimiter>$</delimiter>
     <delimiter>${*}</delimiter>
   </delimiters>
   ```
   
   `$name$` is replaced, but `${name}` is copied unchanged: the `$` delimiter 
takes the opening `$` and finds no closing `$` on the line. The order of the 
delimiters does not change this, and removing `<delimiter>$</delimiter>` gets 
`${name}` replaced again. The 
[MRESOURCES-105](https://github.com/apache/maven-resources-plugin/tree/master/src/it/MRESOURCES-105)
 IT shows it: its `test.value=${test.value}` line stays as it is.
   
   The behaviour was explained when MRESOURCES-105 was resolved (#195), but the 
[`delimiters`](https://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#delimiters)
 parameter documentation does not mention it, so a user who adds `$` next to 
`${*}` sees `${...}` expressions silently left unfiltered. The same applies to 
a delimiter that ends without a match on its line, such as a `#` comment line 
with `#` as a delimiter.
   
   Proposed: document the limitation on the `delimiters` parameter, and have 
the MRESOURCES-105 IT assert the unfiltered line so a change in maven-filtering 
shows up.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to