You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ja...@rzf.fin-nrw.de on 2002/12/19 14:44:34 UTC

AW: Empty properties

I usually set the properties with a default value directly for using them.

<project>
    ...
    <target>
        ...
        <property name="myprop" value="default" />
        <echo>${myprop}</echo>


Because property can be only set once the default is only used if the
property isn´t set before.
And I can be sure, that im my task (<echo>) the property has a valid value.
If an empty value is valid write
        <property name="myprop" value="" />

Hope that helps.


Jan Matèrne


-----Ursprüngliche Nachricht-----
Von: Kyrre Lugg [mailto:kyrre.lugg@tomra.no]
Gesendet am: Donnerstag, 19. Dezember 2002 16:30
An: ant-user@jakarta.apache.org
Betreff: Empty properties

Is it possible to make ant not to use the property name of unset 
properties, so that

<echo>${myunsetproperty}</echo>

does not print

[echo]${myunsetproperty}

We'd prefer it to be empty instead...

Kyrre Lugg


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>