This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 458e7b645ae5 CAMEL-22675: camel-jbang - Fix using --source-dir always 
loads HTTP server
458e7b645ae5 is described below

commit 458e7b645ae54366b8c9b9711aca417343affd1b
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Nov 10 18:30:40 2025 +0100

    CAMEL-22675: camel-jbang - Fix using --source-dir always loads HTTP server
---
 .../src/main/java/org/apache/camel/main/KameletMain.java         | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git 
a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/KameletMain.java 
b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/KameletMain.java
index 96f6159ddf86..8c1aa812e634 100644
--- 
a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/KameletMain.java
+++ 
b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/KameletMain.java
@@ -687,15 +687,14 @@ public class KameletMain extends MainCommandLineSupport {
 
             // reloader
             if (sourceDir != null) {
-                configure().httpServer().withEnabled(true);
-                configure().httpServer().withStaticSourceDir(sourceDir);
-                configure().httpManagementServer().withEnabled(true);
-                
configure().httpManagementServer().withUploadSourceDir(sourceDir);
-
                 if (console || health) {
+                    // allow to load static web content from source-dir
+                    configure().httpServer().withStaticSourceDir(sourceDir);
+                    configure().httpManagementServer().withEnabled(true);
                     // allow to upload/download source (source-dir is intended 
to be dynamic) via http when HTTP console enabled
                     configure().httpManagementServer().withUploadEnabled(true);
                     
configure().httpManagementServer().withDownloadEnabled(true);
+                    
configure().httpManagementServer().withUploadSourceDir(sourceDir);
                 }
                 RouteOnDemandReloadStrategy reloader = new 
RouteOnDemandReloadStrategy(sourceDir, true);
                 reloader.setPattern("*");

Reply via email to