You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (Jira)" <ji...@apache.org> on 2020/07/31 11:25:00 UTC

[jira] [Closed] (MENFORCER-334) Regression: pluginVersions in Parent-POM pluginManagement not working

     [ https://issues.apache.org/jira/browse/MENFORCER-334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Scholte closed MENFORCER-334.
------------------------------------
      Assignee: Robert Scholte
    Resolution: Duplicate

> Regression: pluginVersions in Parent-POM pluginManagement not working
> ---------------------------------------------------------------------
>
>                 Key: MENFORCER-334
>                 URL: https://issues.apache.org/jira/browse/MENFORCER-334
>             Project: Maven Enforcer Plugin
>          Issue Type: Bug
>          Components: Plugin
>    Affects Versions: 3.0.0-M2
>         Environment: Maven 3.6.1, Ubuntu 18.04 LTS, Oracle JDK 1.8.0_181
>            Reporter: Wolf Geldmacher
>            Assignee: Robert Scholte
>            Priority: Major
>         Attachments: enforcer-regression.zip
>
>
> The enforcer plugin no longer accepts versions defined in a parent POMs pluginManagement section.
> In the example project attached you will find two pom.xml files. The one in the parent directory is to be installed/deployed into the repository and then to be used as parent POM in the project stub of the project directory.
> If the parent defines version 1.4.1 for the maven-enforcer-plugin, everything works as expected (i.e. when running "mvn validate" in the "project" directory validation succeeds), when the parent defines version 3.0.0-M2, validation fails with:
> [INFO] --- maven-enforcer-plugin:3.0.0-M2:enforce (default) @ project ---
> [WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequirePluginVersions failed with message:
> Some plugins are missing valid versions:(LATEST RELEASE SNAPSHOT are not allowed )
> org.apache.maven.plugins:maven-compiler-plugin. The version currently in use is 3.8.1
> org.apache.maven.plugins:maven-surefire-plugin. The version currently in use is 3.0.0-M3
> org.apache.maven.plugins:maven-jar-plugin. The version currently in use is 3.1.2
> org.apache.maven.plugins:maven-clean-plugin. The version currently in use is 3.1.0
> org.apache.maven.plugins:maven-install-plugin. The version currently in use is 3.0.0-M1
> org.apache.maven.plugins:maven-site-plugin. The version currently in use is 3.7.1
> org.apache.maven.plugins:maven-resources-plugin. The version currently in use is 3.1.0
> org.apache.maven.plugins:maven-deploy-plugin. The version currently in use is 3.0.0-M1
> org.apache.maven.plugins:maven-enforcer-plugin. The version currently in use is 3.0.0-M2
> Best Practice is to always define plugin versions!
> even though these versions have been defined in the pluginManagement section of the parent.



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