You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Raf Colson <ra...@alcatel.be> on 2000/09/11 15:07:27 UTC

loading properties from file not working as expected

Hello,

I have two build files in different directories.
The first one loads properties from a file called build.properties
located in the same directory as the build.xml file. I've set the
project's basedir to "." :

<project name="utilities" default="compile" basedir=".">
  <target name="init">
    <property file="build.properties" />
  </target>

...

The second buildfile uses the ant task to call a target in the first
buildfile.
   <ant dir="absolutePathToFirstBuildFile" target="init" />

When I run Ant with the second buildfile, Ant doesn't find the
propertiesfile. When I move the propertiesfile to the directory where
the second buildfile is located, then it will be found. Is this the
normal behavior, or is this a bug?

greetings
Raf

Re: loading properties from file not working as expected

Posted by Don Schaefer <do...@xelus.com>.
I added a propery whose value is the basedir of the root .xml file for
child .xml files to use.  This may not be the best way but it works.

des.

Raf Colson wrote:

> Hello,
>
> I have two build files in different directories.
> The first one loads properties from a file called build.properties
> located in the same directory as the build.xml file. I've set the
> project's basedir to "." :
>
> <project name="utilities" default="compile" basedir=".">
>   <target name="init">
>     <property file="build.properties" />
>   </target>
>
> ...
>
> The second buildfile uses the ant task to call a target in the first
> buildfile.
>    <ant dir="absolutePathToFirstBuildFile" target="init" />
>
> When I run Ant with the second buildfile, Ant doesn't find the
> propertiesfile. When I move the propertiesfile to the directory where
> the second buildfile is located, then it will be found. Is this the
> normal behavior, or is this a bug?
>
> greetings
> Raf


Re: loading properties from file not working as expected

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "RC" == Raf Colson <ra...@alcatel.be> writes:

 RC> Is this the normal behavior, or is this a bug?

A bug. Supposed to be fixed in CVS (post Ant 1.1) since 2000-07-28.

Stefan