Sometimes plugins get added in an unofficial way - the pluginDiscovererManager

sees the plugin and marks it as 'installed' (it's in a hashtable somewhere).
The official way is to go through verifyPlugin. That gets called later on
for that plugin, which only calls addPlugin (that registers, resolves,
and, most importantly, creates a childContainer for that plugin!) IF
the plugin is NOT yet registered.

Since it is registered in the hashtable, but no childRealm was made there,
addPlugin doesn't get called. Added a simple check to ALSO call 'addPlugin'
if it was added to the hashtable. Side effect is that the version that
was normally going to be used is now used and overrides the other version.

This really needs a cleanup!

Committing anyway:

01:26<trygvis> right now I think we're allowed to push over old ladies and
               steal candy from small children to get this to work



git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@231353 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Kenney Westerhof 2005-08-10 23:31:40 +00:00
parent 013d4039fb
commit 309f26b810
1 changed files with 4 additions and 1 deletions

View File

@ -186,7 +186,10 @@ public class DefaultPluginManager
}
// TODO: this might result in an artifact "RELEASE" being resolved continuously
if ( !pluginCollector.isPluginInstalled( plugin ) )
// FIXME: need to find out how a plugin gets marked as 'installed'
// and no ChildContainer exists. The check for that below fixes
// the 'Can't find plexus container for plugin: xxx' error.
if ( !pluginCollector.isPluginInstalled( plugin ) || container.getChildContainer( plugin.getKey() ) == null )
{
try
{