mirror of https://github.com/apache/maven.git
[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:
parent
02d3305b8e
commit
0c1b689e52
|
@ -490,7 +490,10 @@ public class DefaultPluginManager
|
||||||
|
|
||||||
checkPlexusUtils( resolutionGroup, artifactFactory );
|
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();
|
List repositories = new ArrayList();
|
||||||
|
|
||||||
|
@ -506,19 +509,6 @@ public class DefaultPluginManager
|
||||||
|
|
||||||
List resolved = new ArrayList( result.getArtifacts() );
|
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(); )
|
for ( Iterator it = resolved.iterator(); it.hasNext(); )
|
||||||
{
|
{
|
||||||
Artifact artifact = (Artifact) it.next();
|
Artifact artifact = (Artifact) it.next();
|
||||||
|
|
Loading…
Reference in New Issue