Repository: quarkusio/quarkus
Issue: Quarkus projects do not compile when project path contains whitespaces

**Describe the bug**
I am trying to build a quarkus project on our company jenkins. The path to the project in jenkins contains whitespaces.
"/var/lib/jenkins/jobs/wolf - project/workspace/project-web/target/classes"
The build fails.
If I remove these whitespaces, the build is successfull.

**Expected behavior**
The project builds without errors caused by internal quarkus maven plugin problems.

**Actual behavior**
Build fails with the following error:
```
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:0.18.0:build (default) on project documentrepository-web: Failed to build a runnable JAR: Failed to build a runner jar: Failed to augment application classes: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.deployment.index.ApplicationArchiveBuildStep#build threw an exception: java.lang.RuntimeException: java.io.FileNotFoundException: /var/lib/jenkins/jobs/wolf%20-%20project/workspace/project-web/target/classes (Datei oder Verzeichnis nicht gefunden)
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :project-web
```


**To Reproduce**
Steps to reproduce the behavior:
1. Move an existing, successfully compiling quarkus project into a path with whitespaces
2. Compile
3. Does not compile

**Additional context**
quarkus 018.0
java 8
Maven 3.6.1


Changed files:
core/deployment/src/test/java/io/quarkus/deployment/index/ApplicationArchiveBuildStepTestCase.java
core/deployment/src/main/java/io/quarkus/deployment/index/ApplicationArchiveBuildStep.java

diff --git a/core/deployment/src/main/java/io/quarkus/deployment/index/ApplicationArchiveBuildStep.java b/core/deployment/src/main/java/io/quarkus/deployment/index/ApplicationArchiveBuildStep.java
index 58c21f6b063..d13b71c424d 100644
--- a/core/deployment/src/main/java/io/quarkus/deployment/index/ApplicationArchiveBuildStep.java
+++ b/core/deployment/src/main/java/io/quarkus/deployment/index/ApplicationArchiveBuildStep.java
@@ -1,5 +1,6 @@
 package io.quarkus.deployment.index;
 
+import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -171,13 +172,13 @@ static Path urlToPath(URL url) {
                 String jarPath = url.getPath().substring(0, url.getPath().lastIndexOf('!'));
                 return Paths.get(new URI(jarPath));
             } else if (url.getProtocol().equals("file")) {
-                int index = url.getPath().lastIndexOf("/META-INF");
+                final Path path = Paths.get(url.toURI());
+                final String filePath = path.toString();
+                final int index = filePath.lastIndexOf(File.separator + "META-INF");
                 if (index == -1) {
-                    return Paths.get(url.getPath());
+                    return path;
                 }
-                String pathString = url.getPath().substring(0, index);
-                Path path = Paths.get(new URI(url.getProtocol(), url.getHost(), pathString, null));
-                return path;
+                return Paths.get(filePath.substring(0, index));
             }
             throw new RuntimeException("Unknown URL type " + url.getProtocol());
         } catch (URISyntaxException e) {
diff --git a/core/deployment/src/test/java/io/quarkus/deployment/index/ApplicationArchiveBuildStepTestCase.java b/core/deployment/src/test/java/io/quarkus/deployment/index/ApplicationArchiveBuildStepTestCase.java
index 0df051e2cd3..16211109c1b 100644
--- a/core/deployment/src/test/java/io/quarkus/deployment/index/ApplicationArchiveBuildStepTestCase.java
+++ b/core/deployment/src/test/java/io/quarkus/deployment/index/ApplicationArchiveBuildStepTestCase.java
@@ -13,8 +13,13 @@ public class ApplicationArchiveBuildStepTestCase {
     @Test
     public void testUrlToPath() throws MalformedURLException {
         assertEquals(Paths.get("/a/path"), urlToPath(new URL("jar:file:/a/path!/META-INF/services/my.Service")));
+        assertEquals(Paths.get("/a/path with whitespace"),
+                urlToPath(new URL("jar:file:/a/path%20with%20whitespace!/META-INF/services/my.Service")));
         assertEquals(Paths.get("/a/path"), urlToPath(new URL("file:/a/path/META-INF/services/my.Service")));
+        assertEquals(Paths.get("/a/path with whitespace"),
+                urlToPath(new URL("file:/a/path%20with%20whitespace/META-INF/services/my.Service")));
         assertEquals(Paths.get("/a/path"), urlToPath(new URL("file:/a/path")));
+        assertEquals(Paths.get("/a/path with whitespace"), urlToPath(new URL("file:/a/path%20with%20whitespace")));
     }
 
     @Test(expected = RuntimeException.class)