ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlton Brown <>
Subject Custom task to force build success
Date Wed, 18 May 2011 15:07:24 GMT
I'm struggling to write a custom task that is essentially the opposite of
"fail".   I've seen it mentioned on this list before, but never found a
conclusive answer.

To be successful, a task expressed like this:
<my:win message="You win!" if="${winning}" unless="${failing}">
  <!-- ideally, a nested condition would be permitted here, if it's easy to
implement -->

The task would halt the build, and I would see the following output:
You win!
Total time: 2 seconds

and the exit code would be zero.

The closest I got was to print the exit message and set the exit status to
zero, but I still get this frustrating "BUILD FAILED" message, which is
incompatible with the aesthetic of winning.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message