On 2008-12-15, Raja Nagendra Kumar <nagendra.r...@tejasoft.com> wrote:
> I am getting to feel that, I did not explain the senario correctly.. Let me > try again to support why I feel it is obvious. It is obvious to me as well. > As DeepCopy is used with in the build xml file, could ant consider all the > copy or any other api used with in DeepCopyTask be part of the same > project! (in this case project called J2MECommon) No, it can't. First of all the assumption of having one global Project instance that applies to all is simply not valid (IDEs, parallel, <ant> and all that), so there is no way Ant could provide any sort of default in a global place (see below for a not-so-global way). Since you are creating the Copy instance Ant doesn't know about it. For any sort of parent child relation to hold, Ant would need to know that your task is the parent of the Copy instance you've created. If you were required to tell Ant "this is mine", then it would most likely look like myCopy.bindToOwner(this). The not-so-global solution would involve ThreadLocal Project instances. They are less likely to be wrong, but can still be - <ant> changes the current project during the life of a single thread, for example. All in all I don't think there would be any benfit the later would provide (you'd still need to manually configure things if ThreadLocal turns out to be too weak) that was worth the added complexity in Ant. I'd stick with "bindToOwner". Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org