ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Castrianni <Shawn.Castria...@halliburton.com>
Subject RE: If else
Date Tue, 14 Oct 2008 21:28:59 GMT
If the jboss.wily.jvmargs property is not set, then ${jboss.wily.jvmargs} doesn't evaluate
to anything other than:

${jboss.wily.jvmargs}

which will always have a length greater than 0.

---
Shawn Castrianni

-----Original Message-----
From: Mohit Anchlia [mailto:mohitanchlia@gmail.com]
Sent: Tuesday, October 14, 2008 4:21 PM
To: Ant Users List
Subject: Re: If else

that works. thanks

But I don't understand what I was doing wrong.

On Tue, Oct 14, 2008 at 1:44 PM, Alec Fernandez <Alec.Fernandez@sas.com> wrote:
> try the <isset
> condition
>
>>> -----Original Message-----
>>> From: Mohit Anchlia [mailto:mohitanchlia@gmail.com]
>>> 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: user-unsubscribe@ant.apache.org
>>> For additional commands, e-mail: user-help@ant.apache.org
>>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message