[ https://jira.codehaus.org/browse/MSHARED-283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=323374#comment-323374 ]
David Jones edited comment on MSHARED-283 at 4/9/13 1:25 AM: ------------------------------------------------------------- This attachment MSHARED-283.patch is my proposed fix. The fix is to remove all logic which was being done by PropertyUtils which was filtering property values within the file being loaded when they were in the format $\{\*\} A number of other bugs (such as MSHARED-177) were caused by this pre-filtering, however the fixes formerly implemented for those bugs was to `improve` this pre-filtering. I believe however that the correct solution is to remove this pre-filtering altogether and to allow the FileUtils and FilterWrappers to do their job when copying the files. was (Author: jones501): This is a proposed fix. The fix is to remove all logic which was being done by PropertyUtil which was filtering property values within the file being loaded when they were in the format $\{\*\} A number of other bugs (such as MSHARED-177) were caused by this pre-filtering, however the fixes formerly implemented for those bugs was to `improve` this pre-filtering. I believe however that the correct solution is to remove this pre-filtering altogether and to allow the FileUtils and FilterWrappers to do their job when copying the files. > Multiple level filtering not behaving as expected and not consistant > behaviour between ${} replacement and @@ replacement > ------------------------------------------------------------------------------------------------------------------------- > > Key: MSHARED-283 > URL: https://jira.codehaus.org/browse/MSHARED-283 > Project: Maven Shared Components > Issue Type: Bug > Components: maven-filtering > Affects Versions: maven-filtering-1.1 > Reporter: David Jones > Attachments: maven-filtering-test-case.diff, MSHARED-283.patch > > > Filter (defined in a property file) can be composed of other properties as > shown in myproperty1 and myproperty2 below: > part1=part1 > part2=part2 > myproperty1=${part1}-${part2} > myproperty2=@part1@-@part2@ > It is possible to define a second filter file to overwrite some properties: > part1=part1OVERWRITE > When filtering using the two filter files the resulting value of myproperty1 > and myproperty2 should be as follows: > myproperty1=part1OVERWRITE-part2 > myproperty2=part1OVERWRITE-part2 > It is expected that the composite property should take the overwritten part1 > from the second property file while part2 should be taken from the first > property file. > In addition the choice of delimeter @@ vs ${*} should not have any effect on > the behaviour. > However tests have shown that myproperty2 is being replaced correctly while > myproperty1 is NOT. > MRESOURCES-157 also demonstrates this with a maven project which tests the > same thing. > The attached patch file (maven-filtering-test-case.diff) adds a new test > (which currently fails) which demonstrates the issue described -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira