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 d64592211235 chore: fix bundled example not loading
application.properties (#23387)
d64592211235 is described below
commit d645922112355d56a83a879c682d74405b81bdbb
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu May 21 07:26:25 2026 +0200
chore: fix bundled example not loading application.properties (#23387)
* 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]>
* chore: document Maven downloader preferLocal default change in upgrade
guide
Add note about the MavenDownloaderImpl.preferLocal default changing
from false to true in the 4.21 upgrade guide, as discussed in PR #23333.
Co-Authored-By: Claude <[email protected]>
Signed-off-by: Claus Ibsen <[email protected]>
---------
Signed-off-by: Claus Ibsen <[email protected]>
Co-authored-by: Claude <[email protected]>
---
.../user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc | 6 ++++++
.../src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java | 3 +++
2 files changed, 9 insertions(+)
diff --git
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
index f288c74a88e3..506dc1371e00 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
@@ -86,6 +86,12 @@ In addition to `http://` and `https://`, it also accepts
`file://` URIs.
Those may come in handy when cannot access the internet.
Append `.json` to the resource path when you store it locally.
+The internal Maven downloader used by Camel JBang now defaults to preferring
locally cached
+artifacts over remote ones (`preferLocal = true`). Previously the default was
`false`, meaning
+the downloader would always check remote repositories first. With the new
default, already-resolved
+artifacts in the local Maven repository are used directly without contacting
remote repositories.
+Use `--fresh` to force re-downloading from remote repositories when needed.
+
==== camel-jbang-mcp
The `camel_catalog_component_doc` tool no longer returns every component
option by default. Two new
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 9ab7da12ff18..d0938d501d2e 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
@@ -465,6 +465,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:");
}