davsclaus opened a new pull request, #28000:
URL: https://github.com/apache/camel/pull/28000

   [CAMEL-25718](https://issues.apache.org/jira/browse/CAMEL-25718): **every 
command of `camel test` has a page now**, so all the Camel CLI commands are 
documented.
   
   ### The problem
   7 of the 9 commands of the `camel test` plugin had no page: `camel test 
inspect`, `test run`, `test ps`, `test agent`, `test agent start`, `test agent 
run` and `test agent stop`. The plugin registers these commands of Citrus as 
they are (`org.citrusframework.jbang.cli.commands.Run` and so on), and 
`PrepareCamelJBangCommandsMojo` only documented a command whose class has a 
source in the module. Every other command (camel-jbang-core: 143 of 143, and 
the edit, generate, kubernetes, mcp, tui and validate plugins) was documented 
already.
   
   ### The change
   - A command class that the source registering it (`CamelJBangMain` or the 
plugin class) imports by name is read from the classpath of the project when it 
has no source: its `@Command` (description, without the hint to the help as for 
a command of the sources, and hidden) and its options. This is by reflection, 
as the options of a library class since CAMEL-25717 (#27997), since picocli is 
not a dependency of the plugin.
   - Generated: the 7 pages, with the options of the Citrus classes (for 
example 14 for `camel test run`), and the page of `camel test` lists all its 
subcommands. The generator was run in all 8 camel-jbang modules that use it, 
and nothing else changed.
   
   The pages come from the Citrus classes, so an upgrade of Citrus that changes 
their options regenerates them, like any generated page.
   
   ### Tests
   
`PrepareCamelJBangCommandsMojoTest.testPluginCommandsOfALibraryAreDocumented`: 
a plugin registers commands of a library (compiled into the classes of the 
project): a leaf command with options, and a command with a subcommand. They 
are documented with their descriptions, options and subcommands. The test fails 
without the lookup. `mvn test` of camel-package-maven-plugin: all pass (87).
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01DDRLJAyf8cDXSg8iX785My
   


-- 
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]

Reply via email to