gnodet opened a new pull request, #31253: URL: https://github.com/apache/camel/pull/31253
## Summary Fixes multiple configuration key mismatches between the CLI write side (`RunPipeline`, `RunProfileProperties`) and the read side (`KameletMain`), plus missing property handling in `RunProfileProperties.applyTo()`. ## Root Cause Several bugs in `KameletMain` caused options set in `application.properties` or by the CLI to be silently ignored: 1. **`camelVersion` key mismatch (2 occurrences):** `KameletMain.createCamelContext()` and `configureRoutesLoader()` both read `camel.jbang.camelVersion` (camelCase), but `CamelJBangConstants.CAMEL_VERSION = "camel.jbang.camel-version"` (kebab-case). The property was always null, so a custom Camel version had no effect on the period task resolver and routes loader. 2. **`openApi` key mismatch:** `KameletMain` read `camel.jbang.open-api` (kebab) while `OPEN_API = "camel.jbang.openApi"` (camelCase). The OpenAPI reload strategy was never set up from properties. 3. **JFR boolean not accepted:** The JFR guard only matched the string `"jfr"` (the value `RunPipeline` writes), but `application.properties` uses `camel.jbang.jfr=true` as a standard boolean. `KameletMain` now also accepts `"true"`. 4. **`RunProfileProperties.applyTo()` missing keys:** When loading `application.properties`, `applyTo()` did not transfer `ignoreLoadingError`, `lazyBean`, `prompt`, `localKameletDir`, `jfr`, or `jfr-profile` into the `RunRequest`, so those fields kept their CLI defaults even when overridden in the file. ## Fix - `KameletMain`: correct the two `camelVersion` → `camel-version` reads, correct `open-api` → `openApi`, and add `"true"` to the JFR condition. - `RunProfileProperties.applyTo()`: add the six missing property reads, respecting the command-line-wins precedence (unchanged options are not overridden by the file). ## Tests Added 8 unit tests to `RunProfilePropertiesTest` covering each newly handled property (`ignoreLoadingError`, `lazyBean`, `prompt`, `localKameletDir`, `jfr=true`, `jfr=jfr`, `jfr-profile`) and the command-line-wins invariant. All 10 tests pass (2 pre-existing + 8 new). Fixes CAMEL-28004 --- _Hermes Agent (Claude Sonnet 4.6) on behalf of Guillaume Nodet_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
