Maven Shared Components
  1. Maven Shared Components
  2. MSHARED-198

custom delimiters doesn't work as expected

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: maven-filtering-1.0
    • Fix Version/s: maven-filtering-1.2
    • Component/s: maven-filtering
    • Labels:
      None
    • Number of attachments :
      0

      Description

      The algorithm doesn't work as described in http://maven.apache.org/plugins/maven-resources-plugin/apidocs/org/apache/maven/plugin/resources/ResourcesMojo.html#delimiters
      The implementation of org.apache.maven.shared.filtering.MultiDelimiterInterpolatorFilterReaderLineEnding.read() contains several bugs
      if the first letter of the endToken is contained in the propertyname then the property is not filtered.
      (e.g. abcFILTER.a.MEabc)
      if the first letter of the endToken is contained in the startToken then the property is not filtered.
      (e.g. aaaFILTER.a.MEaaa)

      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <configuration>
         <useDefaultDelimiters>false</useDefaultDelimiters>
         <delimiters>
           <delimiter>aaa*aaa</delimiter>
           <delimiter>abc*abc</delimiter>
         </delimiters>
        </configuration>
      </plugin>
      

        Activity

        Hide
        Robert Scholte added a comment -

        Fixed in r1566429
        I couldn't reproduce the triple 'a' testcase, the abc usecase exposed a serious bug.

        Show
        Robert Scholte added a comment - Fixed in r1566429 I couldn't reproduce the triple 'a' testcase, the abc usecase exposed a serious bug.
        Robert Scholte made changes -
        Field Original Value New Value
        Resolution Fixed [ 1 ]
        Fix Version/s maven-filtering-1.2 [ 18729 ]
        Assignee Robert Scholte [ rfscholte ]
        Status Open [ 1 ] Closed [ 6 ]
        Robert Scholte made changes -
        Description The algorithm doesn't work as described in http://maven.apache.org/plugins/maven-resources-plugin/apidocs/org/apache/maven/plugin/resources/ResourcesMojo.html#delimiters
        The implementation of org.apache.maven.shared.filtering.MultiDelimiterInterpolatorFilterReaderLineEnding.read() contains several bugs
        if the first letter of the endToken is contained in the propertyname then the property is not filtered.
          (e.g. abcFILTER.a.MEabc)
        if the first letter of the endToken is contained in the startToken then the property is not filtered.
          (e.g. aaaFILTER.a.MEaaa)


        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <configuration>
           <useDefaultDelimiters>false</useDefaultDelimiters>
           <delimiters>
             <delimiter>aaa*aaa</delimiter>
             <delimiter>abc*abc</delimiter>
           </delimiters>
          </configuration>
        </plugin>
        Robert Scholte made changes -
        Description The algorithm doesn't work as described in http://maven.apache.org/plugins/maven-resources-plugin/apidocs/org/apache/maven/plugin/resources/ResourcesMojo.html#delimiters
        The implementation of org.apache.maven.shared.filtering.MultiDelimiterInterpolatorFilterReaderLineEnding.read() contains several bugs
        if the first letter of the endToken is contained in the propertyname then the property is not filtered.
          (e.g. abcFILTER.a.MEabc)
        if the first letter of the endToken is contained in the startToken then the property is not filtered.
          (e.g. aaaFILTER.a.MEaaa)

        {code:xml}
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <configuration>
           <useDefaultDelimiters>false</useDefaultDelimiters>
           <delimiters>
             <delimiter>aaa*aaa</delimiter>
             <delimiter>abc*abc</delimiter>
           </delimiters>
          </configuration>
        </plugin>
        {code}
        Hide
        Björn Michael added a comment -

        Thank you.
        The triple 'a' case has already been fixed in http://svn.apache.org/r1352151 MSHARED-228 MultiDelimiterInterpolatorFilterReaderLineEnding() does not filter after a token is escaped Submitted by Graham Leggett.

        Show
        Björn Michael added a comment - Thank you. The triple 'a' case has already been fixed in http://svn.apache.org/r1352151 MSHARED-228 MultiDelimiterInterpolatorFilterReaderLineEnding() does not filter after a token is escaped Submitted by Graham Leggett.

          People

          • Assignee:
            Robert Scholte
            Reporter:
            Björn Michael
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: