|
|
|
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?fid=59&gotonew=1&tid=2145007]: |
0ms |
get settings: |
20ms |
get forum list: |
32ms |
check forum access: |
8ms |
check topic access: |
8ms |
track hit: |
75ms |
get topic data: |
26ms |
get first new msg: |
16ms |
get forum data: |
7ms |
get page messages: |
88ms |
get tp. blocked users: |
3ms |
| others: | 345ms |
| total: | 628ms |

| 0 / 0 |
