> Now, the example of <call target="foo" force="false"/> is a little
> ambiguous. Do you mean, don't force "foo" (meaning only execute if it hasn't
> yet), or don't force all the dependencies, or both? Would your <depends
> on=""/> not force any executions?

To answer your question above, it would be both; that is, not to force the call
*and* its dependencies, so yes, the <depends on=""/> task would not force any
executions.

This was also my rational of not just adding a flag to <call/>. The <depends/>
task is just a dynamic form of the <target/> task's depends attribute..., in
all other respect their ultimate functionality would be identical.  The
<depends/> task was not meant to be used as a way to call targets, but (more
accurately), to assert that a set of dependencies were meet or handled (if
needed) before continuing. This is similar a little bit to .NET security with
the way you can request certain privileges up front (as assembly metadata), or
dynamically by asserting them within code.

<target name="foo" depends="init">
  <if test="${some-switch}">
    <depends on="A, B"/>
  </if>
  <if test="${other-option}">
    <depends on="setup"/>
  </if>
</target>

This is incredibly useful when your build system has many input parameters which
affect target dependencies based on their values (as is the case with us).

James.


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to