|
|
|
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&fpage=620&tid=2145007]: |
0ms |
get settings: |
19ms |
get forum list: |
29ms |
check forum access: |
8ms |
check topic access: |
8ms |
track hit: |
57ms |
get topic data: |
19ms |
get forum data: |
5ms |
get page messages: |
82ms |
get tp. blocked users: |
3ms |
| others: | 359ms |
| total: | 589ms |

| 0 / 0 |
