diff --git a/maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/transformer/NearestVersionSelector.java b/maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/transformer/NearestVersionSelector.java index 11e1af0d2..824c32627 100644 --- a/maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/transformer/NearestVersionSelector.java +++ b/maven-resolver-util/src/main/java/org/eclipse/aether/util/graph/transformer/NearestVersionSelector.java @@ -32,6 +32,7 @@ import org.eclipse.aether.util.graph.transformer.ConflictResolver.ConflictItem; import org.eclipse.aether.util.graph.transformer.ConflictResolver.VersionSelector; import org.eclipse.aether.util.graph.visitor.PathRecordingDependencyVisitor; +import org.eclipse.aether.util.graph.visitor.TreeDependencyVisitor; import org.eclipse.aether.version.Version; import org.eclipse.aether.version.VersionConstraint; @@ -155,7 +156,7 @@ private UnsolvableVersionConflictException newFailure( final ConflictContext con return context.isIncluded( node ); }; PathRecordingDependencyVisitor visitor = new PathRecordingDependencyVisitor( filter ); - context.getRoot().accept( visitor ); + context.getRoot().accept( new TreeDependencyVisitor( visitor ) ); return new UnsolvableVersionConflictException( visitor.getPaths() ); }