diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactCollector.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactCollector.java index 8881ac23ce..64b5470237 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactCollector.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactCollector.java @@ -171,6 +171,8 @@ public class DefaultArtifactCollector set.add( node ); + // This is required right now. + result.addArtifact( artifact ); result.addRequestedArtifact( artifact ); } } diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolverTest.java b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolverTest.java index 31c4e7f5cd..a0ab7d2de4 100644 --- a/maven-compat/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolverTest.java +++ b/maven-compat/src/test/java/org/apache/maven/artifact/resolver/ArtifactResolverTest.java @@ -157,8 +157,7 @@ public class ArtifactResolverTest }; ArtifactResolutionResult result = - artifactResolver.resolveTransitively( Collections.singleton( g ), projectArtifact, remoteRepositories(), - localRepository(), mds ); + artifactResolver.resolveTransitively( Collections.singleton( g ), projectArtifact, remoteRepositories(), localRepository(), mds ); assertEquals( 2, result.getArtifacts().size() );