From f9010c18cc90465ac332f1b88cd29a202a5fb615 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Mon, 13 Oct 2014 13:57:13 +0100 Subject: [PATCH] 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. --- .../boot/cli/command/install/InstallCommand.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/install/InstallCommand.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/install/InstallCommand.java index 6edab81823..647a8e5c77 100644 --- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/install/InstallCommand.java +++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/install/InstallCommand.java @@ -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() {