Repository navigation
SOLR-18512: Port ConfigTool to picocli - #5039
Open
serhiy-bzhezytskyy wants to merge 5 commits into
Open
serhiy-bzhezytskyy wants to merge 5 commits into
serhiy-bzhezytskyy wants to merge 5 commits into
Conversation
Adds the picocli code path next to the commons-cli one, with the first tests for the tool (run under both parsers) and the generated reference page.
picocli now validates set-property, unset-property, set-user-property and unset-user-property itself, so an unknown action is a usage error instead of a Config API failure. The commons-cli path is unchanged, and the tests now also cover the user-property actions.
janhoy
reviewed
Oct 7, 2026
| @@ -0,0 +1,9 @@ | |||
| # See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc | |||
|
|
|||
| title: The `config` command is now available in the experimental picocli command line interface. | |||
Contributor
There was a problem hiding this comment.
Generic changelog comment, see other PR (add author/link to the main picocli yml file)
| // Long-only: "-v" is ToolBase's --verbose, and picocli rejects a duplicate short name. Under | ||
| // commons-cli the later-added VALUE_OPTION wins, so there "-v" still means --value. | ||
| @picocli.CommandLine.Option( | ||
| names = "--value", |
Contributor
There was a problem hiding this comment.
The functional change from commons-cli regarding -v now not being supported perhaps justifies a small note in major-changes-in-solr-10.adoc as a breaking change. But that is perhaps better filed in the Solr version where we flip SOLR_PICOCLI to default to true?
Contributor
Author
There was a problem hiding this comment.
Added to the Known Limitations on cli/index.adoc; the upgrade note can come with the release that flips SOLR_PICOCLI.
bin/solr config -c x --property p -v 10 works with commons-cli, where -v is --value, but picocli keeps -v for --verbose, so the changelog entry now names the difference.
janhoy
requested changes
Oct 7, 2026
No picocli feature has been released yet, so a new command is a detail of the SOLR-17697 entry. Its author and JIRA are added there instead of a separate entry.
The shared changelog entry does not carry per-command differences, so the picocli page that lists them says that config's --value has no -v short form.
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.
https://issues.apache.org/jira/browse/SOLR-18512
Description
Adds the picocli code path for
bin/solr config, next to the commons-cli one.Solution
ConfigToolgets its annotated options andcallTool()and is registered inSolrCLI; the commons-cli path is unchanged.--valuehas no short-vhere, since picocli does not allow-vto be both--verboseand--value. Written with Claude Code.Tests
The tool had no tests.
ConfigToolTestsets and unsets a property through the Config API and checks the overlay, andConfigToolPicocliTestruns it through picocli.check -x testis clean (rat skipped).Checklist
mainbranch../gradlew check.