Skip to content

Instantly share code, notes, and snippets.

@palfrey
Created March 27, 2012 22:36
Show Gist options
  • Select an option

  • Save palfrey/2221058 to your computer and use it in GitHub Desktop.

Select an option

Save palfrey/2221058 to your computer and use it in GitHub Desktop.
taskdef example
<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