On 2008-12-11, Raja Nagendra Kumar <[EMAIL PROTECTED]> wrote: > Pl. find the fix for the same in ProjectComponent
> We are defining a GOBAL_DEFAULT_PROJECT which would be same as the first non > null setProject call parameter. That would be a pretty bad idea, in particular in the presence of <ant> tasks and maybe even <parallel>. Generally Ant's API is not designed to be used in an embedded way and if you create any sort of task programatically you better make sure it is initialized properly, which includes setting the project instance. If you create a task programatically, make sure you implement the full lifecycles as defined <http://ant.apache.org/manual/develop.html#writingowntask> because the existing task will depend on it. I don't see you method setting the location, owning target or invoking init() either, which might get you in trouble as well. You may want to use Task.bindToOwner() to copy the most important properties from your current task to the manualy created copy task but should still invoke init() (some tasks use it, Copy does not). Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]