You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ke...@apache.org on 2005/08/11 01:31:43 UTC

svn commit: r231353 - /maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java

Author: kenney
Date: Wed Aug 10 16:31:40 2005
New Revision: 231353

URL: http://svn.apache.org/viewcvs?rev=231353&view=rev
Log:
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


Modified:
    maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java

Modified: maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java?rev=231353&r1=231352&r2=231353&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java (original)
+++ maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java Wed Aug 10 16:31:40 2005
@@ -186,7 +186,10 @@
         }
 
         // 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
             {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org