This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch exp-log in repository https://gitbox.apache.org/repos/asf/camel.git
commit b1449bce924b39ff4192f6e08a5e00cbaea41a04 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Mon Apr 7 21:16:09 2025 +0200 CAMEL-21939: camel-jbang: Fix export to not run twice, and also fix camel-export.log, and be able to log to console and add the verbose option also. --- .../apache/camel/dsl/jbang/core/commands/Run.java | 25 ++++++---------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java index f9aa74eeae7..e1124670074 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java @@ -1002,9 +1002,7 @@ public class Run extends CamelCommand { eq.gav = "org.example.project:" + eq.name + ":1.0-SNAPSHOT"; } eq.dependencies = this.dependencies; - if (!this.exportRun) { - eq.addDependencies("camel:cli-connector"); - } + eq.addDependencies("camel:cli-connector"); eq.fresh = this.fresh; eq.download = this.download; eq.quiet = true; @@ -1018,7 +1016,7 @@ public class Run extends CamelCommand { // run export int exit = eq.export(); - if (exit != 0 || this.exportRun) { + if (exit != 0) { return exit; } @@ -1076,25 +1074,16 @@ public class Run extends CamelCommand { eq.gav = "org.example.project:" + eq.name + ":1.0-SNAPSHOT"; } eq.dependencies.addAll(this.dependencies); - if (!this.exportRun) { - eq.addDependencies("camel:cli-connector"); - } + eq.addDependencies("camel:cli-connector"); if (this.dev) { // hot-reload of spring-boot eq.addDependencies("mvn:org.springframework.boot:spring-boot-devtools"); } eq.fresh = this.fresh; eq.download = this.download; - if (logging) { - eq.quiet = false; - eq.logging = true; - eq.loggingLevel = loggingLevel; - eq.verbose = verbose; - } else { - eq.quiet = true; - eq.logging = false; - eq.loggingLevel = "off"; - } + eq.quiet = true; + eq.logging = false; + eq.loggingLevel = "off"; eq.ignoreLoadingError = this.ignoreLoadingError; eq.lazyBean = this.lazyBean; eq.applicationProperties = this.property; @@ -1103,7 +1092,7 @@ public class Run extends CamelCommand { // run export int exit = eq.export(); - if (exit != 0 || exportRun) { + if (exit != 0) { return exit; }