ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: Ant to manipulate URL's and not only files ?
Date Sun, 25 Nov 2001 11:20:46 GMT
On Sat, 24 Nov 2001 20:14, Jean-Marc Vanel wrote:
> Hello
>
> In XML Publication I use Ant as a top-level glue between several kinds of
> tools, mainly XSLT transforms. The people on this list might be interested
> in this non-standard use of Ant, relying on these tasks : - Apply
>  - Get
>  - Style
>  - Java
>  - Mkdir
>
> In XML Publication the build.xml files are designed so that data can be
> URL, not only files. Alas Ant is not yet enough Web-oriented, which is a
> paradox for a tool originating from the Apache project =;)
>
> For instance in <style> task the "basedir", "style" and "in" parameters
> could be HTTP URL's, because XSLT processors accept URL's. This implies
> that Ant is able to treat an HTTP directory like an ordinary directory,
> which implies : - get the content of an HTTP directory, whose HTML
> representation differs among HTTP servers, ( but at least Ant could
> understand Apache's directory output ) - apply the same time-stamp criteria
> for re-making targets as for plain files

Having urls allowed to be specified in the style taks was a recent request 
actually - just got around to implementing it ;)

> I looked at the source for the <style> task; for the simplest case, namely
> the "style" and "in" parameters, this impacts several classes. But I can do
> it. But the utilily to have URL's as input is very general in Ant. For
> instance the <java>, <copy> tasks could take URL's input. This could take
> the form of <fileset dir="http://foo.com/myDir/"> , or a new <urlset>
> element . I would prefer the first, because I would like to use an HTTP
> directory just like an ordinary directory. On the implementation point of
> view, the Java platform has URL objects wich can be file: or http: or
> others, why not use them in most places ?

URL objects are not even vaguely useful enough for our purposes. How do you 
list the contents of a http: directory (ie you cant), while ftp: urls allow 
it it is vastly different from listing a local directory.

To implement this sort of thing you require some sort of virtual filesystem 
abstraction where each different filesystem can have different capabilities. 
ie FTP filesystem can list directories, http can read single files, native 
filesystem can detect if files are readable, writeable and so forth.

It has been discussed before and approved I think but the work of 
implementing it has not yet started.

> The next stage for Ant would be to use FTP or WebDAV to manage also Ant
> outputs ... But this is another debate!

webdav would be kool.

Anyways I suggest you put a Request For Enhancement into Bugzilla and that 
way we can't forget about it in the future.

-- 
Cheers,

Pete

--------------------------------
 These aren't the droids you're 
 looking for. Move along. 
--------------------------------

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


Mime
View raw message