<?xml version="1.0"?>
<project name="Fail Message Test" default="fail">

	<property name="not-robust" value="true" />

	<property name="nant.onfailure" value="handle-failure" />
	
	<target name="fail">
		<available resource="missing.resource.txt" type="File" property="exists" />
		<ifnot propertytrue="exists">
			<fail message="===> This message should announce the forced failure." />
		</ifnot>
	</target>

	<target name="handle-failure">
		<call target="cleanup" failonerror="${not-robust}" />
		<echo mesage="Failure happened, and this is the message to appear at the end." />
	</target>
	
	<target name="cleanup">
		<echo mesage="This task should fail." />
		<delete dir="${build.dir}" />
	</target>
</project>