Question : ANT if condition

In an ANT target, I need to specify a condition. If "websso" property is true then copy file "a.txt" else copy file "b.txt".

I checked here
http://ant.apache.org/manual/CoreTasks/condition.html

but could not find if/else condition


   
            
              
            
        
   


The properties file will have the following condition

websso=true


Please let me know how to specify if/else condition?

thank you

Answer : ANT if condition

Here's what happens when i call it:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
goose@seegobin:/tmp$ ant -Dwebsso=true -f c.xml 
Buildfile: c.xml
 
check.websso:
 
websso.is.true:
     [echo] websso == TRUE
 
websso.is.false:
 
BUILD SUCCESSFUL
Total time: 1 second
goose@seegobin:/tmp$ ant -Dwebsso=false -f c.xml 
Buildfile: c.xml
 
check.websso:
 
websso.is.true:
 
websso.is.false:
     [echo] websso == FALSE
 
BUILD SUCCESSFUL
Total time: 0 seconds
goose@seegobin:/tmp$ 
Random Solutions  
 
programming4us programming4us