Hi devs,
I'm continuing on this topic since I really believe we need
annotations now. However I think it's best to have our own annotations
for injection.
One reason we need annotation (amongst other needs) is in order to be
able to create a xwiki uberjar for rendering modules for example. With
components.xml you cannot easily merge jars since you'd need to merge
components.xml so you'd need to write some xslt code for that.
Another reason is that we have to comment in the code things such as
"this field is injected automatically by the component manager". Of
course this comment is forgotten most of the time. It's much nicer to
have a @Inject annotation.
Last we need annotations if we want to be able to more easily support
different IOC frameworks since otherwise it means that for each fwk we
need to do again all components mappings in a static way.
Of course one basic need is evidently to reduce the number of config
lines we have to write and the errors associated with them.
I'm going to look into plexus annotations for a starter (+ guice) to
see how they do it and then I'll make a proposal for annotations.
Let me know what you think.
Thanks
-Vincent