Hi,
I'm using CocoonTask, wich allow CocoonBean to be embedded in a Ant build script.
Great. I'm glad to hear you're using it.
I'm wondering if there's any reasons why there's no access (via protected method or fields or whatever) to the CocoonBean.
Basically, the CocoonBean is invoked via reflection, using a different classloader. Now, I'm no reflection expert, and calling each getter and setter one at a time using reflection seemed unreasonably complex. So, I chose to create a Delegate class, invoke that with reflection, and have that do the real work.
I wanted to use it directly to add BeanListeners, eventually add targets, and so on...
What sort of listeners would you like to add? If you want to specify a different listener, I would suggest coming up with a generic way to specify listeners and add that to the BeanConfigurator, so that all users of the CLI and Ant task get to benefit.
IMHO, the best way to "open" the CocoonTask is to allow subclasses to change the delegate class ("org.apache.cocoon.bean.helpers.AntDelegate" at the moment) and to give this delegate access to the calling Ant project.
So you supply a piece of java that configures the bean before running? Hmmm, I would much rather extend the xconf format to be able to add everything you want. The CocoonTask really should not assume any Java knowledge in its users.
Regards, Upayavira
