Uploaded image for project: 'MRUnit'
  1. MRUnit
  2. MRUNIT-209

Can't use the maven dependency plugin with maven 3 on mrunit

    XMLWordPrintableJSON

Details

    • Dependency upgrade
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.1.0
    • None

    Description

      mrunit depends on version 2.5.1 of the maven-dependency-plugin which doesn't run with maven 3.

      mvn dependency:tree
      [INFO] Scanning for projects...
      [INFO]
      [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building MRUnit 1.2.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] --- maven-dependency-plugin:2.5.1:tree (default-cli) @ mrunit ---
      [WARNING] Error injecting: org.apache.maven.shared.dependency.graph.internal.Maven3DependencyGraphBuilder
      java.lang.NoClassDefFoundError: org/sonatype/aether/graph/DependencyNode
      	at java.lang.Class.getDeclaredMethods0(Native Method)
      	at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
      	at java.lang.Class.getDeclaredMethods(Class.java:1855)
      	at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:674)
      	at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:366)
      	at com.google.inject.internal.ConstructorBindingImpl.getInternalDependencies(ConstructorBindingImpl.java:165)
      	at com.google.inject.internal.InjectorImpl.getInternalDependencies(InjectorImpl.java:609)
      	at com.google.inject.internal.InjectorImpl.cleanup(InjectorImpl.java:565)
      	at com.google.inject.internal.InjectorImpl.initializeJitBinding(InjectorImpl.java:551)
      	at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:865)
      	at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:790)
      	at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:278)
      	at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:210)
      	at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:986)
      	at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1019)
      	at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:982)
      	at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1032)
      	at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
      	at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
      	at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:55)
      	at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
      	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:100)
      	at org.eclipse.sisu.plexus.PlexusLifecycleManager.onProvision(PlexusLifecycleManager.java:133)
      	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:109)
      	at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:55)
      	at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
      	at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47)
      	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1054)
      	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
      	at com.google.inject.Scopes$1$1.get(Scopes.java:59)
      	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
      	at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:997)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1047)
      	at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:993)
      	at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:82)
      	at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
      	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:260)
      	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:240)
      	at org.apache.maven.shared.dependency.graph.internal.DefaultDependencyGraphBuilder.buildDependencyGraph(DefaultDependencyGraphBuilder.java:60)
      	at org.apache.maven.plugin.dependency.TreeMojo.execute(TreeMojo.java:202)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      	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:108)
      	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
      	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
      	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:606)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      Caused by: java.lang.ClassNotFoundException: org.sonatype.aether.graph.DependencyNode
      	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
      	... 62 more
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 1.960 s
      [INFO] Finished at: 2014-04-30T13:52:38-08:00
      [INFO] Final Memory: 17M/228M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.5.1:tree (default-cli) on project mrunit: Execution default-cli of goal org.apache.maven.plugins:maven-dependency-plugin:2.5.1:tree failed: A required class was missing while executing org.apache.maven.plugins:maven-dependency-plugin:2.5.1:tree: org/sonatype/aether/graph/DependencyNode
      [ERROR] -----------------------------------------------------
      [ERROR] realm =    plugin>org.apache.maven.plugins:maven-dependency-plugin:2.5.1
      [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
      [ERROR] urls[0] = file:/Users/alexandrenormand/.m2/repository/org/apache/maven/plugins/maven-dependency-plugin/2.5.1/maven-dependency-plugin-2.5.1.jar
      [ERROR] urls[1] = file:/Users/alexandrenormand/.m2/repository/commons-cli/commons-cli/1.0/commons-cli-1.0.jar
      [ERROR] urls[2] = file:/Users/alexandrenormand/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
      [ERROR] urls[3] = file:/Users/alexandrenormand/.m2/repository/org/apache/maven/reporting/maven-reporting-api/3.0/maven-reporting-api-3.0.jar
      [ERROR] urls[4] = file:/Users/alexandrenormand/.m2/repository/org/apache/maven/reporting/maven-reporting-impl/2.0.5/maven-reporting-impl-2.0.5.jar
      [ERROR] urls[5] = file:/Users/alexandrenormand/.m2/repository/org/apache/maven/doxia/doxia-core/1.0/doxia-core-1.0.jar
      [ERROR] urls[6] = file:/Users/alexandrenormand/.m2/repository/org/apache/maven/shared/maven-doxia-tools/1.0.2/maven-doxia-tools-1.0.2.jar
      [ERROR] urls[7] = file:/Users/alexandrenormand/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar
      [ERROR] urls[8] = file:/Users/alexandrenormand/.m2/repository/commons-validator/commons-validator/1.2.0/commons-validator-1.2.0.jar
      [ERROR] urls[9] = file:/Users/alexandrenormand/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar
      [ERROR] urls[10] = file:/Users/alexandrenormand/.m2/repository/commons-digester/commons-digester/1.6/commons-digester-1.6.jar
      [ERROR] urls[11] = file:/Users/alexandrenormand/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar
      [ERROR] urls[12] = file:/Users/alexandrenormand/.m2/repository/oro/oro/2.0.8/oro-2.0.8.jar
      [ERROR] urls[13] = file:/Users/alexandrenormand/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar
      [ERROR] urls[14] = file:/Users/alexandrenormand/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.0/doxia-sink-api-1.0.jar
      [ERROR] urls[15] = file:/Users/alexandrenormand/.m2/repository/org/apache/maven/doxia/doxia-site-renderer/1.0/doxia-site-renderer-1.0.jar
      [ERROR] urls[16] = file:/Users/alexandrenormand/.m2/repository/org/codehaus/plexus/plexus-i18n/1.0-beta-7/plexus-i18n-1.0-beta-7.jar
      [ERROR] urls[17] = file:/Users/alexandrenormand/.m2/repository/org/codehaus/plexus/plexus-velocity/1.1.7/plexus-velocity-1.1.7.jar
      [ERROR] urls[18] = file:/Users/alexandrenormand/.m2/repository/org/apache/velocity/velocity/1.5/velocity-1.5.jar
      [ERROR] urls[19] = file:/Users/alexandrenormand/.m2/repository/org/apache/maven/doxia/doxia-decoration-model/1.0/doxia-decoration-model-1.0.jar
      [ERROR] urls[20] = file:/Users/alexandrenormand/.m2/repository/org/apache/maven/doxia/doxia-module-apt/1.0/doxia-module-apt-1.0.jar
      [ERROR] urls[21] = file:/Users/alexandrenormand/.m2/repository/org/apache/maven/doxia/doxia-module-fml/1.0/doxia-module-fml-1.0.jar
      [ERROR] urls[22] = file:/Users/alexandrenormand/.m2/repository/org/apache/maven/doxia/doxia-module-xdoc/1.0/doxia-module-xdoc-1.0.jar
      [ERROR] urls[23] = file:/Users/alexandrenormand/.m2/repository/org/apache/maven/doxia/doxia-module-xhtml/1.0/doxia-module-xhtml-1.0.jar
      [ERROR] urls[24] = file:/Users/alexandrenormand/.m2/repository/org/codehaus/plexus/plexus-archiver/2.1.1/plexus-archiver-2.1.1.jar
      [ERROR] urls[25] = file:/Users/alexandrenormand/.m2/repository/org/codehaus/plexus/plexus-utils/3.0/plexus-utils-3.0.jar
      [ERROR] urls[26] = file:/Users/alexandrenormand/.m2/repository/org/apache/maven/shared/file-management/1.2.1/file-management-1.2.1.jar
      [ERROR] urls[27] = file:/Users/alexandrenormand/.m2/repository/org/apache/maven/shared/maven-shared-io/1.1/maven-shared-io-1.1.jar
      [ERROR] urls[28] = file:/Users/alexandrenormand/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
      [ERROR] urls[29] = file:/Users/alexandrenormand/.m2/repository/org/codehaus/plexus/plexus-io/2.0.3/plexus-io-2.0.3.jar
      [ERROR] urls[30] = file:/Users/alexandrenormand/.m2/repository/org/apache/maven/shared/maven-dependency-analyzer/1.2/maven-dependency-analyzer-1.2.jar
      [ERROR] urls[31] = file:/Users/alexandrenormand/.m2/repository/asm/asm/3.0/asm-3.0.jar
      [ERROR] urls[32] = file:/Users/alexandrenormand/.m2/repository/org/apache/maven/shared/maven-dependency-tree/2.0/maven-dependency-tree-2.0.jar
      [ERROR] urls[33] = file:/Users/alexandrenormand/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
      [ERROR] urls[34] = file:/Users/alexandrenormand/.m2/repository/org/apache/maven/shared/maven-common-artifact-filters/1.2/maven-common-artifact-filters-1.2.jar
      [ERROR] urls[35] = file:/Users/alexandrenormand/.m2/repository/org/apache/maven/shared/maven-plugin-testing-harness/1.1/maven-plugin-testing-harness-1.1.jar
      [ERROR] urls[36] = file:/Users/alexandrenormand/.m2/repository/org/apache/maven/shared/maven-invoker/2.0.11/maven-invoker-2.0.11.jar
      [ERROR] urls[37] = file:/Users/alexandrenormand/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
      [ERROR] urls[38] = file:/Users/alexandrenormand/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
      [ERROR] Number of foreign imports: 1
      [ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
      [ERROR]
      [ERROR] -----------------------------------------------------: org.sonatype.aether.graph.DependencyNode
      [ERROR] -> [Help 1]
      [ERROR]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [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/AetherClassNotFound
      

      More recent versions of the plugin work fine.

      Friends, it's time for an upgrade.

      Attachments

        1. MRUNIT-209.patch
          0.4 kB
          Alexandre Normand

        Activity

          People

            alexandre.normand Alexandre Normand
            alexandre.normand Alexandre Normand
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: