[MNG-3037] Combining plugin dependencies with plugin-level dependencies from the current project PRIOR to resolution, to enable version-conflict resolution to take place between the two sets of dependencies.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@544662 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2007-06-05 22:38:33 +00:00
parent 02d3305b8e
commit 0c1b689e52
1 changed files with 4 additions and 14 deletions

View File

@ -490,7 +490,10 @@ public class DefaultPluginManager
checkPlexusUtils( resolutionGroup, artifactFactory );
Set dependencies = new HashSet( resolutionGroup.getArtifacts() );
Set dependencies = new LinkedHashSet( resolutionGroup.getArtifacts() );
// Also resolve the plugin dependencies specified in <plugin><dependencies>:
dependencies.addAll( projectPluginDependencies );
List repositories = new ArrayList();
@ -506,19 +509,6 @@ public class DefaultPluginManager
List resolved = new ArrayList( result.getArtifacts() );
getLogger().debug( "Main plugin artifacts: " + resolved.toString().replace( ',', '\n' ) );
// Also resolve the plugin dependencies specified in <plugin><dependencies>:
resolved.addAll( artifactResolver.resolveTransitively( projectPluginDependencies,
pluginArtifact,
project.getManagedVersionMap(),
localRepository,
repositories,
artifactMetadataSource,
coreArtifactFilterManager.getArtifactFilter() ).getArtifacts() );
getLogger().debug( "After adding project-level plugin dependencies: " + resolved.toString().replace( ',', '\n' ) );
for ( Iterator it = resolved.iterator(); it.hasNext(); )
{
Artifact artifact = (Artifact) it.next();