ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: How can I have Ant replace unset properties as just empty string
Date Thu, 28 Mar 2002 19:50:55 GMT
--- Matt Small <> wrote:
> Is there any special syntax for having ant replace an empty string when
> a property referred in a build file has not been set? Currently if you
> put ${prop} into a build file (in a target param suppose) and it has not
> been set it actually passes '${prop}' as the attribute value. I need it
> to just put ''.
> In velocity for example there is a syntax $!prop that will do this, is
> there any similar thing in Ant.

Use Ant's property immutability to set any property that's not already set
to some other value. IOW, set the property to whatever default value you
want, and if it hasn't been set by some other means by the time it hits
your default-setting <property> tag, it'll get your default value.



Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®

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

View raw message