ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raja Nagendra Kumar <Nagendra.R...@tejasoft.com>
Subject Re: FileSet with copy fails with NPE..
Date Mon, 15 Dec 2008 13:40:48 GMT

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..

<project name="J2MECommon">
    <import file="props/J2MEProps.xml"/>
    <import file="paths/J2MEPaths.xml"/>
    <import file="J2METaskDefs.xml"/>
    <import file="macros/J2MEMacros.xml"/>

    <macrodef name="tProps">
	<sequential>
                  <copy file="${build.wtk.res}/app.jad"
		  tofile="${dest.bin.file}.jad"
		  failonerror="false"/>
	    <DeepCopy dir="${foundation.j2me.buildutils.root}/props"
		    patterns="${deviceID}.*,*.xml,vendor.*, global.*">
		<include name="**/${deviceID}.properties"/>
	    </DeepCopy>
	</sequential>
</project>

In this macro defination of mine.. I have a copy taks.. which is a direct
ant copy using as it is with me explicitly setting project to which it
belongs too..

DeepCopy is custom Ant task.. which internally uses Copy with some custom
organisation specific logic to copy.

Its defination uses taskdef some thing like this..

<taskdef name="DeepCopy" classname="com.tejasoft.ant.j2me.DeepCopyTask">....

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)

If we could do this, I consider this as safe and right assumption from the
design..

Pl. let me know what I am missing here.. 

I wish to limit my self,  if by design this is the correct thing to be do.
if yes, we could explore on impl. options and complications it may bring in
due to various things  as told by forum members such as IDE, Parallel
execution etc..

Regards,
Nagendra


Stefan Bodewig wrote:
> 
> On 2008-12-12, Raja Nagendra Kumar <Nagendra.Raja@tejasoft.com> 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
> class, Ant is not involved at all.  I don't really see how Ant could
> or should interfere with that.  If you used
> getProject().createTask("copy") then Ant could know it (and actually
> will set the project instance) but it has other problems.
> 
>> This code are used with in project context and it gets invoked
>> though custom xml tags only in build file only.
> 
> Again, I don't see who should recognize this build file context if not
> your very own code.
> 
> Stefan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/FileSet-with-copy-fails-with-NPE..-tp20935877p21014177.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message