ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Holdener <>
Subject Re: <ant> task does not run the build.xml with new basedir correctly
Date Wed, 06 Feb 2002 22:27:21 GMT
Lev Zak wrote:

> When I run "ant" under d:\dir_1 , I receive the following:
> init:
>      [echo]
>                 basedir    = D:\dir_1
>                 configDir  = D:\dir_1/config
> When I run "ant release" under d:\dir_1 , I receive the following:
> release:
> init:
>      [echo]
>                 basedir    = D:\dir_2
>                 configDir  = D:\dir_1/config

Try running "ant -verbose release" and I think you'll see what's 
happening.  Once a property is declared, subsequent declarations are 
ignored.  So "configDir" is set in D:\dir_1\build.xml and isn't 
redefined.  The "basedir", I believe, is a special case because *every* 
buildfile has a "basedir" (whether or not it is explicitly defined).

Anyway, the simplest fix is probably to move your "configDir" definition 
into the "init" target.  You're already bypassing the init target when 
calling release (because there's no "depends='init'" attribute for 

Try that and see if it works.  I'm still pretty new to Ant, so I could 
be wrong.


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

View raw message