maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brett Porter (JIRA)" <j...@codehaus.org>
Subject [jira] Created: (MNG-214) plugin parameters instantiated from wrong classloader
Date Fri, 18 Mar 2005 00:59:44 GMT
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


Mime
View raw message