tags:

views:

77

answers:

2

Some Ant targets require an URL to be defined as property (like the ivy pattern) and since the file:// protocol is different on Windows (either file:/ or file:///) and Unix (file://) it makes the entire script less portable.

Is there a nice way to handle the file protocol without messing around with properties and Ant conditions?

A: 

Using file:/// should work on both systems. But perhaps the PathConvert task can help you out here?

Curt Sampson
A: 

I finally decided to use the Condition task of Ant:

<condition property="file.protocol" value="file:///" else="file://">
    <os family="dos"/>
</condition>
Vladimir