Set the nant.onfailure property in the beginning of your run target:
<property name="nant.onfailure" value="TargetG" />
BOb
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of JulianH
Sent: Wednesday, March 19, 2008 8:55 AM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Question: Run certain target after another target
fails
Hello,
We use NAnt in our project and I try to call a certain target if another
target fails.
So, lets say, we have the following - simplified - build script:
<?xml version="1.0"?>
<project name="TestProject" default="run">
<description>Nant Script</description>
<target name="run" description="does exactly that">
<call target="a"/>
<call target="b"/>
<call target="c"/>
<call target="d"/>
<call target="e" />
<call target="f"/>
</target>
<!-definitions of targets a -f -->
</project>
I want to run a certain target g, when the target named "run" fails. How
can I do this?
Regards,
JulianH
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users