>     <target name="init"/>
>     <target name="t1" depends="init"/>
>     <target name="t2" depends="t1"/>

 versus 

>     <target name="init"/>
>     <target name="t1" depends="init"/>
>     <target name="t2" depends="init,t1"/>

Is there actually any difference in the way ant will process these
dependencies?  They appear to be identical, but the latter case lists
explicitly that it depends on init (rather than relying on implicit
dependencies), which implies "init" is on the dependency list twice.  I
know that Ant will only execute init once, though; I'm just curious if
there any implicitations (performance, anything else???) that affect one
approach more than the other.

I've had several cases where I've wavered back and forth between these
two approaches.  In general, I try to end up with whatever "feels" like
the real dependencies, even if it means repeating dependencies as in the
latter case.  For example, if the t2/t1 dependency is something I could
envision perhaps changing someday (perhaps "t2" is "tests" and "t1" is
"compile" - someday I might want to be able re-run a test without
recompilation), then I'll treat it like the 2nd case.  But if t2
requires t1 which required init, then I'll lean towards the former case.

One minor annoyance with the latter, though: I use an ant2dot.xsl that
was posted on this list back in June(many thanks Stefan!! (and Erik for
the build targets to automate it!!)).  The latter approach really
clutters up the graph.  I end up with two arrows out of t2 and two into
init.  But that's an issue with the stylesheet (and I'm still learning
XSL syntax to see if I can clean that up....)

THanks for any thoughts,

Paul Christmann


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to