I have added task to build.xml to check certain condition for deployment e.g require os version and fail if requirements are not meet . e. g
<fail message="Required OS: '${deploy.require_os_version}' does not match with: '${remote_os}'"/>
Which is working but this outputs the whole error stack. Is there better way to send build failure signal and exit with decent error message ?
I had the same question. I think the only solution is to nest your tasks in an
if
/then
/else
to ensure the failure condition leads to an<echo>
and then make sure you have no tasks defined after theif
block.When you think about it, this is perhaps more programmatically correct than using a task to force an early exit under expected conditions.