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

while filtering resources the token replacement stops at the character @

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.5
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows XP, Java 1.6.0_16

      Description

      Create a simple file hello.txt under src/main/resources with following content:
      "
      This property ${testProperty} was replaced
      but the one behind a @ will not be processed, as you
      see: ${testProperty}. You shouldn't see a property reference.
      "
      define a build section in your pom.xml like this
      <build>
      <resources>
      <resource>
      <directory>src/main/resources</directory>
      <filtering>true</filtering>
      <includes>
      <include>*/.txt</include>
      </includes>
      </resource>
      <resource>
      <directory>src/main/resources</directory>
      <filtering>false</filtering>
      <excludes>
      <exclude>*/.txt</exclude>
      </excludes>
      </resource>
      </resources>

      Run the command:

      mvn process-resources -DtestProperty=IwasReplaced

      this produces the output

      "
      This property IwasReplaced was replaced
      but the one behind a @ will not be processed, as you
      see: ${testProperty}. You shouldn't see a property reference.
      "

      As you see, the second property reference was not resolved. The replacement just stops after the @ character.

        Attachments

        1. MRESOURCES-104.zip
          3 kB
          Arnaud HERITIER
        2. m3-resource-filtering.zip
          12 kB
          Kevan Dunsmore

          Issue Links

            Activity

              People

              • Assignee:
                olamy Olivier Lamy (*$^¨%`£)
                Reporter:
                zealander zealander
              • Votes:
                27 Vote for this issue
                Watchers:
                23 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: