ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: [PATCH] Copy task recognizes URLs as file attributes
Date Wed, 28 Nov 2001 11:41:19 GMT
On Wed, 28 Nov 2001 22:34, Jose Alberto Fernandez wrote:
> From: "Peter Donald" <peter@apache.org>
>
> > On Wed, 28 Nov 2001 10:15, Steve Loughran wrote:
> > > oh, one more thing I remembered, but committing the http tasks into the
> > > sandbox has just reminded me: the java.net implementation of http is
> > > woefully inadequate and blissfully different from version to version.
>
> ....
>
> > Yep. Using native URL objects is for all intents and purposese out of the
> > picture because it is a really really really really really really brittle
> > system. Oh - did I mention it sucks ? ;)
>
> Let me just mention that using URL objects, does not mean we need to use
> the connection infrastructure provided in the JDK. We could use our own for
> that, either by installing our own factories 

-1

That would quite effectively kill the idea of allowin ant to be embedded in 
other applications.

> or by using URL as a just a static descriptor and having our own code read 
>from there.

You would think that would be possible ... unfortunately it is not. You need 
to have protocol handlers for any protocol you use or else URL objects can't 
be created ;(

We went through several weeks of pain dealing with URLs and I am told that 
quite a few other projects have come against the same wall (stylebook/cocoon, 
jserv, a few others) ... anyways the whole URL infrastructure is largely 
broken out very very controlled environments.

> Doesn't HTTPClient already provides a factory that can be use to replace
> the one used by URL?

probably.

> To me the whole point URL is that it provide the url parsing from a string
> all just done. So we can do:
>
>     void setUrl(URL url) {
>         ....
>     }
>
> and introspection will do all the work for us. Whether we use
> url.openStream() or we pass this object to our own code, it is up to us.

I would still prefer to create ow\ur own object so we have full control of 
it's behaviour.

-- 
Cheers,

Pete

--------------------------------------------------
 Where ignorance is bliss, 'tis folly to be wise.
--------------------------------------------------

--
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