Bug 748074 - maven-enforcer-plugin is not compatible with maven3
Summary: maven-enforcer-plugin is not compatible with maven3
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: maven-enforcer
Version: 16
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Jaromír Cápík
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-21 22:33 UTC by Orion Poplawski
Modified: 2016-02-01 01:55 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-07 03:16:23 UTC
Type: ---


Attachments (Terms of Use)

Description Orion Poplawski 2011-10-21 22:33:04 UTC
Description of problem:

While trying to build mybatis-parent that uses maven-enforcer-plugin:

[INFO] --- maven-enforcer-plugin:1.0.1:enforce (enforce-java) @ mybatis-parent ---
[INFO] The requirePluginVersions rule is currently not compatible with Maven3.
[WARNING] Rule 3: org.apache.maven.plugins.enforcer.RequireProperty failed with message:
[ERROR] You must set the property 'findbugs.onlyAnalyze' in your project pom!
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.996s
[INFO] Finished at: Fri Oct 21 16:25:00 MDT 2011
[INFO] Final Memory: 7M/16M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.0.1:enforce (enforce-java) on project mybatis-parent: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]

I can set -Dfindbugs.onlyAnalyze to work around.

Version-Release number of selected component (if applicable):
maven-enforcer-plugin-1.0.1-2.fc16.noarch

Comment 1 Jaromír Cápík 2012-02-02 17:18:26 UTC
Hello Orion.

I'll try to apply a patch attached to the upstream tracker by Jeff Maury. It is not accepted by the upstream yet, but since the issue is older than year, I don't expect it would happen soon. Could You please test that again once I fix the maven-enforcer build?
Thanks in advance.

Regards,
Jaromir

Comment 2 Orion Poplawski 2012-02-02 17:27:05 UTC
I think I can do that.

Comment 3 Jaromír Cápík 2012-02-02 18:02:04 UTC
Thank You ...

maven-enforcer-1.0.1-4.fc17 has been built. 

Please test ...

Comment 4 Orion Poplawski 2012-02-07 03:16:23 UTC
Well, apparently one needs to set findbugs.onlyAnalyze as a matter of course.  But I no longer get then maven3 incompatibility warning.

Without findbugs.onlyAnalyze:

[INFO] --- maven-enforcer-plugin:1.0.1:enforce (enforce-java) @ mybatis-parent ---
[WARNING] Rule 3: org.apache.maven.plugins.enforcer.RequireProperty failed with message:
[ERROR] You must set the property 'findbugs.onlyAnalyze' in your project pom!
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.554s
[INFO] Finished at: Mon Feb 06 20:01:41 MST 2012
[INFO] Final Memory: 13M/147M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.0.1:enforce (enforce-java) on project mybatis-parent: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.0.1:enforce (enforce-java) on project mybatis-parent: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed.
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:158)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed.
        at org.apache.maven.plugins.enforcer.EnforceMojo.execute(EnforceMojo.java:224)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 more
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException


With:
[INFO] --- maven-enforcer-plugin:1.0.1:enforce (enforce-java) @ mybatis-parent ---
[INFO] 
[INFO] --- animal-sniffer-maven-plugin:1.7:check (check-java-1.5-compat) @ mybatis-parent ---
[INFO] Checking unresolved references to org.codehaus.mojo.signature:java15:1.0
[INFO] 
[INFO] --- maven-bundle-plugin:2.3.6:manifest (bundle-manifest) @ mybatis-parent ---
[WARNING] Ignoring project type pom - supportedProjectTypes = [jar, bundle, war, maven-plugin]
[INFO] 
[INFO] --- maven-source-plugin:2.1.2:jar-no-fork (attach-sources) @ mybatis-parent ---
[INFO] 
[INFO] --- maven-javadoc-plugin:2.8.1:jar (attach-javadocs) @ mybatis-parent ---
[INFO] Not executing Javadoc as the project is not a Java classpath-capable package
[INFO] 
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ mybatis-parent ---
[INFO] Installing /builddir/build/BUILD/mybatis-parent-11/pom.xml to /builddir/build/BUILD/mybatis-parent-11/.m2/org/mybatis/mybatis-parent/11/mybatis-parent-11.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS

So I guess it's working

Comment 5 Mikolaj Izdebski 2012-10-12 18:18:15 UTC
Upstream bug:
http://jira.codehaus.org/browse/MENFORCER-98


Note You need to log in before you can comment on or make changes to this bug.