| 1 | <project name="relentless unit tests" default="invalid"> |
| 2 | <target name="invalid"> |
| 3 | <fail>Don't call this file directly.</fail> |
| 4 | </target> |
| 5 | |
| 6 | <target name="setup"> |
| 7 | <taskdef resource="net/sf/antcontrib/antcontrib.properties"> |
| 8 | <classpath location="${antcontrib.jar}"/> |
| 9 | </taskdef> |
| 10 | </target> |
| 11 | |
| 12 | <target name="teardown"> |
| 13 | <delete dir="relentless"/> |
| 14 | </target> |
| 15 | |
| 16 | <target name="echo"> |
| 17 | <echo>Called with param: ${param}</echo> |
| 18 | </target> |
| 19 | |
| 20 | <target name="failTask" depends="setup" description="2 tasks should fail" > |
| 21 | <relentless> |
| 22 | <antcall target="echo" > |
| 23 | <param name="param" value="1" /> |
| 24 | </antcall> |
| 25 | <fail message="This task has failed." /> |
| 26 | <antcall target="echo" > |
| 27 | <param name="param" value="3" /> |
| 28 | </antcall> |
| 29 | <fail message="This task has failed as well." /> |
| 30 | </relentless> |
| 31 | </target> |
| 32 | |
| 33 | <target name="simpleTasks" depends="setup"> |
| 34 | <relentless> |
| 35 | <antcall target="echo" > |
| 36 | <param name="param" value="1" /> |
| 37 | </antcall> |
| 38 | <antcall target="echo" > |
| 39 | <param name="param" value="2" /> |
| 40 | </antcall> |
| 41 | <antcall target="echo" > |
| 42 | <param name="param" value="3" /> |
| 43 | </antcall> |
| 44 | <antcall target="echo" > |
| 45 | <param name="param" value="4" /> |
| 46 | </antcall> |
| 47 | </relentless> |
| 48 | </target> |
| 49 | |
| 50 | <target name="noTasks" depends="setup"> |
| 51 | <relentless> |
| 52 | </relentless> |
| 53 | </target> |
| 54 | |
| 55 | </project> |