Stefan Bodewig wrote:

>>   org.apache.tools.vfs.File extends java.io.File
> 
> But this version cannot be the argument for the (existing) setters.
> For this to work, IntrospectionHelper will need to take special care
> (i.e. if setXYZ(java.io.File) is found, actually pass it an instance
> of org.apache.tools.vfs.File).  This is possible, but ...

It is a bit hacky, you're right. A cleaner solution would be to add
setXYX( java.net.URL ) for tasks that can deal with URLs, and 
make this works ( i.e. IntrospectionHelper can deal with it ).
Not sure if IH can deal with overloaded methods - and how it can
distinguish if a String should be converted to File or URL.

> * Is this generally desirable?
> 
> <mkdir dir="http://www.apache.org/"/>

I think this would be better handled by some webDAV antlib.

I agree, blindly turning file to URL is not the best solution. 


> protocol foo properly.  I find it hard to imagine that we'll be able
> to convert all tasks that could reasonably be expected to deal with
> URIs in one go.

However we can do it incrementally. Adding an setXYZUrl(URL) attribute
should work - without the overloaded method problems.

Well - it can be just setXYZUrl( String ). All we need is to add the
attributes to the tasks where it is needed. 

Should we add it to <copy> ? I don't know :-) But XSLT is a good candidate.

Costin

Reply via email to