|
|
|
Ant flow control
|
|||
|---|---|---|---|
|
#18+
Начал разбираться с антом. Вопрос вот в чем: в таргете xxx есть таск: Код: plaintext авторThere are three possible routes that the program could take, designated by the actions A, B and C. This can be expressed in Ant as: <?xml version="1.0"?> <project name="Flow.Of.Control" default="nested-if" basedir="."> <target name="nested-if"> <condition property="condition"> <available file="fileone"/> </condition> <antcall target="then"/> <antcall target="else"/> </target> <target name="then" if="condition"> <echo>THEN BODY EXECUTED</echo> <condition property="inner-condition"> <available file="filetwo"/> </condition> <antcall target="inner.then"/> <antcall target="inner.else"/> </target> <target name="inner.then" if="inner-condition"> <echo>INNER THEN BODY EXECUTED</echo> </target> <target name="inner.else" unless="inner-condition"> <echo>INNER ELSE BODY EXECUTED</echo> </target> <target name="else" unless="condition"> <echo>ELSE BODY EXECUTED</echo> </target> </project> Но это же изврат. Подкажите как сделать проще ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 02.08.2007, 13:43:32 |
|
||
|
|

start [/forum/topic.php?desktop=1&fid=59&tid=2145007]: |
0ms |
get settings: |
14ms |
get forum list: |
15ms |
check forum access: |
5ms |
check topic access: |
5ms |
track hit: |
59ms |
get topic data: |
20ms |
get forum data: |
4ms |
get page messages: |
54ms |
get tp. blocked users: |
2ms |
| others: | 299ms |
| total: | 477ms |

| 0 / 0 |
