ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Duane Mattos <DMat...@maplesoft.com>
Subject <target A depends="B,C,D"/> vs. <dependset> (new to ant)
Date Tue, 20 Aug 2002 15:14:20 GMT
I imagine that this has been discussed in great detail already, my apologies.  I
found some useful snippets in the archive, but had a hard time refining my
search. :-)

If I understand correctly <target A depend"B,C,D"/> will execute the B,C & D
unless some 'if' or 'unless' property is set.  A target task doesn't know what
it creates, or whether what it creates exists, unless you set a property
'telling' it so.

So it seems that if you want to want to build A if-and-only-if B,C,D are newer
(or don't exist) you need to set a property using <uptodate>.  On the other hand
if B,C,D are newer than A, the most elegant way of deleting A if any of B,C, or
D are new is through the use of a  dependset.  

Is my understanding correct?

It sort of feels like you're doing the same work twice by not having all the
target-to-target relationships all contained within the target.

Is there another avenue I am not seeing?

This more of an Ant Dev discussion/question, so I may join and post this
there...

It feels more natural to me if a target 'knows' what it creates, and that what
it creates, or its product(s), 'belong(s)' to itself.

Would it be violating some Ant philosophy if a <target>  had some property
indicating what file or fileset it creates?  and then further add a different
type of dependency property that only executes A if B,C or D are newer (or if
some product or ingredient doesn't exist).  And by the same token it would
detect whether what it depends on is newer than its product(s) and then at the
same time deletes its product(s)?

thanks!

dM

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message