From 5ad4dc1cc6dc84fb981d863e68e4614f9da15be1 Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Wed, 4 Mar 2009 11:35:58 +0000 Subject: [PATCH] o Restored compat with 2.x where the root is not resolved for ArtifactResolver.resolveTransitively() git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@749968 13f79535-47bb-0310-9956-ffa450edef68 --- .../maven/artifact/resolver/DefaultArtifactResolver.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java index 628df26237..6ee29ac06a 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java @@ -308,7 +308,7 @@ public class DefaultArtifactResolver List conflictResolvers ) throws ArtifactResolutionException, ArtifactNotFoundException { - ArtifactResolutionRequest request = new ArtifactResolutionRequest().setArtifact( originatingArtifact ).setArtifactDependencies( artifacts ).setManagedVersionMap( managedVersions ) + ArtifactResolutionRequest request = new ArtifactResolutionRequest().setArtifact( originatingArtifact ).setResolveRoot( false ).setArtifactDependencies( artifacts ).setManagedVersionMap( managedVersions ) .setLocalRepository( localRepository ).setRemoteRepostories( remoteRepositories ).setMetadataSource( source ).setFilter( filter ).setListeners( listeners ); return resolveWithExceptions( request ); @@ -388,7 +388,7 @@ public class DefaultArtifactResolver // file reference. But this may be a Maven Plugin that we need to resolve from a remote repository // as well as its dependencies. - if ( rootArtifact.getFile() == null ) + if ( request.isResolveRoot() && rootArtifact.getFile() == null ) { try {