[
https://issues.apache.org/jira/browse/CAMEL-21408?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-21408:
--------------------------------
Priority: Minor (was: Major)
> camel-jbang - export is not working when specifying a Camel route with a path
> -----------------------------------------------------------------------------
>
> Key: CAMEL-21408
> URL: https://issues.apache.org/jira/browse/CAMEL-21408
> Project: Camel
> Issue Type: Task
> Components: camel-jbang
> Affects Versions: 4.8.1
> Reporter: Aurélien Pupier
> Priority: Minor
>
> when calling something like:
> {noformat}jbang '-Dcamel.jbang.version=4.8.1' camel@apache/camel export
> --runtime=quarkus --gav=com.acme:myproject:1.0-SNAPSHOT
> module-01/demo.camel.yaml{noformat}
> The genrated project is invalid.
> The camel file is copied in src/main/resources/camel/democamel.yaml
> The application.properties file contains:
> {noformat}
> quarkus.native.resources.includes=camel/module-01/demo.camel.yaml
> camel.main.routes-include-pattern=camel/module-01/demo.camel.yaml
> {noformat}
> which is leading to this kind of error at runtime:
> {noformat}
> 2024-10-31 08:37:02,010 ERROR [org.apa.cam.qua.mai.CamelMainRuntime] (main)
> Failed to start application: org.apache.camel.RuntimeCamelException:
> java.io.FileNotFoundException: Resource not found:
> classpath:camel/module-01/demo.camel.yaml
> at
> org.apache.camel.RuntimeCamelException.wrapRuntimeException(RuntimeCamelException.java:68)
> at
> org.apache.camel.main.RoutesConfigurer.configureModeline(RoutesConfigurer.java:366)
> at
> org.apache.camel.main.BaseMainSupport.modelineRoutes(BaseMainSupport.java:692)
> at
> org.apache.camel.main.BaseMainSupport.autoconfigure(BaseMainSupport.java:535)
> at org.apache.camel.main.MainSupport.autoconfigure(MainSupport.java:73)
> at
> org.apache.camel.main.BaseMainSupport.postProcessCamelContext(BaseMainSupport.java:772)
> at
> org.apache.camel.quarkus.main.CamelMain.initCamelContext(CamelMain.java:113)
> at org.apache.camel.quarkus.main.CamelMain.doInit(CamelMain.java:83)
> at
> org.apache.camel.support.service.BaseService.init(BaseService.java:85)
> at
> org.apache.camel.quarkus.main.CamelMain.startEngine(CamelMain.java:134)
> at
> org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:49)
> at
> org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:45)
> at
> io.quarkus.deployment.steps.CamelBootstrapProcessor$boot173480958.deploy_0(Unknown
> Source)
> at
> io.quarkus.deployment.steps.CamelBootstrapProcessor$boot173480958.deploy(Unknown
> Source)
> at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
> at io.quarkus.runtime.Application.start(Application.java:101)
> at
> io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:119)
> at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
> at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
> at io.quarkus.runtime.Quarkus.run(Quarkus.java:124)
> at io.quarkus.runner.GeneratedMain.main(Unknown Source)
> at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:569)
> at
> io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:62)
> at
> io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:33)
> Caused by: java.io.FileNotFoundException: Resource not found:
> classpath:camel/module-01/demo.camel.yaml
> at
> org.apache.camel.dsl.yaml.YamlRoutesBuilderLoader.preParseRoute(YamlRoutesBuilderLoader.java:976)
> at
> org.apache.camel.main.RoutesConfigurer.doConfigureModeline(RoutesConfigurer.java:425)
> at
> org.apache.camel.main.RoutesConfigurer.configureModeline(RoutesConfigurer.java:352)
> ... 25 more
> {noformat}
> Note that it also affects the Camel Kubernetes run as it is reusing the
> export.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)