Created
March 27, 2012 22:36
-
-
Save palfrey/2221058 to your computer and use it in GitHub Desktop.
taskdef example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <taskdef name="echoFail" > | |
| <stringparams> | |
| <stringparam name="task" /> | |
| <stringparam name="message" required="false" /> | |
| </stringparams> | |
| <do> | |
| <property name="customMessage" value="__message__" /> | |
| <if test="${customMessage == ''}" > | |
| <property name="customMessage" value="this is a default message" /> | |
| </if> | |
| <__task__ message="${customMessage}" /> | |
| </do> | |
| </taskdef> | |
| ... | |
| <!-- echos the default message --> | |
| <echoFail task="echo" /> | |
| ... | |
| <echoFail task="fail" message="this will fail the build" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment