ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Importing properties
Date Thu, 28 Oct 2004 11:46:07 GMT

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

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

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=""/>

Or somewhat more clumsy like this:

  <property file="" scriptrelativepath="true"/>

Sten Rosendahl (
Front Capital Systems
Sungard Trading Systems

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

View raw message