Costin, From: <[EMAIL PROTECTED]> > > Well, I kind of need this - that's why I did the patch. I guess I can > create a new "TempTaskdef" - and use it instead of the official taskdef. > It's a bit inconvenient - I'm already doing a number of workarounds.
It may be dangerous to assume that tasks which use the same classpath can use the same classloader. I am already dealing with a task which initialises a singleton. If this task were to run in the same classloader, the second use of the task would fail since it can't re-init the singleton. It currently requires a different classloader per use. Now, while that may not be desirable, it is still possible. Therefore, I would prefer an approach where the build file writer is explicit about which tasks should use the same loader. Something like <taskgroup> <classpath refid="blah"/> <taskdef name="foo" classname="com.foo.Foo"/> <taskdef name="bar" classname="com.foo.Bar"/> </taskgroup> Thoughts? Conor
