Skip to content

chore: fix bundled example not loading application.properties#23387

Merged
davsclaus merged 2 commits into
mainfrom
camel-jbang-fix-bundled-example-properties
May 21, 2026
Merged

chore: fix bundled example not loading application.properties#23387
davsclaus merged 2 commits into
mainfrom
camel-jbang-fix-bundled-example-properties

Conversation

@davsclaus
Copy link
Copy Markdown
Contributor

Summary

  • When running camel run --example groovy, the example's application.properties was extracted to a temp directory but profileProperties was loaded from the current working directory (.), so camel.jbang.dependencies and other properties were never picked up by the runtime.
  • Fixed by setting exportBaseDir = tempDir in runBundledExample() so run() uses the temp directory as baseDir, making loadProfileProperties find the correct application.properties.

Test plan

  • Run camel run --example groovy --verbose and verify commons-validator:commons-validator:1.10.1 is resolved and the example runs without errors
  • Full reactor build passes (mvn clean install -DskipTests)

Claude Code on behalf of Claus Ibsen

@github-actions
Copy link
Copy Markdown
Contributor

ghost commented May 20, 2026

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions
Copy link
Copy Markdown
Contributor

ghost commented May 20, 2026

🧪 CI tested the following changed modules:

  • docs
  • dsl/camel-jbang/camel-jbang-core

⚠️ Some tests are disabled on GitHub Actions (@DisabledIfSystemProperty(named = "ci.env.name")) and require manual verification:

  • dsl/camel-jbang/camel-jbang-core: 1 test(s) disabled on GitHub Actions

💡 Manual integration tests recommended:

You modified dsl/camel-jbang/camel-jbang-core. The related integration tests in dsl/camel-jbang/camel-jbang-it are excluded from CI. Consider running them manually:

mvn verify -f dsl/camel-jbang/camel-jbang-it -Djbang-it-test
All tested modules (6 modules)
  • Camel :: JBang :: Core
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: Launcher :: Container

⚙️ View full build and test results

davsclaus and others added 2 commits May 20, 2026 22:50
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 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
…e 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 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
@davsclaus davsclaus force-pushed the camel-jbang-fix-bundled-example-properties branch from e1a6d8d to 431630c Compare May 20, 2026 20:50
@davsclaus davsclaus merged commit d645922 into main May 21, 2026
7 checks passed
@davsclaus davsclaus deleted the camel-jbang-fix-bundled-example-properties branch May 21, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant