David,

The fact that the <call> task now also re-executes a given target is
definitely the correct behaviour (if you ask me), but perhaps we should
indeed add an attribute (eg. forcedeps, got a better name?  <- why do I also
struggle with this) to the <call> task that allow you to control whether
dependent targets should also be executed again .... This would ofcourse by
true by default ...

A workaround would be to use the target::has-executed function

eg. <target name= "2" unless=${target::has-executed('2')}">

Gert

----- Original Message ----- 
From: "Shaber, David" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 27, 2004 6:12 PM
Subject: [Nant-users] Call task and Dependencies?


When using the call task all targets and dependencies are executed. For
example, if I run execute target 3, I get the output below - notice that
target 2 is executed twice. The first time is by the call task, the
second time is as a dependency of target 1. I tried to get around this
with the force attribute, but it is depreciated.

Is there a way around this so that targets and dependencies are only run
once even if the call task is used?

<target name= "1" depends="2">
<echo message = "1" />
</target>

<target name= "2" >
<echo message= "2" />
</target>

<target name= "3" >
<echo message= "3" />
<call target="2" />
<echo message= "3" />
<call target="1" />
</target>


Output:

3:

     [echo] 3

2:

     [echo] 2
     [echo] 3

2:

     [echo] 2

1:

     [echo] 1

BUILD SUCCEEDED

Thanks for the help,
David


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id�66&op=ick
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id�66&op=click
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to