Claus Ibsen created CAMEL-24705:
-----------------------------------
Summary: camel-jbang - explicit CLI flags such as --max-seconds
are overridden by application.properties
Key: CAMEL-24705
URL: https://issues.apache.org/jira/browse/CAMEL-24705
Project: Camel
Issue Type: Bug
Components: camel-jbang
Reporter: Claus Ibsen
With camel-jbang, an explicit command line flag is overridden by the same
setting in the profile properties file (application.properties).
Example: camel run --max-seconds=8 with camel.main.durationMaxSeconds=3600 in
application.properties runs for an hour. The same applies to --max-messages and
--max-idle-seconds (and any other option that goes through Run.writeSetting).
Cause: Run.writeSetting(main, existing, key, value) uses
existing.getProperty(key, value): the profile file wins and the CLI value is
only the default.
Expected: a flag given explicitly on the command line should win over the
profile file, since the user typed it for this run. The profile file remains
the default when the flag is not given.
Found on 2026-09-13 while benchmarking AI-assisted route authoring: an
AI-written application.properties set durationMaxSeconds=3600 and the harness's
--max-seconds=8 was ignored.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)