Uploaded image for project: 'Maven Shared Components'
  1. Maven Shared Components
  2. MSHARED-602

NoSuchMethodException using DependencyCollector with Maven 3.0

    Details

      Description

      The component Maven30DependencyCollector, which is used internally by DependencyCollector when running with Maven 3.0.x, raises a NoSuchMethodException when called. The stacktrace is:

      Caused by: org.apache.maven.shared.dependencies.collect.DependencyCollectorException: org.apache.maven.RepositoryUtils.toDependency(org.sonatype.aether.graph.Dependency, org.sonatype.aether.artifact.ArtifactTypeRegistry)
      	at org.apache.maven.shared.dependencies.collect.internal.Invoker.invoke(Invoker.java:133)
      	at org.apache.maven.shared.dependencies.collect.internal.Maven30DependencyCollector.toDependency(Maven30DependencyCollector.java:166)
      	at org.apache.maven.shared.dependencies.collect.internal.Maven30DependencyCollector.collectDependencies(Maven30DependencyCollector.java:116)
      	at org.apache.maven.shared.dependencies.collect.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:93)
      	at org.apache.maven.plugins.dependency.resolvers.ListRepositoriesMojo.doExecute(ListRepositoriesMojo.java:62)
      	... 22 more
      Caused by: java.lang.NoSuchMethodException: org.apache.maven.RepositoryUtils.toDependency(org.sonatype.aether.graph.Dependency, org.sonatype.aether.artifact.ArtifactTypeRegistry)
      	at java.lang.Class.getMethod(Class.java:1786)
      	at org.apache.maven.shared.dependencies.collect.internal.Invoker.invoke(Invoker.java:121)
      	... 26 more
      

      In the method toDependency, it tries to reflectively calls the method RepositoryUtils#toDependency. In Maven 3.0.x, this method takes as parameter objects of type org.apache.maven.model.Dependency and org.sonatype.aether.artifact.ArtifactTypeRegistry. However, the code tries to look for a method taking as first parameter an object of type org.sonatype.aether.graph.Dependency instead. Since this method doesn't exist, the exception is thrown.

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build maven-plugins #8701 (See https://builds.apache.org/job/maven-plugins/8701/)
        The list-repositories IT is broken with Maven 3.0.x because of a downstream bug in maven-artifact-trasnfer 0.9.0. Using the latest snapshot that fixes it (MSHARED-602). (gboue: http://svn.apache.org/viewvc/?view=rev&rev=1780625)

        • (edit) maven-dependency-plugin/pom.xml
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-plugins #8701 (See https://builds.apache.org/job/maven-plugins/8701/ ) The list-repositories IT is broken with Maven 3.0.x because of a downstream bug in maven-artifact-trasnfer 0.9.0. Using the latest snapshot that fixes it ( MSHARED-602 ). (gboue: http://svn.apache.org/viewvc/?view=rev&rev=1780625 ) (edit) maven-dependency-plugin/pom.xml
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build maven-shared #3329 (See https://builds.apache.org/job/maven-shared/3329/)
        MSHARED-602 NoSuchMethodException using DependencyCollector with Maven 3.0

        Looking for the method toDependency inside RepositoryUtils taking the correct org.apache.maven.model.Dependency instead of org.sonatype.aether.graph.Dependency. (gboue: http://svn.apache.org/viewvc/?view=rev&rev=1774759)

        • (edit) maven-artifact-transfer/src/main/java/org/apache/maven/shared/dependencies/collect/internal/Maven30DependencyCollector.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-shared #3329 (See https://builds.apache.org/job/maven-shared/3329/ ) MSHARED-602 NoSuchMethodException using DependencyCollector with Maven 3.0 Looking for the method toDependency inside RepositoryUtils taking the correct org.apache.maven.model.Dependency instead of org.sonatype.aether.graph.Dependency. (gboue: http://svn.apache.org/viewvc/?view=rev&rev=1774759 ) (edit) maven-artifact-transfer/src/main/java/org/apache/maven/shared/dependencies/collect/internal/Maven30DependencyCollector.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build maven-shared Jigsaw #51 (See https://builds.apache.org/job/maven-shared%20Jigsaw/51/)
        MSHARED-602 NoSuchMethodException using DependencyCollector with Maven 3.0

        Looking for the method toDependency inside RepositoryUtils taking the correct org.apache.maven.model.Dependency instead of org.sonatype.aether.graph.Dependency. (gboue: http://svn.apache.org/viewvc/?view=rev&rev=1774759)

        • (edit) maven-artifact-transfer/src/main/java/org/apache/maven/shared/dependencies/collect/internal/Maven30DependencyCollector.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-shared Jigsaw #51 (See https://builds.apache.org/job/maven-shared%20Jigsaw/51/ ) MSHARED-602 NoSuchMethodException using DependencyCollector with Maven 3.0 Looking for the method toDependency inside RepositoryUtils taking the correct org.apache.maven.model.Dependency instead of org.sonatype.aether.graph.Dependency. (gboue: http://svn.apache.org/viewvc/?view=rev&rev=1774759 ) (edit) maven-artifact-transfer/src/main/java/org/apache/maven/shared/dependencies/collect/internal/Maven30DependencyCollector.java
        Hide
        gboue Guillaume Boué added a comment -

        Fixed in r1774759.

        Show
        gboue Guillaume Boué added a comment - Fixed in r1774759 .

          People

          • Assignee:
            gboue Guillaume Boué
            Reporter:
            gboue Guillaume Boué
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development