ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kai Bartels <k...@picturesafe.de>
Subject criticism: property handling (here: no overwrite)
Date Tue, 12 Jun 2001 08:33:33 GMT
Hi *!

I'm just having some trouble with the rule that properties cannot be changed
after they are once set. I've to admit I'm missing the history of this rule,
but it seems like a basic drawback to me:

We are using a build file in a team here, so we include per-user property
files, two of them. One is the users global ~/.ant.properties and the other
a project sprecific .ant.properties for the user (which defines where to
distribute the application in the users test environment, among other things).

Now you could think of two situations regarding the properties in these
files and theit uses: (a) I'd like to overwrite a property in the project
specific file that has a different value in the user-global file (e.g. I want
to use some other JDK on this project); (b) I'd like to _use_ a global
property in the project specific file to construct another property (maybe I
want to distribute to a subdir of ~/tests, which I call my "dist-base" there).
To accomplish (a) we include the project specific file first, the user-global
file second. This seems to be the only way to make the project specific
settings overrule the global ones. But I cannot use global properties in
the project specific file file in this situation.

This said, it seems to me I have to decide whether I want to use case (a) or
case (b); I cannot have both. I'd blame this dilemma on the rule that
properties cannot be overruled at a later time.

Are there plans to weaken this rule in the next release of Ant? Maybe by
inventing a 'overrule="true"' for the property task. Or maybe by allowing
lazy evaluation (lazy="true") for properties.

Well, just my e.02 on a maybe well worn topic. :^)

regards, Kai
-- 
"(and) this is not the time to die!"             <Fury in the Slaughterhouse>
KBartels@picturesafe.de                  +                 www.picturesafe.de
picturesafe GmbH, Lueerstr. 3, D-30175 Hannover          fon:+49 511 85620 56
++ PGP Key fingerprint =  D2 B9 58 DC 36 52 DB 6C  18 CC 43 9F 68 E0 21 97 ++

Mime
View raw message