Fix JBang metadata generation to detect all commands#22221
Open
Fix JBang metadata generation to detect all commands#22221
Conversation
The PrepareCamelJBangCommandsMojo was not discovering all commands because: - It searched for `new CommandLine(main)` but CamelJBangMain uses `new CommandLine(this)` - The SUBCOMMAND_PATTERN regex only matched `(main)` constructor arg, not `(this)` This caused several commands and options to be missing from generated docs: - Missing `wrapper` command, `dataweave` subcommand - Missing `bind` deprecation notice - Wrong description for `--skip-plugins` option Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
🧪 CI tested the following changed modules:
Build reactor — dependencies compiled but only changed modules were tested (6 modules)
|
09aeeca to
c599fd5
Compare
4 tasks
The gulp glob pattern dsl/**/src/main/docs/*.adoc scans recursively through the dsl/ tree, racing with camel-jbang-core tests that create/delete .camel-jbang/work directories. Add .camel-jbang to the ignore list alongside target to prevent ENOENT errors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
c599fd5 to
c0f74cd
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.
Summary
PrepareCamelJBangCommandsMojoto matchnew CommandLine(this)in addition tonew CommandLine(main), and update the subcommand regex accordinglywrappercommand anddataweavesubcommand docsbinddeprecation notice--skip-pluginsoptionTest plan
mvn install -B -pl tooling/maven/camel-package-maven-plugin,dsl/camel-jbang/camel-jbang-core -DskipTests