ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Reeves, Paul C" <pcre...@sandia.gov>
Subject RE: Property is set, but to what?
Date Wed, 21 Jul 2004 14:58:38 GMT
      <equals arg1="${prop1}" arg2=""/>

did the trick.

Thanks folks, that was quick (and silly of me!)

Paul

-----Original Message-----
From: Reeves, Paul C [mailto:pcreeve@sandia.gov]
Sent: Wednesday, July 21, 2004 8:47 AM
To: 'user@ant.apache.org'
Subject: Property is set, but to what?


Folks,

Does anyone know what happens when a property is set via a property file,
but there is nothing on the right-hand side of the equals sign?

Ex:
prop1	=	
prop2	=	value2


When I load these properties then

<isset property="prop1">

returns "true"

If I echo the value held by the property:

<echo message="prop1 = (${prop1})"/>

I get:

prop1 = ()		(i.e., nothing shows up between parentheses)

I need to be able to test for this condition via ant contrib's <if> task,
but I cannot figure out what to compare to:

<if>
  <equals arg1="${prop1}" arg2="???"
.
.
.

I've tried 

      <equals arg1="${prop1}" arg2="&#x0a;"/>
      <equals arg1="${prop1}" arg2="&#13;"/>
      <equals arg1="${prop1}" arg2="&#9;"/>
      <equals arg1="${prop1}" arg2="&#32;"/>
      <equals arg1="${prop1}" arg2="false"/>

which I believe are:

    Line Feed
    Carriage Return
    Tab
    Space
    false

respectively, but none of these  seem to work.

Any idea what the prop1 actually holds?

Paul

P.S.  New Mexico State Motto:  "Carpe Manana"



---------------------------------------------------------------------
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