Try rewriting your OnSuccess task as:

<target name="Onsuccess" depends="Zip,Deploy">
  <echo message="Complete A"/>
</target>

The 'call' task doesn't support the 'run-only-once' model of make,
whereas 'depends' does.

I'm not sure that's a particularly good reason why onsuccess is firing
more than once, however.

-- Troy


> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Brian Yeo
> Sent: Wednesday, 21 July 2004 11:39 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: [Nant-users] nant.onsuccess going into a loop?
> 
> Hi everyone,
> 
> I tried with "nant.onsuccess" and it seems that it repeats 
> itself in a loop when it is successful. Is anyone able to help?
> 
> NAnt 085 nighlightly build version is used.
> 
> *** script
> 
> <?xml version="1.0"?>
> <project name="Phase2" default="Test success build">
> 
> <!-- Setup details for NAnt to work -->
> 
>     <property name="debug"          value="false" />
>     <property name="read.state"     value="false" />
>     <property name="failonerr"      value="false" />
>     <property name="release.state"  value="release" />
>     <property name="release.folder" value="bin\release" />
> 
>     <property name="nant.onsuccess" value="Onsuccess"/>
>     <property name="nant.onfailure" value="Onfailure"/>
> 
>     <property name="Release" value="Release" />
> 
> 
>   <target name="Build-A" description="PRoject A">
>       <echo message="Build project A"/>
>       <call target="Onsuccess"/>
>    </target>
> 
>   <target name="Onsuccess">
> 
>       <call target="Zip"/>
>       <call target="Deploy"/>
>       <echo message="Complete A"/>
>   </target>
> 
>   <target name="Onfailure">
>       <echo message="Undo check out on A"/>
>   </target>
> 
>   <target name="Compile" description="Compile all scripts">
>       <call target="Compile-debug" if="${debug}"/>
>       <call target="Compile-release" unless="${debug}"/>
>   </target>
> 
>   <target name="Compile-debug" description="Compile in debug">
>       <echo message="Compile in debug mode"/>
> 
>       <call target="Build-A"/>
> 
>   </target>
> 
>   <target name="Compile-release" description="Compile in release">
>       <echo message="Compile in release mode"/>
> 
>       <call target="Build-A" />
> 
>   </target>
> 
>   <target name="Zip" description="Zip all component dlls and exes">
>       <echo message="Zip all Dlls" />
>   </target>
> 
>   <target name="Deploy" description="Deploy dll to pre folder">
>         <echo message="Deploy files to remote folder" />
>   </target>
> 
>   <target name="Test success build" >
>       <call target="Compile" />
>    </target>
> 
> </project>
> 
> 
> ** log
> 
>              Testent:
> 
>                  [nant] C:\DotNet\Test success.build
> 
>                         Buildfile: file:///C:/DotNet/Test 
> success.build
>                         Target(s) specified: Test success build
> 
>                         Test success build:
> 
> 
>                         Compile:
> 
> 
>                         Compile-release:
> 
>                              [echo] Compile in release mode
> 
>                         Build-A:
> 
>                              [echo] Build project A
> 
>                         Onsuccess:
> 
> 
>                         Zip:
> 
>                              [echo] Zip all Dlls
> 
>                         Deploy:
> 
>                              [echo] Deploy files to remote folder
>                              [echo] Complete A
> 
>                         Onsuccess:
> 
> 
>                         Zip:
> 
>                              [echo] Zip all Dlls
> 
>                         Deploy:
> 
>                              [echo] Deploy files to remote folder
>                              [echo] Complete A
> 
> Regards,
> Brian Yeo
> 
> _________________________________________________________________
> Play Love Hunt to win a $9000 holiday and find love!  
> http://mobilecentral.ninemsn.com.au/mclovehunt/lovehunt.aspx
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by BEA Weblogic Workshop FREE 
> Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
> http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
> _______________________________________________
> Nant-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-users
> 
> 
> 

Disclaimer Message:

This message contains confidential information and is intended only for the 
individual(s) named.  If you are not the named addressee you should not disseminate, 
distribute or copy this e-mail. Please immediately delete it and all copies of it from 
your system, destroy any hard copies of it, and notify the sender. E-mail transmission 
cannot be guaranteed to be secure or error-free as information could be intercepted, 
corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. To the 
maximum extent permitted by law, Immersive Technologies Pty. Ltd. does not accept 
liability for any errors or omissions in the contents of this message which arise as a 
result of e-mail transmission.


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idG21&alloc_id040&op=click
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to