Uploaded image for project: 'Maven Enforcer Plugin'
  1. Maven Enforcer Plugin
  2. MENFORCER-392

Upgrading to Maven Enforcer 3.0.0 results in java.lang.NoSuchMethodError

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Resolved
    • 3.0.0
    • None
    • Plugin
    • None

    Description

      Upgrading from 3.0.0-M3 to 3.0.0 results in the following error:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0:enforce (basic-checks@validate) on project vegardit-maven-parent: Execution basic-checks@validate of goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0:enforce failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-enforcer-plugin:3.0.0:enforce: java.lang.NoSuchMethodError: 'org.apache.maven.shared.dependency.graph.DependencyNode org.apache.maven.shared.dependency.graph.DependencyGraphBuilder.buildDependencyGraph(org.apache.maven.project.MavenProject, org.apache.maven.artifact.resolver.filter.ArtifactFilter)'
      [ERROR] -----------------------------------------------------
      [ERROR] realm =    plugin>org.apache.maven.plugins:maven-enforcer-plugin:3.0.0
      [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
      [ERROR] urls[0] = file:/C:/apps/dev/maven-repo/org/apache/maven/plugins/maven-enforcer-plugin/3.0.0/maven-enforcer-plugin-3.0.0.jar
      [ERROR] urls[1] = file:/C:/apps/dev/maven-repo/org/codehaus/mojo/extra-enforcer-rules/1.3/extra-enforcer-rules-1.3.jar
      [ERROR] urls[2] = file:/C:/apps/dev/maven-repo/org/apache/maven/shared/maven-dependency-tree/3.1.0/maven-dependency-tree-3.1.0.jar
      [ERROR] urls[3] = file:/C:/apps/dev/maven-repo/junit/junit/4.13.2/junit-4.13.2.jar
      [ERROR] urls[4] = file:/C:/apps/dev/maven-repo/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
      [ERROR] urls[5] = file:/C:/apps/dev/maven-repo/commons-codec/commons-codec/1.15/commons-codec-1.15.jar
      [ERROR] urls[6] = file:/C:/apps/dev/maven-repo/org/apache/maven/shared/maven-common-artifact-filters/3.2.0/maven-common-artifact-filters-3.2.0.jar
      [ERROR] urls[7] = file:/C:/apps/dev/maven-repo/org/apache/maven/shared/maven-shared-utils/3.3.3/maven-shared-utils-3.3.3.jar
      [ERROR] urls[8] = file:/C:/apps/dev/maven-repo/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar
      [ERROR] urls[9] = file:/C:/apps/dev/maven-repo/com/google/guava/guava/10.0.1/guava-10.0.1.jar
      [ERROR] urls[10] = file:/C:/apps/dev/maven-repo/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar
      [ERROR] urls[11] = file:/C:/apps/dev/maven-repo/org/sonatype/sisu/sisu-guice/3.1.0/sisu-guice-3.1.0-no_aop.jar
      [ERROR] urls[12] = file:/C:/apps/dev/maven-repo/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
      [ERROR] urls[13] = file:/C:/apps/dev/maven-repo/org/eclipse/sisu/org.eclipse.sisu.inject/0.0.0.M5/org.eclipse.sisu.inject-0.0.0.M5.jar
      [ERROR] urls[14] = file:/C:/apps/dev/maven-repo/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
      [ERROR] urls[15] = file:/C:/apps/dev/maven-repo/org/codehaus/plexus/plexus-interpolation/1.19/plexus-interpolation-1.19.jar
      [ERROR] urls[16] = file:/C:/apps/dev/maven-repo/org/codehaus/plexus/plexus-component-annotations/2.0.0/plexus-component-annotations-2.0.0.jar
      [ERROR] urls[17] = file:/C:/apps/dev/maven-repo/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
      [ERROR] urls[18] = file:/C:/apps/dev/maven-repo/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
      [ERROR] urls[19] = file:/C:/apps/dev/maven-repo/org/codehaus/plexus/plexus-utils/3.3.0/plexus-utils-3.3.0.jar
      [ERROR] urls[20] = file:/C:/apps/dev/maven-repo/org/apache/maven/enforcer/enforcer-api/3.0.0/enforcer-api-3.0.0.jar
      [ERROR] urls[21] = file:/C:/apps/dev/maven-repo/org/apache/maven/enforcer/enforcer-rules/3.0.0/enforcer-rules-3.0.0.jar
      [ERROR] urls[22] = file:/C:/apps/dev/maven-repo/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar
      [ERROR] urls[23] = file:/C:/apps/dev/maven-repo/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar
      [ERROR] urls[24] = file:/C:/apps/dev/maven-repo/org/apache-extras/beanshell/bsh/2.0b6/bsh-2.0b6.jar
      [ERROR] urls[25] = file:/C:/apps/dev/maven-repo/org/apache/maven/resolver/maven-resolver-util/1.6.1/maven-resolver-util-1.6.1.jar
      [ERROR] Number of foreign imports: 1
      [ERROR] import: Entry[import  from realm ClassRealm[project>com.vegardit.maven:vegardit-maven-parent:2.4.32-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
      [ERROR]
      [ERROR] -----------------------------------------------------
      
      Caused by: java.lang.NoSuchMethodError: org.apache.maven.shared.dependency.graph.DependencyGraphBuilder.buildDependencyGraph(Lorg/apache/maven/project/MavenProject;Lorg/apache/maven/artifact/resolver/filter/ArtifactFilter;)Lorg/apache/maven/shared/dependency/graph/DependencyNode;
          at org.apache.maven.plugins.enforcer.BanCircularDependencies.getDependenciesToCheck (BanCircularDependencies.java:137)
          at org.apache.maven.plugins.enforcer.BanCircularDependencies.execute (BanCircularDependencies.java:83)
          at org.apache.maven.plugins.enforcer.EnforceMojo.execute (EnforceMojo.java:200)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
          at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:498)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      

      relevant output of mvn dependency:resolve-plugins:

      [INFO]    org.apache.maven.plugins:maven-enforcer-plugin:maven-plugin:3.0.0:runtime
      [INFO]       org.apache.maven.plugins:maven-enforcer-plugin:jar:3.0.0
      [INFO]       org.apache.maven:maven-artifact:jar:3.1.1
      [INFO]       org.apache.maven:maven-plugin-api:jar:3.1.1
      [INFO]       org.apache.maven:maven-model:jar:3.1.1
      [INFO]       org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.0.0.M5
      [INFO]       javax.enterprise:cdi-api:jar:1.0
      [INFO]       javax.annotation:jsr250-api:jar:1.0
      [INFO]       javax.inject:javax.inject:jar:1
      [INFO]       com.google.guava:guava:jar:10.0.1
      [INFO]       com.google.code.findbugs:jsr305:jar:1.3.9
      [INFO]       org.sonatype.sisu:sisu-guice:jar:no_aop:3.1.0
      [INFO]       aopalliance:aopalliance:jar:1.0
      [INFO]       org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.0.0.M5
      [INFO]       org.apache.maven:maven-core:jar:3.1.1
      [INFO]       org.apache.maven:maven-settings:jar:3.1.1
      [INFO]       org.apache.maven:maven-settings-builder:jar:3.1.1
      [INFO]       org.apache.maven:maven-repository-metadata:jar:3.1.1
      [INFO]       org.apache.maven:maven-model-builder:jar:3.1.1
      [INFO]       org.apache.maven:maven-aether-provider:jar:3.1.1
      [INFO]       org.eclipse.aether:aether-spi:jar:0.9.0.M2
      [INFO]       org.eclipse.aether:aether-impl:jar:0.9.0.M2
      [INFO]       org.eclipse.aether:aether-api:jar:0.9.0.M2
      [INFO]       org.eclipse.aether:aether-util:jar:0.9.0.M2
      [INFO]       org.codehaus.plexus:plexus-interpolation:jar:1.19
      [INFO]       org.codehaus.plexus:plexus-classworlds:jar:2.5.1
      [INFO]       org.codehaus.plexus:plexus-component-annotations:jar:2.0.0
      [INFO]       org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3
      [INFO]       org.sonatype.plexus:plexus-cipher:jar:1.4
      [INFO]       org.codehaus.plexus:plexus-utils:jar:3.3.0
      [INFO]       org.apache.maven.enforcer:enforcer-api:jar:3.0.0
      [INFO]       org.apache.maven.enforcer:enforcer-rules:jar:3.0.0
      [INFO]       org.apache.maven.shared:maven-common-artifact-filters:jar:3.2.0
      [INFO]       org.apache.maven.shared:maven-shared-utils:jar:3.3.3
      [INFO]       org.apache.commons:commons-lang3:jar:3.12.0
      [INFO]       commons-codec:commons-codec:jar:1.15
      [INFO]       commons-io:commons-io:jar:2.11.0
      [INFO]       org.apache-extras.beanshell:bsh:jar:2.0b6
      [INFO]       org.apache.maven.shared:maven-dependency-tree:jar:3.1.0
      [INFO]       org.apache.maven.resolver:maven-resolver-util:jar:1.6.1
      [INFO]       org.apache.maven.resolver:maven-resolver-api:jar:1.6.1
      [INFO]       org.apache.maven:maven-compat:jar:3.1.1
      [INFO]       org.apache.maven.wagon:wagon-provider-api:jar:2.4
      

      Attachments

        1. build-log.txt
          58 kB
          Sebastian T

        Activity

          People

            Unassigned Unassigned
            seb Sebastian T
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: