ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Importing and caching build files from a URL
Date Wed, 30 Nov 2005 05:26:46 GMT
On Tue, 29 Nov 2005, Peter Reilly <> wrote:

> The current file attribute of the import task is meant to act
> in the same way as href in html- - i.e relative to the
> directory that the importer file is in.
> THe import task could easily use urls in the same way - but
> some internals in ant assume that build files are Files and
> only Files.

Does this apply to imported files as well?  Or only to the main build
file loaded at first?

Right now we suggest to use the property ant.file.IMPORTED and use it
as if it was a file name.  I guess we'd need a new task like

<resolve property=""

which would resolve a relative path and set a property with the
absolute value.  This task could deal with files as well as arbitrary
URLs as values for ant.file.IMPORTED.  The result would be an URL,
even in the file case.

People who write build files and anticipate their file to be imported
via non-file URLs should use that and resource versions of tasks.
I.e. instead of

  <basedir property="imported.basedir" file="${ant.file.IMPORTED}"/>
  <property file="${imported.basedir}/"/>

you'd write

  <resolve property="" base="${ant.file.IMPORTED}"
    <url url="${}"/>

That way we'd require some thinking ahead of people writing build
files that get imported, but should be able to solve the relative path

Other "build files are files" problems are probably waiting to be


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

View raw message