Vincent Massol created MENFORCER-133:
----------------------------------------
Summary: Plugin brought by Maven extension fail the
requirePluginVersions check
Key: MENFORCER-133
URL: https://jira.codehaus.org/browse/MENFORCER-133
Project: Maven 2.x Enforcer Plugin
Issue Type: Bug
Components: Standard Rules
Affects Versions: 1.1
Reporter: Vincent Massol
Here's my use case (on the XWiki project):
* I have a custom maven lifecycle:
https://github.com/xwiki/xwiki-commons/tree/master/xwiki-commons-tools/xwiki-commons-tool-xar/xwiki-commons-tool-xar-handlers
* This lifecycle depends on a custom plugin:
https://github.com/xwiki/xwiki-commons/tree/master/xwiki-commons-tools/xwiki-commons-tool-xar/xwiki-commons-tool-xar-plugin
When I use this lifecycle in a project the enforcer check fails with:
{noformat}
[DEBUG] All Plugins in use: [Plugin
[org.apache.maven.plugins:maven-clean-plugin], Plugin
[org.apache.maven.plugins:maven-resources-plugin], Plugin
[org.xwiki.commons:xwiki-commons-tool-xar-plugin], Plugin
[org.apache.maven.plugins:maven-compiler-plugin], Plugin
[org.apache.maven.plugins:maven-deploy-plugin], Plugin
[org.apache.maven.plugins:maven-install-plugin], Plugin
[com.mycila.maven-license-plugin:maven-license-plugin], Plugin
[org.apache.maven.plugins:maven-site-plugin], Plugin
[org.apache.maven.plugins:maven-enforcer-plugin], Plugin
[org.apache.maven.plugins:maven-remote-resources-plugin], Plugin
[org.apache.maven.plugins:maven-checkstyle-plugin]]
[DEBUG] plugin org.xwiki.commons:xwiki-commons-tool-xar-plugin not found
[DEBUG] Adding failure due to exception
org.apache.maven.enforcer.rule.api.EnforcerRuleException: Some plugins are
missing valid versions:(SNAPSHOT are not allowed )
org.xwiki.commons:xwiki-commons-tool-xar-plugin. The version currently
in use is 4.1-milestone-2
{noformat}
The way the lifecycle is used is:
{noformat}
...
<build>
<extensions>
<!-- Needed to add support for the "xar" packaging -->
<extension>
<groupId>org.xwiki.commons</groupId>
<artifactId>xwiki-commons-tool-xar-handlers</artifactId>
<version>${commons.version}</version>
</extension>
</extensions>
...
{noformat}
So the problem is that the Enforcer seems to not see that the plugin *IS*
versionned in the xwiki-commons-tool-xar-handlers pom.xml.
Looks like a bug with extensions and enforcer plugin requirePluginVersions
rule. Not sure where the real culprit lies though.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira