---- Begin Nant File Paste --- <property name="nant.onsuccess"
value="Success" /> <property name="nant.onfailure"
value="Failure" /> …. <target name="Failure"
depends="Stop">
<echo message="Entering Fail Clause" /> <delete>
<fileset>
<includes name="results/success/${Build.DateTime}.txt"
/>
</fileset>
</delete>
<mail from="[EMAIL PROTECTED]"
tolist="[EMAIL PROTECTED]"
subject="Build Succeeded"
mailhost="some
server "
message="The Build Occuring
on ${build.DateTime} Succeeded">
<attachments>
<includes name="${Build.Failure.Log}"
/>
</attachments>
</mail>
</target>
<target name="Success" depends="Stop">
<echo message="Entering the Good Clause" /> <delete>
<fileset>
<includes name="results/failure/${Build.DateTime}.txt"
/>
</fileset>
</delete>
<mail from="[EMAIL PROTECTED] sever "
tolist="[EMAIL PROTECTED]
server"
subject="Build Succeeded"
mailhost="some
server"
message="The Build Occuring
on ${build.DateTime} Succeeded">
<attachments>
<includes name="${Build.Success.Log}"
/>
</attachments>
</mail>
</target> ---- End NAnt Script Post – OK Basic problem, no matter how many times I make changes to
this script it will not call the Success or Failure Targets. The execution follows this order: Default
= ‘report” Depends : test Depends : build Depends : getLatest So we start by getting our code from our Source Control
System, then we build this code before we using the integrated support for NUnit to perform the Unit Tests. Next we use NUnit2Report to generate an
HTML report on the data. At this
point we want to send an email to the development team regardless of whether an
error occurs or not, and we want to tell them whether or not in the body of the
email. For some reason NAnt will not call the target specified by the OnSuccess property (or onFailure)
thus the emails are not being sent.
Please help if I am missing something. Regards, Jason Farrell DTA Enterprises |
- [Nant-users] Problem with OnSuccess/OnFailure Automated Ta... Jason Farrell
- Re: [Nant-users] Problem with OnSuccess/OnFailure Aut... Merrill Cornish