ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kev Jackson <kevin.jack...@it.fts-vn.com>
Subject Quick question about properties
Date Thu, 13 Oct 2005 03:45:09 GMT
Hi all,

I'm trying to refactor a build file we have here into a commonly used 
set of targets and then project specifc targets.  Here's my directory setup

./common/build.xml
./common/build.properties
./build.xml (shown below)

Now in the common/build.xml I use the property file tag to read in 
build.properties, and running this file locally, (within common) works fine

However if I try to run the project buildfile (./build.xml), none of the 
properties are available (quick checks with echo just give me variables 
instead of expanded properties).  This doesn't seem right.  The targets 
from the common file are available, but the properties are not?

At first I thought it was because I was declaring a project specific 
properties file too that was causing a problem, but commenting it out 
did not resolce it (ie the project specifc properties were overwriting 
the common properties - reasonable behaviour *if the variables have the 
same name*)

So I'm currently resorting to this...

<?xml version="1.0" encoding="utf-8"?>
<project name="${project}" basedir=".">
    <property file="common/build.properties" /> <-- this line is already 
in common/build.xml
    <property file="local.properties" />

    <import file="common/build.xml" />

</project>

to get my project to work - I'm not sure if this is a bug or expected 
behaviour, certainly I've never come across this before

Any help much appreciated, and I understand if you guys have 0 time to 
answer

Kev



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message