ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "glenn opdycke-hansen" <glenn...@gmail.com>
Subject Re: Question about "depends" attribute in the target element
Date Mon, 12 Nov 2007 18:07:29 GMT
Could you post the complete Ant script?
How are you invoking the script and the target(s)?

I noticed if you invoke ant with both targetA and targetB, then targetA
would be called multiple times.

However if you invoke ant with targetC (below) then targetA is invoked once.

<target name="targetC" depends="targetA, targetB">
<echo>in targetC</echo>
</target>

--glenn

On Nov 12, 2007 11:32 AM, broken connection <brokenconnection@gmail.com>
wrote:

> Hi Friends,
> As far as I knew, if we have "depends" in the target then that target
> would run only once. But my target is running multiple times.
>
> For example, I have this:
>
> <target name="targetA">
> </target>
>
> <target name="targetB" depends="targetA">
> </target>
>
> The execution results as:
> targetA
> targetA
> targetB
>
> But I thought since "targetA" has already been executed it should show up
> as:
>
> targetA
> targetB
>
> And only if targetA has not been executed before, then "targetB"
> should execute "targetA" i.e again the same output
>
> targetA
> targetB
>
> Please help me guys as to where my understanding is wrong.
>
> Thanks
> Mick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message