christophd commented on code in PR #29663:
URL: https://github.com/apache/camel/pull/29663#discussion_r4547983348
##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc:
##########
@@ -1166,6 +1166,21 @@ built for Camel 4.24:
* A test sets the options of a command with
`CommandLineTestHelper.parse(command, args...)` (in the test jar of
`camel-jbang-core`) instead of `CommandLine.populateCommand`.
+=== camel-jbang - plugins declare which commands they contribute to
+
+A CLI plugin can now declare which built-in commands it participates in beyond
its own command, using the
+`appliesTo` attribute on `@CamelJBangPlugin`. For example, a plugin that
provides a `PluginExporter` should declare
+`@CamelJBangPlugin(name = "...", firstVersion = "...", appliesTo =
{"export"})` so it is loaded during `camel export`
+but not during `camel run`.
+
+Existing plugins that do not declare `appliesTo` are loaded for `camel run`
and `camel export` as before (backward
+compatible). A plugin opts in to filtering by listing at least one command in
`appliesTo`; in the plugin configuration
+file, an empty `appliesTo: []` array means the plugin is only loaded for its
own command.
Review Comment:
Good catch — added a NOTE block to the upgrade guide clarifying that the
annotation default (`appliesTo = {}`) means no filtering (backward compat),
while an explicit empty list in the config (`appliesTo: []`) restricts to own
command only.
_Claude Code on behalf of Christoph Deppisch_
--
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]