You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2009/09/11 17:06:06 UTC

svn commit: r813869 - /maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java

Author: bentmann
Date: Fri Sep 11 15:06:06 2009
New Revision: 813869

URL: http://svn.apache.org/viewvc?rev=813869&view=rev
Log:
[MNG-4353] [regression] Plugin dependencies are not downloaded from repos given in the plugin's POM

Modified:
    maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java

Modified: maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java?rev=813869&r1=813868&r2=813869&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java (original)
+++ maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java Fri Sep 11 15:06:06 2009
@@ -421,7 +421,9 @@
                 return result;
             }
         }
-        
+
+        RepositoryRequest collectionRequest = request;
+
         if ( request.isResolveTransitively() )
         {
             MetadataResolutionRequest metadataRequest = new DefaultMetadataResolutionRequest( request );
@@ -462,6 +464,9 @@
 
                     artifacts = new LinkedHashSet<Artifact>( mergedArtifacts.values() );
                 }
+
+                collectionRequest = new DefaultRepositoryRequest( request );
+                collectionRequest.setRemoteRepositories( resolutionGroup.getResolutionRepositories() );
             }
             catch ( ArtifactMetadataRetrievalException e )
             {
@@ -481,8 +486,8 @@
 
         // After the collection we will have the artifact object in the result but they will not be resolved yet.
         result =
-            artifactCollector.collect( artifacts, rootArtifact, managedVersions, request, source, collectionFilter,
-                                       listeners, null );
+            artifactCollector.collect( artifacts, rootArtifact, managedVersions, collectionRequest, source,
+                                       collectionFilter, listeners, null );
                         
         // We have metadata retrieval problems, or there are cycles that have been detected
         // so we give this back to the calling code and let them deal with this information