You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2017/01/28 01:37:24 UTC

[jira] [Commented] (MSHARED-602) NoSuchMethodException using DependencyCollector with Maven 3.0

    [ https://issues.apache.org/jira/browse/MSHARED-602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15843752#comment-15843752 ] 

Hudson commented on MSHARED-602:
--------------------------------

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


> NoSuchMethodException using DependencyCollector with Maven 3.0
> --------------------------------------------------------------
>
>                 Key: MSHARED-602
>                 URL: https://issues.apache.org/jira/browse/MSHARED-602
>             Project: Maven Shared Components
>          Issue Type: Bug
>          Components: maven-artifact-transfer
>    Affects Versions: maven-artifact-transfer-0.9.0
>            Reporter: Guillaume Boué
>            Assignee: Guillaume Boué
>             Fix For: maven-artifact-transfer-1.0.0
>
>
> The component {{Maven30DependencyCollector}}, which is used internally by {{DependencyCollector}} when running with Maven 3.0.x, raises a {{NoSuchMethodException}} when called. The stacktrace is:
> {noformat}
> 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
> {noformat}
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)