This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch camel-jbang-fix-bundled-example-properties in repository https://gitbox.apache.org/repos/asf/camel.git
commit df20dbd809f1b298c555022f719c1c76558ef6b8 Author: Claus Ibsen <[email protected]> AuthorDate: Wed May 20 21:51:38 2026 +0200 chore: fix bundled example not loading application.properties When running a bundled example via camel run --example, the example's application.properties was extracted to a temp directory but profileProperties was loaded from the current working directory. This meant camel.jbang.dependencies and other properties from the example were never picked up by the runtime. Set exportBaseDir to the temp directory so run() uses it as baseDir, making loadProfileProperties find the correct application.properties. Co-Authored-By: Claude <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- .../src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java | 3 +++ 1 file changed, 3 insertions(+) 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 2bba0b7f69a8..c924d43d5142 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 @@ -481,6 +481,9 @@ public class Run extends CamelCommand { name = eName; } + // use the temp dir as base so run() loads the example's application.properties + exportBaseDir = tempDir; + if (!exportRun) { printConfigurationValues("Running integration with the following configuration:"); }
