Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top