ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Murray" <>
Subject Please clarify a point about properties
Date Tue, 02 Apr 2002 15:53:58 GMT
I'm trying to set up a precedence for setting properties as follows:
In searching the archives for some information about setting properties
I saw the following statement which didn't seem accurate to me:

>> I would like to define default properties in a
>> property file and then "override" them from the
>> environment. I have found two mechanisms for
>> accomplishing this. The first is to use the
>> <condition> clause, the second is to use "if"
>> and "unless" attributes on targets that do <property>
>> tasks.
> <property environment="env"/>
> <property name="my.desired.prop" value="${env.WHATEVER}"/>
> <property file=""/>
> then define my.desired.prop in  It will be
> (which is a weird term, when its actually being set first instead of
> overwritten).

Now I'm fuzzy on the whole property thing, but it seems like
  <property name="my.desired.prop" value="${env.WHATEVER}"/>
Would set "my.desired.prop" to the STRING "${env.WHATEVER}" if WHATEVER
was not a defined environment variable.  Therefore, any attempt to set
"my.desired.prop" in the "" file would fail because
"my.desired.prop" would already be set.  

Am I off base?

Brian Murray
Vanderbilt University

Brian Murray
Vanderbilt University

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

View raw message