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

filtered resources contains incorrect content

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2
    • 2.3
    • None
    • None

    Description

      A project contains as resource the following Velocity template

      src/main/resources/App.txt
      ${url}
      ${id}
      ${version}
      ${anotherProperty}
      
      ${infoBean.url}
      ${infoBean.id}
      ${infoBean.anotherProperty}
      ${infoBean.version}
      
      ${infoBean.myUrl}
      ${infoBean.myId}
      
      ${pom.version}
      

      When filtering is set for this file the resulted output is wrong

      target/classes/App.txt
      http://maven.apache.org
      maven.bugs:filtres:jar:1.0-SNAPSHOT
      1.0-SNAPSHOT
      anotherValue
      
      http://maven.apache.org
      maven.bugs:filtres:jar:1.0-SNAPSHOT
      ${infoBean.anotherProperty}
      1.0-SNAPSHOT
      
      ${infoBean.myUrl}
      ${infoBean.myId}
      
      1.0-SNAPSHOT
      


      While it is acceptable to have ${pom.version} replaced or even ${id} or ${version}, the ${infoBean.*} lines should be left untouched as long as such properties are not defined for the project.

      A sample project is attached...

      Attachments

        1. filtres.tar.gz
          2 kB
          Pappy Razvan STANESCU

        Issue Links

          Activity

            People

              olamy Olivier Lamy
              pappy Pappy Razvan STANESCU
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: