ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: Empty properties
Date Thu, 19 Dec 2002 13:44:34 GMT
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:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message