Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ANT if/else condition

 
Anjali S Sharma
Ranch Hand
Posts: 279
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In an ANT target, I need to specify a condition. If "websso" property is true then do "X" else do "Y".


In the properties file, I have



In ANT script I have



But the result, I always get as "FALSE".


Since in properties file, true is specified, result should also be true.
Can someone please let me know how to correct this?

Thank you
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's a hint: A property called "websso" is never checked by the Ant script.
 
Anjali S Sharma
Ranch Hand
Posts: 279
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for replying.

I did this as well

<target name="websso.is.true" if="${websso}">

but still same result

Thank you
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you verified that the properties file is correctly included by outputting the value of "websso"?
 
Anjali S Sharma
Ranch Hand
Posts: 279
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot.

That was precisely the problem
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic