Re: FileSet with copy fails with NPE..

2008-12-15 Thread Stefan Bodewig
On 2008-12-15, Raja Nagendra Kumar 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

Re: FileSet with copy fails with NPE..

2008-12-15 Thread Raja Nagendra Kumar
Ok Jeff. I take the documentation of the base and close this.. Though I would personally loved this to be resolved differently by way of parent and child approach or by some global defaults automatically initialized in this context. Regards, Nagendra Jeffrey E Care wrote: > > Raja Nagendra

Re: FileSet with copy fails with NPE..

2008-12-15 Thread Jeffrey E Care
Raja Nagendra Kumar wrote on 12/15/2008 08:40:48 AM: > patterns="${deviceID}.*,*.xml,vendor.*, global.*"> > > This is very simple: Ant is creating DeepCopy & that's it. Since Ant is creating DeepCopy as a result of parsing a project file (i.e. build.xml) it wi

Re: FileSet with copy fails with NPE..

2008-12-15 Thread Raja Nagendra Kumar
Hi Stefen, Thank you for the follow up questions.. 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. This is my ant description..

Re: FileSet with copy fails with NPE..

2008-12-14 Thread Stefan Bodewig
On 2008-12-12, Raja Nagendra Kumar wrote: > However Stefan, not able to convince on why this can't be done > automatically, as it is so obvious that new Copy Object is created while > wring the cutom tag extentions to ant. How is this obvious? Your code is creating the instance of the Copy cla

Re: FileSet with copy fails with NPE..

2008-12-12 Thread Raja Nagendra Kumar
Jeff, Sorry.. if my reply gave a such a feeling.. My indent was to really understand and take a pride to contribute to ant in any small way on a right cause.. If the discussion is going wrongly.. pl. ingore all my reply to this thread. I remeber the pain of 3 hours in figuring out what the issu

Re: FileSet with copy fails with NPE..

2008-12-12 Thread Jeffrey E Care
Raja Nagendra Kumar wrote on 12/12/2008 09:00:57 AM: > Still not clear, why should the custom task developer know these, when > this could be automatically inherited due to ant extention. I think this discussion has crossed the line into "titlting at windmills" territory...

Re: FileSet with copy fails with NPE..

2008-12-12 Thread Raja Nagendra Kumar
Steve Loughran wrote: > > Raja Nagendra Kumar 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. >> >> getProject() value on any tag if null, the non null GOBAL_DE

Re: FileSet with copy fails with NPE..

2008-12-12 Thread Steve Loughran
Raja Nagendra Kumar 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. getProject() value on any tag if null, the non null GOBAL_DEFAULT_PROJECT value is assumed with debug log mes

Re: FileSet with copy fails with NPE..

2008-12-11 Thread Raja Nagendra Kumar
Hi Stefan, Thank you the code changes. I shall go with the changed code. However Stefan, not able to convince on why this can't be done automatically, as it is so obvious that new Copy Object is created while wring the cutom tag extentions to ant. This code are used with in project context and

Re: FileSet with copy fails with NPE..

2008-12-11 Thread Stefan Bodewig
On 2008-12-11, Raja Nagendra Kumar wrote: > Based on lifecycle link you provided I see that there is a mention > of >> The task gets references to its project and location inside the >> buildfile via its inherited project and location variables. > In such cases, why should the user initialise t

Re: FileSet with copy fails with NPE..

2008-12-11 Thread Raja Nagendra Kumar
I understand initialisation is very impl. however if this could come free from parent.. then it is better..so trying to make the fix in those lines.. -- View this message in context: http://www.nabble.com/FileSet-with-copy-fails-with-NPE..-tp20935877p20951392.html Sent from the Ant - Dev mailing

Re: FileSet with copy fails with NPE..

2008-12-11 Thread Raja Nagendra Kumar
Thank you Stefan for providing the insites.. I complete see the point related to > tasks and maybe even . Based on lifecycle link you provided I see that there is a mention of > The task gets references to its project and location inside the buildfile > via its inherited project and location

Re: FileSet with copy fails with NPE..

2008-12-11 Thread Stefan Bodewig
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 ta

Re: FileSet with copy fails with NPE..

2008-12-10 Thread Raja Nagendra Kumar
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. getProject() value on any tag if null, the non null GOBAL_DEFAULT_PROJECT value is assumed with debug log message saying about this assum

Re: FileSet with copy fails with NPE..

2008-12-10 Thread Mark Salter
The thread I pointed you to also includes detail of how using the ant classes outside of their intended environment holds risks. Adding the checks you mention may save another person having to discover the solution to the same 'problem' in the future. Perhaps you could consider building a patch to

Re: FileSet with copy fails with NPE..

2008-12-10 Thread Raja Nagendra Kumar
Hi Mark, Thank you for quick reply.. I saw that listed in forum and thought I need to set the project fileset.. However, the issue was to set project for copy taks it self. To Ant Dev Team, It was 3 hours of wasted time to figure this out.. Simple copy without fileset usage works fine without

Re: FileSet with copy fails with NPE..

2008-12-10 Thread Mark Salter
Raja Nagendra Kumar wrote: > Hi, > > We are writing ant task, which needs to copy files based on fileset > defination like this.. This is really a question for the user mailing list... On that list was a recent discussion about probably the same problem... "Using Ant Tasks programmatically - Si