Title: Possible bug calling the same target more than once

I think I've hit a possible bug in nant, but before I dive in the source, I want to see if anyone else has hit this, and if there is currently a workaround.  It seems that if I use the <call> task to run a target, the first time I run the target everything executes fine, but the second time I call that same target, nothing happens.  nant never executes the target.  I've included a small snippet of code to demonstrate the issue.

I'm running the snapshot from May 14th. 

I the code below, startup is the default task.  Startup executes, sets the value of myProp to 1, then executes the IncrementBuildNumber target and the CompileProject target.  It then changes the value of myProp to 2, but never executes the IncrementBuildNumber or CompileProject targets the second time.

If there is any workaround on this let me know, else if someone can point me toward the appropriate class(s) I'd be happy to work on it.

Don



<project name="CallTester" default="startup">

 <target name="startup">
  <property name="myProp" value="1" />

  <echo message="Build project #1" />
  <call target="IncrementBuildNumber" />
  <call target="CompileProject" />

  <property name="myProp" value="2" />

  <echo message="Build project #2" />
  <call target="IncrementBuildNumber" />
  <call target="CompileProject" />
 </target>

 <target name="IncrementBuildNumber">
  <echo message="In IncrementBuildNumber" />
  <echo message="${myProp}" />
 </target>

 <target name="CompileProject">
  <echo message="In CompileProject" />
  <echo message="${myProp}" />
 </target>

</project>

Reply via email to