ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Rettig <mike.ret...@gmail.com>
Subject Re: Importing and caching build files from a URL
Date Tue, 29 Nov 2005 19:18:43 GMT
On 11/29/05, Dominique Devienne <ddevienne@gmail.com> wrote:

>
> D:\org_apache>java MakeUrl http://foo/common.xml misc.xml
> http://foo/misc.xml
>
>
Yes, this works as long as the first file you reference is at the root
level. This can be confusing in scripts since the root is dictated by that
first import and not made explicit. Sometimes I want to import a build file
from a subdirectory first, not from the root level.  Without an explict
root, it is difficult to establish a consistent namespace. It should work in
a similar manner to classloading.

I guess we get back to resolving relative paths. The existing behavior
forces every build file to be its own "root". A single root cannot be
declared. Each import becomes the new root. However, the current root is
assumed to be a file path which doesn't play nice with other URL's.

One solution is to refactor the current import to work with URL's. Or the
current import could be deprecated in favor of a new url friendly import
that also resolves URL's relative to a root rather than each build file.

//the basedir is the implied root
<urlimport file="build/mybuild.xml"/>
<urlimport root="http://localhost/buildfiles" file="build/mybuild.xml"/>

I vote for deprecating the current import task in favor of a new version
that works consistently with URL's. This allows for backwards compatibility,
and creates consistency with html and xsl files. Also, this simplifies the
implementation.

Mike

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message