Commit f9010c18 authored by Dave Syer's avatar Dave Syer

Fix install command on Windows

Windows absolute paths cannot be processed by the CLI compiler, so the install
command wasn't working on Windows. This change converts ths path to a URI first
and then it works as a Spring Resource.
parent 72115719
...@@ -140,6 +140,7 @@ public class InstallCommand extends OptionParsingCommand { ...@@ -140,6 +140,7 @@ public class InstallCommand extends OptionParsingCommand {
for (URL url : urlsToProcess) { for (URL url : urlsToProcess) {
File file = toFile(url); File file = toFile(url);
Log.info("Processing: " + file);
if (file.getName().endsWith(".jar")) { if (file.getName().endsWith(".jar")) {
processor.processFile(file); processor.processFile(file);
} }
...@@ -181,7 +182,8 @@ public class InstallCommand extends OptionParsingCommand { ...@@ -181,7 +182,8 @@ public class InstallCommand extends OptionParsingCommand {
finally { finally {
stream.close(); stream.close();
} }
return file.getAbsolutePath(); // Windows paths get tricky unless you work with URI
return file.getAbsoluteFile().toURI().toString();
} }
private static File getDefaultLibDirectory() { private static File getDefaultLibDirectory() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment