jamesnetherton commented on code in PR #8162:
URL: https://github.com/apache/camel-quarkus/pull/8162#discussion_r2697396994


##########
extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMain.java:
##########
@@ -99,6 +103,21 @@ public MainConfigurationProperties 
getMainConfigurationProperties() {
         return mainConfigurationProperties;
     }
 
+    @Override
+    protected void configureRoutes(CamelContext camelContext) throws Exception 
{
+        if (camelContext.isSourceLocationEnabled()) {
+            for (RoutesBuilder route : 
getMainConfigurationProperties().getRoutesBuilders()) {
+                if (route instanceof ResourceAware ra && ra.getResource() == 
null) {
+                    Resource resource = 
ResourceHelper.resolveResource(camelContext, "source:" + 
route.getClass().getName());
+                    if (resource != null && resource.exists()) {
+                        ra.setResource(resource);
+                    }
+                }
+            }
+        }

Review Comment:
   @davsclaus I had to add this to ensure non-registry discovered 
`RouteBuilder` impls (i.e ones that are not CDI beans) have their `source:` 
resources configured.
   
   Not sure if we should push a similar change into `camel-main`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to