DependsTask Patch

Here is an implementation of the <depends/> task.  It allows the use of dynamic
dependencies which was possible with earlier versions of NAnt through the
<call/> task, but with current changes is now longer allowed (deprecation of
the force attribute).

It is particularly useful for handling dependencies that change based on some
input conditions/parameters, or when the dependencies are not known until
runtime.

Here's a quick example of the possibilities:

<target name="foo">
  <if test="${some-option}">
    <depends on="A, B, ${set-at-runtime-target}/>
  </if>
</target>

For more information about this, check out the thread: "[nant-dev] Change to
"call" task makes upgrade difficult"

http://www.mail-archive.com/nant-developers%40lists.sourceforge.net/msg03105.html

Personally, I think it should be part of the core because it really is an
expansion of the <target/> depends attribute (they go hand-in-hand), however; I
would be just as happy if everyone decided to stick it in NAntContrib.

James.

Attachment: DependsTask.zip
Description: Zip compressed data

Reply via email to