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

camel-jbang - Cannot run xxx.camel.yaml files

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 4.8.0
    • 4.8.0
    • camel-jbang
    • None
    • Unknown

    Description

      The camel run unfortuantely has a bug that causes it to not detect file extensions correctly for yaml kamelets and routes, and will fail.

       

      For example this example
      https://github.com/apache/camel-kamelets-examples/tree/main/jbang/hello-yaml

      camel run *

      or

      camel run hello.camel.yaml

      All causes failure

      org.apache.camel.RuntimeCamelException: Failed to resolve source file: hello.camel.yaml
          at org.apache.camel.dsl.jbang.core.common.SourceHelper.resolveSource(SourceHelper.java:46)
          at org.apache.camel.dsl.jbang.core.commands.Run.knownFile(Run.java:1544)
          at org.apache.camel.dsl.jbang.core.commands.Run.run(Run.java:645)
          at org.apache.camel.dsl.jbang.core.commands.Run.doCall(Run.java:310)
          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:37)
          at picocli.CommandLine.executeUserObject(CommandLine.java:2045)
          at picocli.CommandLine.access$1500(CommandLine.java:148)
          at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465)
          at picocli.CommandLine$RunLast.handle(CommandLine.java:2457)
          at picocli.CommandLine$RunLast.handle(CommandLine.java:2419)
          at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
          at picocli.CommandLine$RunLast.execute(CommandLine.java:2421)
          at picocli.CommandLine.execute(CommandLine.java:2174)
          at org.apache.camel.dsl.jbang.core.commands.CamelJBangMain.run(CamelJBangMain.java:173)
          at org.apache.camel.dsl.jbang.core.commands.CamelJBangMain.run(CamelJBangMain.java:62)
          at main.CamelJBang.main(CamelJBang.java:36)

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              davsclaus Claus Ibsen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: