Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-3813

InvalidPathException thrown on karaf:assembly Maven goal

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 4.0.0
    • 4.0.1
    • karaf
    • None
    • Patch

    Description

      An exception is being thrown when using the Karaf Maven plugin to create a custom distribution in Windows. The attached POM file replicates the issue.

      The fix for KARAF-3663 was a change in kar/src/main/java/org/apache/karaf/kar/internal/Kar.java that added the KAR file URI to the repo list instead of the Maven URI. I suspect this fix may work on some non-Windows JVMs but it is failing on Java HotSpot:

      Suppressed: java.nio.file.InvalidPathException: Illegal char <:> at index 4: file:/C:/dev/code/karaf-test-distribution/target/assembly/system/org/apache/karaf/features/framework/4.0.0/framework-4.0.0-features.xml
      at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
      at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
      at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
      at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
      at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
      at sun.nio.fs.AbstractPath.resolve(AbstractPath.java:53)
      at org.apache.karaf.profile.assembly.Builder$4.downloaded(Builder.java:1040)
      at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:133)
      at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader$1.operationComplete(MavenDownloadManager.java:127)
      at org.apache.karaf.features.internal.download.impl.DefaultFuture.notifyListener(DefaultFuture.java:344)
      at org.apache.karaf.features.internal.download.impl.DefaultFuture.addListener(DefaultFuture.java:293)
      at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.download(MavenDownloadManager.java:127)
      at org.apache.karaf.profile.assembly.Builder.loadRepositories(Builder.java:1035)
      ... 27 more

      Attachments

        1. KARAF-3813.patch
          1 kB
          Jonathan Byrne
        2. KARAF-3813.patch
          1 kB
          Jonathan Byrne
        3. pom.xml
          2 kB
          Jonathan Byrne

        Issue Links

          Activity

            People

              gnodet Guillaume Nodet
              Jonathan Byrne Jonathan Byrne
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: