Try instead:
<condition property="vss.label" value="${label}">
<isset property="label"/>
</condition>
<property name="vss.label" value=""/>
<echo message="label=${label}"/>
<echo message="vss.label=${vss.label}"/>
--DD
-----Original Message-----
From: Tracy McAbee [mailto:tracy.mcabee@;visionarysystemsinc.com]
Sent: Thursday, October 31, 2002 10:34 AM
To: [EMAIL PROTECTED]
Subject: set property problem
I'm relatively new to Ant and am having a problem. I'd like to set a
property to the value of a command line parameter if the parameter is passed
in, or set it to "" otherwise. Here's what I tried (but it didn't work):
��� <property name="vss.label" value=""/>
���
��� <condition property="vss.label" value="${label}">
����� <isset property="label"/>
��� </condition>
���
��� <echo message="label=${label}"/>
��� <echo message="vss.label=${vss.label}"/>
When I run it in debug, it says it won't override the previous value.� Is
there a way to make it override the value, or am I approaching this in the
wrong way?� Thank you in advance for any advice you might have.
�
BTW, to paint the entire picture, I'm trying to use the vssget task (from
Microsoft Visual SourceSafe Tasks) and want it to get the latest version of
the�files unless I specify a label on the command line.� It seems to work if
I use "" as the label when I don't specify a label on the command line.
�
-Tracy McAbee
--
To unsubscribe, e-mail: <mailto:ant-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@;jakarta.apache.org>