ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <sten.rosend...@sungard.com>
Subject Importing properties
Date Thu, 28 Oct 2004 11:46:07 GMT
Hi,

It occurred to me that the way Ant reads property files in imported
build scripts is not very modular by default. As the manual explains, to
read a property file relative to the current script, you must do the
following:

<!-- imported.xml -->
<project name="imported" basedir="." default="...">
  <dirname property="imported.basedir" file="${ant.file.imported}"/>
  <property file="${imported.basedir}/imported.properties"/>
</project>

But on the other hand, the import task itself uses import paths relative
to the current build file. I would like to be able to do the same with
property files in imported build files, either like this:

  <import propertyfile="imported.properties"/>

Or somewhat more clumsy like this:

  <property file="imported.properties" scriptrelativepath="true"/>

Regards,
Sten Rosendahl (sten.rosendahl@sungard.com)
Front Capital Systems
Sungard Trading Systems

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


Mime
View raw message