ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Hatton" <>
Subject RE: Property is set, but to what?
Date Wed, 21 Jul 2004 14:54:49 GMT
It's probably an empty string.

I haven't tried but you might have some luck with
      <equals arg1="${prop1}" arg2=""/>

Hope this helps

-----Original Message-----
From: Reeves, Paul C []
Sent: 21 July 2004 15:47
To: ''
Subject: Property is set, but to what?


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?

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:

  <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

respectively, but none of these  seem to work.

Any idea what the prop1 actually holds?


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

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message