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.
pull/1225/merge
Dave Syer 10 years ago
parent 7211571969
commit f9010c18cc

@ -140,6 +140,7 @@ public class InstallCommand extends OptionParsingCommand {
for (URL url : urlsToProcess) {
File file = toFile(url);
Log.info("Processing: " + file);
if (file.getName().endsWith(".jar")) {
processor.processFile(file);
}
@ -181,7 +182,8 @@ public class InstallCommand extends OptionParsingCommand {
finally {
stream.close();
}
return file.getAbsolutePath();
// Windows paths get tricky unless you work with URI
return file.getAbsoluteFile().toURI().toString();
}
private static File getDefaultLibDirectory() {

Loading…
Cancel
Save