You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ryan Houlgate <rh...@mahinetworks.com> on 2000/12/04 19:00:17 UTC

Overriding property values in Ant

Hi,
I'm trying to create a hierarchical build structure. I'd like to be able to
call build files (build.xml) in subdirectories from any level. I'm using
local and global property files to set variables to appropriate values for
the [sub]directories that they're in. The problem I'm running into is that
once a variable is set in the upper directory and it calls the build file in
the subdirectory the build file in the subdirectory cannot use the same
variable. I get errors that look like:
[property] Override ignored for propertyFoo

Is there any way to get ant to understand that the values are only in the
context of the current build file?
Thank You,
-Ryan Houlgate
rhoulgate@mahinetworks.com

Re: Overriding property values in Ant

Posted by Stefan Bodewig <bo...@apache.org>.
Ryan Houlgate <rh...@mahinetworks.com> wrote:

> Is there any way to get ant to understand that the values are only
> in the context of the current build file?

Depending on your needs, it's a bug or a feature of Ant 1.x that
properties cannot be overridden by <property> - for you it is a
bug. Ant 2 - which is still in the specification stage - will change
that.

See <http://marc.theaimsgroup.com/?l=ant-user&m=97566041223194&w=2>
for a way to change the value of a property (without using <property>)
in Ant right now.

Stefan