o no attempt should even be made to load a plugin descriptor again if for that gav it's been loaded, the plugin collector has the descriptor

as found in the plugin JAR and after first processing the artifacts and realm is created so nothing else needs to be done for the base, set
  if plugin specific dependencies in the plugin are specified in a given project we'll wrap those, not recreate everything over again


git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@757126 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2009-03-22 03:42:51 +00:00
parent e3212b468c
commit cf2386359f
1 changed files with 13 additions and 7 deletions

View File

@ -152,10 +152,17 @@ public class DefaultPluginManager
{
return getByPrefix( prefix, session.getPluginGroups(), project.getRemoteArtifactRepositories(), session.getLocalRepository() );
}
public PluginDescriptor loadPlugin( Plugin plugin, MavenProject project, MavenSession session )
throws PluginLoaderException
{
PluginDescriptor pluginDescriptor = pluginCollector.getPluginDescriptor( plugin );
if ( pluginDescriptor != null )
{
return pluginDescriptor;
}
try
{
String pluginVersion = plugin.getVersion();
@ -175,11 +182,12 @@ public class DefaultPluginManager
addPlugin( plugin, project, session );
PluginDescriptor result = pluginCollector.getPluginDescriptor( plugin );
// This does not appear to be caching anything really.
pluginDescriptor = pluginCollector.getPluginDescriptor( plugin );
project.addPlugin( plugin );
return result;
return pluginDescriptor;
}
catch ( ArtifactResolutionException e )
{
@ -279,9 +287,7 @@ public class DefaultPluginManager
// Not going to happen
}
}
pluginRealm.display();
try
{
logger.debug( "Discovering components in realm: " + pluginRealm );