I'm trying to set up a precedence for setting properties as follows:
command-line-->environment-->file.
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="default.properties"/>
>
> then define my.desired.prop in default.properties. It will be
"overridden"
> (which is a weird term, when its actually being set first instead of
being
> 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 "default.properties" 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: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>