문제

In my ANT script - there is a input parameter 'global'.

If global=true then mkdir 'a' and create war at 'a' else if global=false then mkdir 'b' and create war at 'b'

Is there any way in ANT to achieve this?

도움이 되었습니까?

해결책

A few ways...

You can use the condition task:

<condition
     property="war.dir"
     value="a"
     else="b">
    <istrue arg1="${global}"/>
</condition>

You might be able to use the new if and unless in a <property/> task. I've had problems with these.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top