ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: File URLs for different plaforms
Date Mon, 24 Apr 2006 09:50:14 GMT
Tim Gordon wrote:
> Hi
> 
> Not a pure ANT question, but it's relevant to building configurations for
> remote systems, possibly of another OS...
> 
>  Is there a simple way to generate file URLs that are guaranteed to work on
> another platform?
> 
> For example, something like:
> 
> config.url=file://${file.system.path}

There will be in ant1.7, with the <makeurl> task. If you want it early, 
you can grab the Ant tasks from smartfrog.org and get its predecessor, 
<sf-tourl> in the ant tasks package. both tasks take in a File and set a 
property to the right path.

Otherwise, a bit of <script>; File.toURL().toString() being the code you 
want.


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


Mime
View raw message