[ 
https://issues.apache.org/jira/browse/MENFORCER-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16725993#comment-16725993
 ] 

Jason Young edited comment on MENFORCER-306 at 12/21/18 3:23 PM:
-----------------------------------------------------------------

The plugin itself can be built with `mvn install`, correct? I did a `git 
bisect` to find that ad0a84368f97a335a9455f04ec04bfbbb10ac49e pertaining to 
MENFORCER-281 probably causes this regression. I'm looking at this again 
because I wanted to use the the ["CI friendly 
versions"|https://maven.apache.org/maven-ci-friendly.html] approach, which that 
commit fixes.

EDIT: Just to clarify, I'm mentioning this to say, for the benefit of users of 
the enforcer plugin, that there is no released version of the enforcer plugin 
that does not have one of these two bugs. But the revision linked to above by 
[[email protected]] and below by [~khmarbaise] does appear to successfully fix 
both issues.


was (Author: [email protected]):
The plugin itself can be built with `mvn install`, correct? I did a `git 
bisect` to find that ad0a84368f97a335a9455f04ec04bfbbb10ac49e pertaining to 
MENFORCER-281 probably causes this regression. I'm looking at this again 
because I wanted to use the the ["CI friendly 
versions"|https://maven.apache.org/maven-ci-friendly.html] approach, which that 
commit fixes.

> [REGRESSION] RequirePluginVersions fails
> ----------------------------------------
>
>                 Key: MENFORCER-306
>                 URL: https://issues.apache.org/jira/browse/MENFORCER-306
>             Project: Maven Enforcer Plugin
>          Issue Type: Bug
>    Affects Versions: 3.0.0-M2
>            Reporter: Karl Heinz Marbaise
>            Assignee: Karl Heinz Marbaise
>            Priority: Critical
>             Fix For: 3.0.0
>
>         Attachments: MENFORCER-306.zip, pom.xml
>
>
> I have found that running the {{RequirePluginVersions}} rule on a project 
> with version {{3.0.0-M1}} works fine whereas it fails with version 
> {{3.0.0-M2}}.
> {code}
> [DEBUG] Executing rule: 
> org.apache.maven.plugins.enforcer.RequirePluginVersions
> [DEBUG] RequirePluginVersions.getAllPlugins:
> [DEBUG]   lifecycleMapping = clean
> [DEBUG]   plugins = org.apache.maven.plugins:maven-clean-plugin:2.5:clean
> [DEBUG]     plugin = org.apache.maven.plugins:maven-clean-plugin:2.5:clean
> [DEBUG]     GAV = [org.apache.maven.plugins, maven-clean-plugin, 2.5, clean]
> [DEBUG] RequirePluginVersions.getAllPlugins:
> [DEBUG]   lifecycleMapping = install
> [DEBUG]   plugins = org.apache.maven.plugins:maven-install-plugin:2.4:install
> [DEBUG]     plugin = org.apache.maven.plugins:maven-install-plugin:2.4:install
> [DEBUG]     GAV = [org.apache.maven.plugins, maven-install-plugin, 2.4, 
> install]
> [DEBUG]   lifecycleMapping = deploy
> [DEBUG]   plugins = org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
> [DEBUG]     plugin = org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
> [DEBUG]     GAV = [org.apache.maven.plugins, maven-deploy-plugin, 2.7, deploy]
> [DEBUG] RequirePluginVersions.getAllPlugins:
> [DEBUG]   lifecycleMapping = site
> [DEBUG]   plugins = org.apache.maven.plugins:maven-site-plugin:3.3:site
> [DEBUG]     plugin = org.apache.maven.plugins:maven-site-plugin:3.3:site
> [DEBUG]     GAV = [org.apache.maven.plugins, maven-site-plugin, 3.3, site]
> [DEBUG]   lifecycleMapping = site-deploy
> [DEBUG]   plugins = org.apache.maven.plugins:maven-site-plugin:3.3:deploy
> [DEBUG]     plugin = org.apache.maven.plugins:maven-site-plugin:3.3:deploy
> [DEBUG]     GAV = [org.apache.maven.plugins, maven-site-plugin, 3.3, deploy]
> [DEBUG] All Plugins in use: [Plugin [org.tinyjee.dim:doxia-include-macro], 
> Plugin [org.apache.maven.plugins:maven-clean-plugin], Plugin 
> [org.apache.maven.plugins:maven-install-plugin], Plugin 
> [org.apache.maven.plugins:maven-site-plugin], Plugin 
> [org.apache.maven.plugins:maven-deploy-plugin], Plugin 
> [org.jacoco:jacoco-maven-plugin], Plugin 
> [org.apache.maven.plugins:maven-enforcer-plugin]]
> [DEBUG] plugin org.tinyjee.dim:doxia-include-macro not found
> [DEBUG] plugin org.apache.maven.plugins:maven-clean-plugin not found
> [DEBUG] plugin org.apache.maven.plugins:maven-install-plugin not found
> [DEBUG] plugin org.apache.maven.plugins:maven-site-plugin not found
> [DEBUG] plugin org.apache.maven.plugins:maven-deploy-plugin not found
> [DEBUG] plugin org.jacoco:jacoco-maven-plugin not found
> [DEBUG] Adding failure due to exception
> org.apache.maven.enforcer.rule.api.EnforcerRuleException: Some plugins are 
> missing valid versions:(LATEST RELEASE SNAPSHOT are not allowed )
> org.tinyjee.dim:doxia-include-macro.  The version currently in use is 1.1
> org.apache.maven.plugins:maven-clean-plugin.  The version currently in use is 
> 3.0.0
> org.apache.maven.plugins:maven-install-plugin.        The version currently 
> in use is 2.5.2
> org.apache.maven.plugins:maven-site-plugin.   The version currently in use is 
> 3.6
> org.apache.maven.plugins:maven-deploy-plugin.         The version currently 
> in use is 2.8.2
> org.jacoco:jacoco-maven-plugin.       The version currently in use is 0.8.0
> Always define plugin versions! Never use LATEST or RELEASE.
>     at org.apache.maven.plugins.enforcer.RequirePluginVersions.execute 
> (RequirePluginVersions.java:320)
>     at org.apache.maven.plugins.enforcer.EnforceMojo.execute 
> (EnforceMojo.java:194)
>     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo 
> (DefaultBuildPluginManager.java:137)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to