You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2023/01/14 17:59:00 UTC

[jira] [Resolved] (CAMEL-18919) Support all "multiple" filename extension with Camel JBang

     [ https://issues.apache.org/jira/browse/CAMEL-18919?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-18919.
---------------------------------
    Resolution: Won't Do

a yaml file can be anything and therefore camel-jbang only loads

- xxx.camel.yaml
- xxx.camelk.yaml

And special for kamelets
- xxx.kamelet.yaml

Any other file is not supported by jbang as being a route.

> Support all "multiple" filename extension with Camel JBang
> ----------------------------------------------------------
>
>                 Key: CAMEL-18919
>                 URL: https://issues.apache.org/jira/browse/CAMEL-18919
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-jbang
>    Affects Versions: 3.19.0
>            Reporter: Aurélien Pupier
>            Priority: Major
>
> currently with a file named for instance my.camelk.yaml, my.kaoto.yaml or my.camel.yaml, Cmael JBang is failing with this kind of error:
> {noformat}
> java.lang.IllegalArgumentException: Cannot find RoutesBuilderLoader in classpath supporting file extension: camelk.yaml
>         at org.apache.camel.impl.engine.DefaultRoutesLoader.resolveRoutesBuilderLoader(DefaultRoutesLoader.java:201)
>         at org.apache.camel.impl.engine.DefaultRoutesLoader.preParseRoute(DefaultRoutesLoader.java:137)
>         at org.apache.camel.main.RoutesConfigurer.configureModeline(RoutesConfigurer.java:278)
>         at org.apache.camel.main.BaseMainSupport.modelineRoutes(BaseMainSupport.java:629)
>         at org.apache.camel.main.BaseMainSupport.autoconfigure(BaseMainSupport.java:485)
>         at org.apache.camel.main.MainSupport.autoconfigure(MainSupport.java:74)
>         at org.apache.camel.main.KameletMain.autoconfigure(KameletMain.java:420)
>         at org.apache.camel.main.BaseMainSupport.postProcessCamelContext(BaseMainSupport.java:693)
>         at org.apache.camel.main.MainSupport.initCamelContext(MainSupport.java:403)
>         at org.apache.camel.main.KameletMain.doInit(KameletMain.java:231)
>         at org.apache.camel.support.service.BaseService.init(BaseService.java:83)
>         at org.apache.camel.support.service.BaseService.start(BaseService.java:111)
>         at org.apache.camel.dsl.jbang.core.commands.Run.run(Run.java:545)
>         at org.apache.camel.dsl.jbang.core.commands.Run.call(Run.java:198)
>         at org.apache.camel.dsl.jbang.core.commands.Run.call(Run.java:70)
>         at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
>         at picocli.CommandLine.access$1300(CommandLine.java:145)
>         at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
>         at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
>         at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
>         at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
>         at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
>         at picocli.CommandLine.execute(CommandLine.java:2078)
>         at org.apache.camel.dsl.jbang.core.commands.CamelJBangMain.run(CamelJBangMain.java:113)
>         at main.CamelJBang.main(CamelJBang.java:36) {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)