[
https://issues.apache.org/jira/browse/MENFORCER-321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16639946#comment-16639946
]
Alex Shesterov commented on MENFORCER-321:
------------------------------------------
Seems like {{session.getProjectDependencyGraph().getSortedProjects();}} doesn't
return parents, but does return children.
> RequirePluginVersions check works wrong on multi-module projects
> ----------------------------------------------------------------
>
> Key: MENFORCER-321
> URL: https://issues.apache.org/jira/browse/MENFORCER-321
> Project: Maven Enforcer Plugin
> Issue Type: Bug
> Components: Standard Rules
> Affects Versions: 3.0.0-M2
> Reporter: Alex Shesterov
> Priority: Major
>
> The {{RequirePluginVersions}} check doesn't work as documented on
> multi-module projects:
>
> *1. When the build is started on the parent POM:*
> If plugin versions are defined for just one of the modules (not the parent),
> the check succeeds, even if the plugin versions aren't defined for the parent
> pom or some other modules.
> For example, the {{<}}{{r}}{{equirePluginVersions>}} check succeeds for the
> following structure, if {{mvn validate}} is run for the parent POM:
> {code:java}
> Parent POM: does NOT define plugin versions, modules: Sub1, Sub2.
> |_ Sub1: Defines plugin versions.
> |_ Sub2: Does NOT define plugin versions.
> {code}
>
>
> *2. When the build is started for a "child module"* which inherits plugin
> versions from its parent, the enforcer plugin reports a failure.
> For example, the {{<}}{{r}}{{equirePluginVersions>}} check fails for the
> following structure, if {{mvn validate}} is run for Sub1:
> {code:java}
> Parent POM: Defines plugin versions, modules: Sub1, Sub2.
> |_ Sub1: Inherits plugin versions.
> |_ Sub2: Inherits plugin versions.
> {code}
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)