You've been bitten by one of the most annoying issues with URL specifications
(and a big annoyance in java).  "file://" is only technically correct if you
are explicitly specifying the hostname.  Otherwise it should be "file:///",
but under unix, "/" is treated as part of the path URL.

So file://localhost/etc/passwd and file:///etc/passwd are the same thing,
but file:////etc/passwd fails on some OSes.

Under windows, file://localhost/C:/windows/notepad.exe and
file:///C:/windows/notepad.exe are the same thing.  (Technically the
original spec said the ":" should be a "|", but both work)  And as you've
noticed file://C:/windows/notepad.exe fails.  Also notice which slashes are
utilized.

So.... you can't just stick "file://" _OR_ "file:///" before the file urls,
as it'll work for one operating system but not the other.

Since you have Java under the covers, you should be able to simply do the
recommended new File("path").toURI().toURL(), but be aware that "\"
characters need to be "\\" so they get resolved properly under windows, or
make sure they are specified as "/" in the property.

NOTE: This will create "file:/C:/windows/notepad.exe" (yeah, just the one
"/" without the other two -- which isn't technically correct, but is
necessary for use by some tools), which should work fine but I have not
tested it against the resolver to ensure it is happy.

-Spencer

-- 
View this message in context: 
http://old.nabble.com/locale-maven-repository-problem-tp27271359p27307981.html
Sent from the gradle-user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to