ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koegel, Michael" <Michael.Koe...@partner.commerzbank.com>
Subject AW: Problem with default values
Date Tue, 06 Aug 2002 14:22:03 GMT
Hey,

just load the property-files in the precedence they should have.
<property resource="my.properties"/>
<property resource="default.properties"/>

If a property is specified in my.properties it will not be overriden by
default.properties as properties are immutable.
That way you're even able to only specify the properties in my.properties
that you want to override.
Should also be true for ${my.properties} if you specify my.properties as a
commandline argument or in $ANT_OPTS.

--MK

-----Urspr√ľngliche Nachricht-----
Von: Christian Holmqvist, IT, Posten
[mailto:christian.holmqvist@posten.se]
Gesendet am: Dienstag, 6. August 2002 15:58
An: 'Ant Users List'
Betreff: Problem with default values

Hi

I have a small problem...

I want to be able to change some values in a property file and use the name
of the file as input parameter to the ant script. But when no input
parameter is submitted I want default values to be used, also they in a
property file.

I been trying to do something like this:
  <property name="EllaRootBaseDir" value="${basedir}/.."/>
  <property name="my_prop_file"
value="${EllaRootBaseDir}/default.properties"/>
  <property file="${EllaRootBaseDir}/${my_prop_file}"/>

But this don't work since the last property task gets totally strange
values.... (something liked d:\something\d:something\ )

Can someone help me?

/Christian Holmqvist

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message