try the <isset
condition

>> -----Original Message-----
>> From: Mohit Anchlia [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, October 14, 2008 10:33 PM
>> To: Ant Users List
>> Subject: If else
>>
>> I am struggling with a very simple question. How do I test if a
>> variable is defined or not?
>>
>> I tried:
>>
>>
>>         <if>
>>           <matches string="${jboss.wily.jvmargs}" pattern="^[ \t]+" />
>>
>> and
>>
>>
>>         <if>
>>           <matches string="${jboss.wily.jvmargs}" pattern="" />
>>
>> and
>>
>>
>>         <if>
>>           <length string="${jboss.wily.jvmargs}" trim="true"
>> when="greater" length="0" />
>>
>>
>>
>> Nothing seem to work. jboss.wily.jvmargs may or may not be there in
>> property file
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to