Fixing bug with resolving plugins and their deps.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@193111 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2005-06-23 08:40:15 +00:00
parent a9c8b7f7c3
commit b796b7635a
1 changed files with 8 additions and 4 deletions

View File

@ -555,14 +555,18 @@ public class DefaultPluginManager
MavenMetadataSource metadataSource = new MavenMetadataSource( artifactResolver, mavenProjectBuilder, MavenMetadataSource metadataSource = new MavenMetadataSource( artifactResolver, mavenProjectBuilder,
artifactFactory ); artifactFactory );
List remoteArtifactRepositories = project.getRemoteArtifactRepositories(); List remoteRepositories = new ArrayList();
remoteRepositories.addAll( project.getRemoteArtifactRepositories() );
remoteRepositories.addAll( project.getPluginArtifactRepositories() );
ArtifactRepository localRepository = session.getLocalRepository(); ArtifactRepository localRepository = session.getLocalRepository();
Set dependencies = metadataSource.retrieve( pluginArtifact, localRepository, Set dependencies = metadataSource.retrieve( pluginArtifact, localRepository,
remoteArtifactRepositories ); remoteRepositories );
ArtifactResolutionResult result = artifactResolver.resolveTransitively( dependencies, pluginArtifact, ArtifactResolutionResult result = artifactResolver.resolveTransitively( dependencies, pluginArtifact,
localRepository, localRepository,
remoteArtifactRepositories, remoteRepositories,
metadataSource, metadataSource,
artifactFilter ); artifactFilter );
@ -587,7 +591,7 @@ public class DefaultPluginManager
ArtifactFilter distroProvidedFilter = new InversionArtifactFilter( artifactFilter ); ArtifactFilter distroProvidedFilter = new InversionArtifactFilter( artifactFilter );
ArtifactResolutionResult distroProvidedResult = artifactResolver ArtifactResolutionResult distroProvidedResult = artifactResolver
.resolveTransitively( dependencies, pluginArtifact, localRepository, remoteArtifactRepositories, .resolveTransitively( dependencies, pluginArtifact, localRepository, remoteRepositories,
metadataSource, distroProvidedFilter ); metadataSource, distroProvidedFilter );
Set distroProvided = distroProvidedResult.getArtifacts(); Set distroProvided = distroProvidedResult.getArtifacts();