ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <>
Subject Re: Making URIs from locations
Date Tue, 08 Apr 2003 10:20:04 GMT

Stefan Bodewig wrote, On 08/04/2003 10.33:
> [was Re: Using files in classpath in task file="", changed subject to
> attract more comments]
> On Mon, 7 Apr 2003, Jose Alberto Fernandez <>
> wrote:
> ... about a new attribute to <property> that would set the property to
> the URI of a file that get's resolved relative to basedir.

Similar to "location" but with URI.

>>Pick the name you think it is more appropriate.
>>Some thoughts:
>>	<property name="x" uriOfFile="${fileName}"/>
>>	<property name="x" valueAsUri="${fileName}"/>
>>	<property name="x" locationAsUri="${fileName}"/>
>>	<property name="x" uriForLocation="${fileName}"/>

Wierd names...

>>Alternatively, we could have something more general that you can
>>pass a URI and knows how to use it, but alternatively if the value
>>if that of a file, then it construct a URI for it.
>>	<property name="x" uri="${fileName}"/>

Seems fine.

>>As long as we get the expected behavior I do not mind.
> What do others think of this?  Maybe we shouldn't add yet another
> attribute but a complete new task?
> <seturi property="x" location="build.xml"/>
> <seturi property="x"
>         resources="org/apache/tools/ant/taskdefs/"/>
> <seturi property="x" url=""/>

I'd add a uri attribute, and make that the only way of dealing with the 
above. It's more flexible and makes it easier to upgrade later to a VFS.

Nicola Ken Barozzi         
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)

View raw message