ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: [myrmidon] Depends as a task
Date Fri, 24 May 2002 15:12:12 GMT
Let me understand... I could do:

<target name="a"
        depends="b?, c"
  <javac ... />
  <depends target="d" />
  <copy ... />
  <depends target="e" />

... and the order of execution would be:

1) target b?
2) target c

and either:

3) nothing else (if b-property *not* set)


3) target a (if b-property *is* set)
3.a) task <javac>
3.b) target d
3.c) task <copy>
3.d) target e

So that would be like an <antcall> without the drawbacks of <antcall> (slow,
reparsing, stuff not propagating back up, etc...). A method call

I must be missing something surely ;-) I would use it, but it seems so
against a lot of things I've read on this forum so far (assuming I
understood correctly). --DD

-----Original Message-----
From: Peter Donald [] 
Sent: Friday, May 24, 2002 1:34 AM
Subject: [myrmidon] Depends as a task


I finally got around to making it possible to evaluate dependencies inside a

target. So now all the following are equivelent

  <target name="x" depends="a,b,c">
  <target name="x" depends="a">
    <depends target="b"/>
    <depends target="c"/>
  <target name="x">
    <depends target="a"/>
    <depends target="b"/>
    <depends target="c"/>
The advantage of this is that it allows you to declare dependencies in
other tasks like
  <target name="x">
    <log message="Before depends evaluated!"/>
    <depends target="c"/>
    <log message="After depends evaluated!"/>


Peter Donald

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message