Paul Christmann wrote:
>>    <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.

There is no difference to how Ant will run in the above situations. What I 
try to do is think in terms of what each target produces and what it 
requires. In the above case I would use the first alternative if t2 only 
uses things which are produced in the t1 target whereas I'd uses the second 
alternative if it t2 also uses things produced by init. I'm talking about 
direct relationships, not the transitive dependencies here.

The reason this can be important is when you start to refactor the build. If 
you change t1 so it no longer requires init to run first, will t2 still work?

Conor


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

Reply via email to