You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by on...@apache.org on 2019/01/18 13:41:23 UTC

[camel] branch master updated: CAMEL-13080 - fix URI creation for windows builds

This is an automated email from the ASF dual-hosted git repository.

onders pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new d29d48c  CAMEL-13080 - fix URI creation for windows builds
d29d48c is described below

commit d29d48c43bd0b62b649db58716d8905f7fa36c06
Author: onders <on...@apache.org>
AuthorDate: Fri Jan 18 15:33:04 2019 +0300

    CAMEL-13080 - fix URI creation for windows builds
---
 .../main/java/org/apache/camel/maven/packaging/PackageJaxbMojo.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageJaxbMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageJaxbMojo.java
index 9763467..4ac4841 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageJaxbMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageJaxbMojo.java
@@ -167,11 +167,12 @@ public class PackageJaxbMojo extends AbstractMojo {
 
     private Path asFolder(String p) {
         if (p.endsWith(".jar")) {
+            File fp = new File(p);
             try {
                 Map<String, String> env = new HashMap<>();
-                return FileSystems.newFileSystem(URI.create("jar:file:" + p + "!/"), env).getPath("/");
+                return FileSystems.newFileSystem(URI.create("jar:" + fp.toURI().toString()), env).getPath("/");
             } catch (FileSystemAlreadyExistsException e) {
-                return FileSystems.getFileSystem(URI.create("jar:file:" + p + "!/")).getPath("/");
+                return FileSystems.getFileSystem(URI.create("jar:" + fp.toURI().toString())).getPath("/");
             } catch (IOException e) {
                 throw new IOError(e);
             }