Claus Ibsen created CAMEL-26440:
-----------------------------------
Summary: camel-jbang - A command of a plugin creates all the
commands of the CLI and of the other plugins
Key: CAMEL-26440
URL: https://issues.apache.org/jira/browse/CAMEL-26440
Project: Camel
Issue Type: Improvement
Components: camel-jbang
Reporter: Claus Ibsen
Fix For: 4.24.0
Since CAMEL-26428 a command of the Camel CLI creates only itself. A command of
a plugin ({{camel generate}}, {{camel kubernetes}}, {{camel validate}}, {{camel
test}}, {{camel tui}}, {{camel self-update}}, and the plugins installed in
{{.camel-jbang-plugins.json}}) still creates all the commands of the CLI and,
in the launcher, the commands of all the embedded plugins, before it runs. So
does the help of any command ({{camel version --help}}), only to print the
banner of the plugins that are not installed.
Measured with the launcher (JDK 25, median of 9, wall clock):
||command||now||only the plugin||
|camel generate|830 ms|295 ms|
|camel kubernetes|840 ms|317 ms|
|camel validate|830 ms|297 ms|
The fix:
* a command of a plugin creates no command of the CLI, and only that plugin
(the plugins add only their own command);
* the help of a command creates only that command; the banner of the plugins
that are not installed is printed by {{camel}} and {{camel --help}} only;
* the shell panel of {{camel tui}} makes its own command line with all
commands, instead of the one the CLI ran.
{{camel --help}} still creates all commands.
Related: CAMEL-23810 (startup measurements).
_Claude Code on behalf of davsclaus (Claus Ibsen)_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)