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

Reply via email to