CAMEL-24400: camel-jbang - honor camel.jbang.camel-version system property - #26023
CAMEL-24400: camel-jbang - honor camel.jbang.camel-version system property#26023chala2001 wants to merge 1 commit into
Conversation
…perty Export read only the Quarkus platform and camelSpringBootVersion from system properties, so -Dcamel.jbang.camel-version was ignored while the equivalent --camel-version flag worked. Read the Camel version there too, the same way camelSpringBootVersion already is. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
davsclaus
left a comment
There was a problem hiding this comment.
whats the reason for this - its not documented you can do that
|
You're right, I checked and the docs don't support this.
The one thing that made it look intentional is that Happy to close this and CAMEL-24400 as invalid if the |
|
the quarkus is a very special outliner as its a pain to align as quarkus and camel quarkus has its own version and release scheme. and we dont want 3 different ways of doing stuff. you are welcome to close, and keep feedback on camel jbang coming thanks 🙏 |
|
closing |
|
And btw the -D is for jbang itself to kick of camel cli using a specific version, its jbang handling this in This is a bit of a "hack" as jbang is not very flexible, and we needed this during the build up for camel jbang. And over time if/when we drop jbang then that feature will be gone as well. |
Description
camel exportdocumentscamel.jbang.camel-versionas a supported option, but setting it as asystem property had no effect. The exported project kept the default Camel version, while the
equivalent
--camel-versionflag worked, so the two ways of setting the same thing disagreed.Export.overrideFromSystemProperties()only read the Quarkus platform andcamel.jbang.camelSpringBootVersion. The Camel version was read fromapplication.propertiesbut had no system property path, unlike
camelSpringBootVersionwhich has both. This adds themissing line so the two options behave the same way.
Reproducer from the issue:
camel export --runtime=quarkus -Dcamel.jbang.camel-version=4.8.0 hello.javaBefore this change the exported pom used the running Camel version, after it the pom uses 4.8.0.
ExportTest#shouldOverrideCamelVersionFromSystemPropertywas added next to the existing Spring Bootand Quarkus system property tests. It asserts the exported pom imports
camel-bomat the requestedversion. With the fix reverted it fails with
expected: "4.13.0" but was: "4.23.0-SNAPSHOT", whichis the symptom described in the issue.
Target
mainbranch)Tracking
CAMEL-24400
Apache Camel coding standards and style
I checked that each commit in the pull request has a meaningful subject line and body.
I have run
mvn clean install -DskipTestslocally from root folder and I have committed all auto-generated changes.AI-assisted contributions
Co-authored-bytrailers) and the PR description identifies the AI tool used.Claude Code on behalf of chala2001