ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <ddevie...@gmail.com>
Subject Re: Resource.getURL()
Date Thu, 21 Sep 2006 14:06:23 GMT
> > Concerning custom URLProtocolHandler (s), I am not clear how this works ?
> first you provide something that lets you open connections [...]

FTR, I'm not to fond of this idea of playing with custom URL protocols
and/or handlers, at least as far as I correctly understood what it
means.

I used to use one before <import> came along, using a resource:
protocol to locate XML entity includes more flexibly, and it worked
fine, except for the fact that it needed JVM args required during JVM
startup. Installing the custom URL handler once the VM is already
started is more involved, and if I remember correctly, involves having
one's own factory for URL handlers, which is bound to conflict with
Ant "containers" who also want to install their own.

I think when Resources where first introduced to Ant we briefly
discussed why we needed them instead of using straight URLs, which is
a well documented and extensible mechanism to access content, but an
argument against using URLs was that extending URL protocols is not
easy.

I'm fine with adding getURL to Resources, if it's an optional
operation (returning null is not supported or throwing UOE but only is
another supportsURL() boolean method is available), but I can't see
the need for custom URL protocols. I'm open to arguments showing me
where I'm wrong though, of course. --DD

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


Mime
View raw message