Vincent Massol wrote:
On Jan 5, 2009, at 5:01 PM, Fabio Mancinelli
wrote:
I will have a look at it.
Note: we cannot have a dependency on plexus since we want it to work
also with OSGi for example.
The init() way you've shown in the previous email sounds just perfect
to me. You let plexus instantiate the class and call init().
Argh :)
The plexus bridge was simply perfect, it handled all the
initialization
and discovery of resources declared in a components.xml.
Ok, I will work something out withouth dependencies...
Re the plexus dependency: AFAIU we will have it anyway because we need
plexus to instantiate the class. Maybe you were talking about resource
classes that don't have to be subclass of some plexus-bridge
superclass.
Isn't it?
There's no import on any plexus class anywhere in our components
(except in the plexus module of course).
The idea is that we should be independent of the component engine and
tomorrow move to OSGi without the need to change any existing module.
When plexus instantiate a class we don't see it. All we do is ask
xwiki's component manager to get us an instantiated class
(ComponentManager.lookup()). The plexus module then uses plexus to
implement the lookup but we can have an OSGi module that does the same
with OSGi.
Thanks
-Vincent