You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Henri Tremblay (Jira)" <ji...@apache.org> on 2021/08/02 12:59:00 UTC

[jira] [Created] (MENFORCER-389) Exclusions are not considered when looking at parent for requireReleaseDeps

Henri Tremblay created MENFORCER-389:
----------------------------------------

             Summary: Exclusions are not considered when looking at parent for requireReleaseDeps
                 Key: MENFORCER-389
                 URL: https://issues.apache.org/jira/browse/MENFORCER-389
             Project: Maven Enforcer Plugin
          Issue Type: Bug
          Components: Standard Rules
    Affects Versions: 3.0.0
            Reporter: Henri Tremblay


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:
{code:java}
<rules>
  <requireReleaseDeps>
    <message>No Snapshots Allowed!</message>
    <excludes>
      <exclude>${project.groupId}:*</exclude>
    </excludes>
    <failWhenParentIsSnapshot>true</failWhenParentIsSnapshot>
  </requireReleaseDeps>
</rules>
{code}
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}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)