You are viewing a plain text version of this content. The canonical link for it is here.
Posted to m2-dev@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2005/03/18 01:59:44 UTC

[jira] Created: (MNG-214) plugin parameters instantiated from wrong classloader

plugin parameters instantiated from wrong classloader
-----------------------------------------------------

         Key: MNG-214
         URL: http://jira.codehaus.org/browse/MNG-214
     Project: m2
        Type: Bug
  Components: maven-core  
    Reporter: Brett Porter
     Fix For: 1.0-alpha-2


example: can't currently build maven-assemble-plugin as the /build/ uses the modello plugin, but the plugin-plugin is loaded because of the build type.

in populating the modello plugin, #component.org.codehaus.modello.ModelloCore is looked up by role. The lookup finds the class from the maven-plugin-plugin classloader, as it was the first classloader to be registered with plexus. However, the modello plugin is executed in the modello-plugin classloader - classcastexception results.

What needs to happen is that when constructing the arguments for the modello plugin, all lookups must take place inside the modello classloader (how to feed this down to plexus, I don't know).

The offending line where the wrong classloader is discovered is JavaComponentFactory:24:
ClassRealm componentClassRealm = container.getComponentRealm( componentDescriptor.getComponentKey() );

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira