Details
-
Task
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
4.8.1
-
None
-
None
-
Unknown
Description
when calling something like:
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
The genrated project is invalid.
The camel file is copied in src/main/resources/camel/democamel.yaml
The application.properties file contains:
quarkus.native.resources.includes=camel/module-01/demo.camel.yaml camel.main.routes-include-pattern=camel/module-01/demo.camel.yaml
which is leading to this kind of error at runtime:
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
Note that it also affects the Camel Kubernetes run as it is reusing the export.
Attachments
Issue Links
- duplicates
-
CAMEL-21433 camel run/export --runtime quarkus can't use a route from subdirectory
- Open