Ok, did some further investigation: What I have is an extension
containing a class (C). This class is referenced in the fields of two
different Mojos, the fields are not even initialized by Plexus. Looking
at the new DefaultExtensionManager, I suppose this cannot work any
more, because the newly introduced extension container has its own
ClassRealm. When any of the plugins is instantiated by the
PluginManager, I get a NoClassDefFoundError for class C.
Does this mean that I cannot access classes from extensions in a plugin
any more? And that I cannot share data between plugins, except by using
JDK and Maven core classes?
This would be a major setback for us. We're using maven to build C++
projects and wrote a bunch of plugins, which absolutely need to share
data.
Regards,
Jochen
On 2007-04-24 04:04:40 +0200, Brett Porter <[EMAIL PROTECTED]> said:
An extension should still work there, as long as the things are
instantiated in the extension itself - sounds like doing it in the
plugin is the problem. Is there a reason it must be there, or can you
use the plexus component lifecycle to do the instantiation?
Other than extensions, you can use plugin dependencies in most cases
(though doesn't sound suitable here). You might also be able to use
the plugin context to share the values instead of an extension (though
not if you are introducing new types, so probably not the case here
also).
- Brett
On 23/04/2007, at 3:43 PM, Jochen Kuhnle wrote:
Hi,
we use several plugins that need to share data. This as done by
creating an extension containing some "container" classes, and adding
an extension to the project's pom. These container classes are
instantiated in a plugin using Plexus. However, since 2.0.5, this
stopped working, because extensions now have their own container and
the Plugin throws a NoClassDefFoundError.
Is there new way/workaround for this?
Regards,
Jochen
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]