Maven Release Plugin
  1. Maven Release Plugin
  2. MRELEASE-645

Allow File/Directory Patterns for the checkModificationExcludes Option

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.3
    • Component/s: branch, prepare, scm
    • Labels:
      None
    • Environment:
      all
    • Flags:
      Patch

      Description

      The checkModificationExcludes option does currently only allow the definition single files to be excluded from the SCM modification check. If this option is defined, all files anywhere in the maven project structure with the specified name will be excluded from the check. It is currently not possible to exclude files only within a specific directory or to exclude classes of files, i.e. all files matching a specific file name pattern.
      If the checkModificationExcludes option allowed the definition of file and directory patterns, these things would be possible.

      Example 1: I'd like to exclude a test resource src/test/resources/foo.properties from the modification check but the real foo.properties in src/main/resources should still be checked.

       
      <checkModificationExcludes>
        <checkModificationExclude>src/test/resources/foo.properties</checkModificationExclude>
      </checkModificationExcludes>
      

      Example 2: I'd like to exclude all properties files with the prefix bar from the modification check:

       
      <checkModificationExcludes>
        <checkModificationExclude>**/bar*.properties</checkModificationExclude>
      </checkModificationExcludes>
      

      The attached patch modifies the ScmCheckModificationsPhase to use the DirectoryScanner from plexus-utils instead of doing a strict file name comparison. The patch does not provide more unit tests for this feature but it adjusts the existing tests to run without any failures.

      1. maven-release-manager-r1305146.patch
        8 kB
        Stefan Ferstl
      2. maven-release-plugin-it.patch
        13 kB
        Stefan Ferstl
      3. maven-release-plugin-it-with-scm-provider.patch
        17 kB
        Stefan Ferstl
      4. modification-excludes.patch
        9 kB
        Stefan Ferstl
      5. MRELEASE-645.patch
        9 kB
        Robert Scholte

        Activity

        Stefan Ferstl created issue -
        Stefan Ferstl made changes -
        Field Original Value New Value
        Attachment maven-release-plugin-it.patch [ 59507 ]
        Attachment maven-release-manager-r1305146.patch [ 59506 ]
        Robert Scholte made changes -
        Assignee Robert Scholte [ rfscholte ]
        Robert Scholte made changes -
        Attachment MRELEASE-645.patch [ 59518 ]
        Stefan Ferstl made changes -
        Attachment maven-release-plugin-it-with-scm-provider.patch [ 59520 ]
        Robert Scholte made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Fix Version/s 2.3 [ 18334 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 12:15:05 UTC 2015 [ 1428236105845 ]
        Mark Thomas made changes -
        Workflow jira [ 12724459 ] Default workflow, editable Closed status [ 12763638 ]
        Mark Thomas made changes -
        Flags Patch [ 10430 ]
        Patch Submitted Yes [ 10763 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 00:52:26 UTC 2015 [ 1428281546237 ]
        Mark Thomas made changes -
        Workflow jira [ 12962139 ] Default workflow, editable Closed status [ 12999710 ]

          People

          • Assignee:
            Robert Scholte
            Reporter:
            Stefan Ferstl
          • Votes:
            12 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development