Uploaded image for project: 'Maven Enforcer Plugin'
  1. Maven Enforcer Plugin
  2. MENFORCER-389

Exclusions are not considered when looking at parent for requireReleaseDeps

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 3.0.0
    • 3.1.0
    • Standard Rules
    • None

    Description

      I would like to prevent parent poms to be a snapshots. But I have a multi-module project. The rule is this on the parent pom:

      <rules>
        <requireReleaseDeps>
          <message>No Snapshots Allowed!</message>
          <excludes>
            <exclude>${project.groupId}:*</exclude>
          </excludes>
          <failWhenParentIsSnapshot>true</failWhenParentIsSnapshot>
        </requireReleaseDeps>
      </rules>
      

      I would expect this to fail only when the parent pom is not in my groupId. But it's not what it does. It just makes failWhenParentIsSnapshot unusable for multi-module projects.

      See https://github.com/henri-tremblay/enforce-parent-bug for a full project to reproduce. Just type mvn enforcer:enforce

      Attachments

        Issue Links

          Activity

            People

              sjaranowski Slawomir Jaranowski
              henri Henri Tremblay
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: