[camel-4.18.x] Fix camel export to auto-detect kamelets version from classpath#23783
Open
smongiar wants to merge 1 commit into
Open
[camel-4.18.x] Fix camel export to auto-detect kamelets version from classpath#23783smongiar wants to merge 1 commit into
smongiar wants to merge 1 commit into
Conversation
f875639 to
8ff8e94
Compare
Croway
approved these changes
Jun 5, 2026
50204de to
194dd89
Compare
The --kamelets-version option was hardcoded to a compile-time default from parent/pom.xml in ExportBaseCommand, CatalogKamelet, CatalogDoc, and KameletTools. When the actual kamelets jar on the classpath has a different version (e.g. in productized builds), wrong version is used. Remove the compile-time defaults and let VersionHelper.extractKameletsVersion() detect the actual version from the classpath at runtime, falling back to the compiled-in default only when no kamelets jar is found.
194dd89 to
64efc53
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick of #23781 to
camel-4.18.x.Summary
--kamelets-versionoption incamel exportwas hardcoded to a compile-time default fromparent/pom.xmlVersionHelper.extractKameletsVersion()can detect the actual version from the classpath, but was never called because the field was always pre-initializedextractKameletsVersion()runs at runtimerunSilently()which runs beforeresolveDependencies()