| 1 | <project> |
| 2 | <target name="init"> |
| 3 | <taskdef resource="net/sf/antcontrib/antlib.xml"> |
| 4 | <classpath location="${antcontrib.jar}"/> |
| 5 | </taskdef> |
| 6 | </target> |
| 7 | |
| 8 | <target name="loop" depends="init"> |
| 9 | <for param="i" end="10"> |
| 10 | <sequential> |
| 11 | <echo>i is @{i}</echo> |
| 12 | </sequential> |
| 13 | </for> |
| 14 | </target> |
| 15 | |
| 16 | <target name="step" depends="init"> |
| 17 | <for param="i" end="0" begin="10" step="-2"> |
| 18 | <sequential> |
| 19 | <echo>i is @{i}</echo> |
| 20 | </sequential> |
| 21 | </for> |
| 22 | </target> |
| 23 | |
| 24 | </project> |