Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-20033

Camel JBang dependency is not supporting Windows path with Camel files written in Java

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.1.0
    • 4.2.0
    • camel-jbang
    • None
    • Unknown

    Description

      follow-up on CAMEL-19922 where I tested only with a Camel xml file

      jbang camel@apache/camel init WithJava.java
      jbang camel@apache/camel dependency copy --output-directory="c:\Users\Aurelien Pupier\testJbang\outputdir" "c:\Users\Aurelien Pupier\testJbang\WithJava.java"
      

      results in error:

      java.nio.file.InvalidPathException: Illegal char <      > at index 22: c:UsersAurelien Pupier   estJbangWithJava.java
              at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
              at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
              at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
              at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
              at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:232)
              at java.base/java.io.File.toPath(File.java:2387)
              at org.apache.camel.dsl.jbang.core.commands.ExportBaseCommand.copySourceFiles(ExportBaseCommand.java:460)
              at org.apache.camel.dsl.jbang.core.commands.ExportCamelMain.copySourceFiles(ExportCamelMain.java:306)
              at org.apache.camel.dsl.jbang.core.commands.ExportCamelMain.export(ExportCamelMain.java:102)
              at org.apache.camel.dsl.jbang.core.commands.Export.export(Export.java:127)
              at org.apache.camel.dsl.jbang.core.commands.DependencyList.doExport(DependencyList.java:207)
              at org.apache.camel.dsl.jbang.core.commands.DependencyList.export(DependencyList.java:64)
              at org.apache.camel.dsl.jbang.core.commands.ExportBaseCommand.doCall(ExportBaseCommand.java:216)
              at org.apache.camel.dsl.jbang.core.commands.Export.doCall(Export.java:28)
              at org.apache.camel.dsl.jbang.core.commands.DependencyList.doCall(DependencyList.java:54)
              at org.apache.camel.dsl.jbang.core.commands.CamelCommand.call(CamelCommand.java:71)
              at org.apache.camel.dsl.jbang.core.commands.CamelCommand.call(CamelCommand.java:36)
              at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
              at picocli.CommandLine.access$1500(CommandLine.java:148)
              at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
              at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
              at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
              at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
              at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
              at picocli.CommandLine.execute(CommandLine.java:2170)
              at org.apache.camel.dsl.jbang.core.commands.CamelJBangMain.run(CamelJBangMain.java:165)
              at main.CamelJBang.main(CamelJBang.java:36)
      
      jbang camel@apache/camel init demo.xml
      jbang camel@apache/camel dependency copy --output-directory="c:\Users\Aurelien Pupier\testJbang\outputdir" "c:\Users\Aurelien Pupier\testJbang\demo.xml"
      

      is working

      Attachments

        Issue Links

          Activity

            People

              apupier Aurélien Pupier
              apupier Aurélien Pupier
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: