Searching for the project-specified plugin instance, to get configuration...

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@328899 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2005-10-27 15:41:33 +00:00
parent 51f23d93d9
commit e244bc5072
1 changed files with 14 additions and 1 deletions

View File

@ -298,9 +298,22 @@ public class DefaultPluginManager
try
{
// the only Plugin instance which will have dependencies is the one specified in the project.
// We need to look for a Plugin instance there, in case the instance we're using didn't come from
// the project.
Plugin projectPlugin = (Plugin) project.getBuild().getPluginsAsMap().get( plugin.getKey() );
if ( projectPlugin == null )
{
projectPlugin = plugin;
}
Set artifacts =
MavenMetadataSource.createArtifacts( artifactFactory, plugin.getDependencies(), null, null, project );
MavenMetadataSource.createArtifacts( artifactFactory, projectPlugin.getDependencies(), null, null, project );
// Set artifacts =
// MavenMetadataSource.createArtifacts( artifactFactory, plugin.getDependencies(), null, null, project );
addedPlugin.setIntroducedDependencyArtifacts( artifacts );
}
catch ( InvalidDependencyVersionException e )