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

Add stricter pattern filters to maven-common-artifact-filters

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Number of attachments :
      2

      Description

      There is a todo in http://svn.apache.org/viewvc/maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/filter/IncludesArtifactFilter.java?view=markup to add regex. I checked all the sources and could only find usages of this code by maven-assembly-plugin, webstart-maven-plugin and exec-maven-plugin. The latter two are in mojo.

      If you look at http://svn.palle.net/projects/hauskeeper/hauskeeper-server/src/assemblies/debian.xml, Trygvis is assuming that wildcards work, when in fact they do not. Arguably, this is a documentation bug that it does not work.

      The attached patch fixes this problem.

      1. IncludesArtifactFilter.patch
        1.0 kB
        Brian Topping
      2. MNG-2621.patch
        13 kB
        Mark Hobson

        Issue Links

          Activity

          Hide
          John Casey added a comment -

          I'll follow this up, to make sure it doesn't linger. Assigning to myself.

          Show
          John Casey added a comment - I'll follow this up, to make sure it doesn't linger. Assigning to myself.
          Hide
          Mark Hobson added a comment -

          Hi John, sure I can add this to maven-common-artifact-filters directly. I'll assign this to myself, refactor the code as mentioned above and commit, if that's okay? I'm not sure I understand you regarding point (1), the for-loop will be short-circuited since matched will be false.

          Show
          Mark Hobson added a comment - Hi John, sure I can add this to maven-common-artifact-filters directly. I'll assign this to myself, refactor the code as mentioned above and commit, if that's okay? I'm not sure I understand you regarding point (1), the for-loop will be short-circuited since matched will be false.
          Hide
          Mark Hobson added a comment -

          Updated issue title to reflect current direction.

          Show
          Mark Hobson added a comment - Updated issue title to reflect current direction.
          Hide
          Mark Hobson added a comment -

          Applied patch to maven-common-artifact-filters with John's suggestions: new filters are called StrictPatternIncludesArtifactFilter and StrictPatternExcludesArtifactFilter.

          Show
          Mark Hobson added a comment - Applied patch to maven-common-artifact-filters with John's suggestions: new filters are called StrictPatternIncludesArtifactFilter and StrictPatternExcludesArtifactFilter.
          Hide
          John Casey added a comment -

          my apologies, didn't read the patch closely enough.

          Show
          John Casey added a comment - my apologies, didn't read the patch closely enough.

            People

            • Assignee:
              Mark Hobson
              Reporter:
              Brian Topping
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: