Uploaded image for project: 'Maven Resources Plugin'
  1. Maven Resources Plugin
  2. MRESOURCES-157

Multiple level filtering not behaving as expected and not consistant behaviour between ${} replacement and @@ replacement

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 2.4.2, 2.5
    • None
    • filtering
    • None
    • reproduced with but not limited to maven 2.2.1 with java 1.6.0_27 on windows machine

    Description

      A filter can be made up of multiple parts such as myproperty1 and myproperty2 below:

      part1=part1
      part2=part2
      myproperty1=${part1}-${part2}
      myproperty2=@part1@-@part2@

      It is possible to define a second filter file (which should take precedence over the first filter file) to override some properties from the first filter file.

      When the second filter file overrides part1 (for example) my expectation is that both ${part1} and @part1@ will be taken from the second filter file when replacing myproperty1 and myproperty2 in any filtered resources. I would expect the result of filtering myproperty1 and myproperty2 to be the same.
      However in reality myproperty1 and myproperty2 produce different results.

      There is no documented precedence of delimiters - I expect ${} and @@ to behave the same.

      Also my expectation is that ${part1} will always be taken from the second property file when it is overwritten there.

      I have attached a project which demonstrates the issue.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            khmarbaise Karl Heinz Marbaise
            david.jones David Jones
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment