jaykay12 commented on code in PR #4739:
URL: https://github.com/apache/solr/pull/4739#discussion_r4172691630
##########
solr/core/src/java/org/apache/solr/cli/PackageTool.java:
##########
@@ -93,6 +117,75 @@ public class PackageTool extends ToolBase {
.desc("Don't prompt for input; accept all default choices, defaults
to false.")
.get();
+ record PackageFlags(
+ String collections,
+ boolean cluster,
+ String[] parameters,
+ boolean update,
+ String collection,
+ boolean noPrompt) {}
+
+ // --- picocli fields ---
+
+ @picocli.CommandLine.ArgGroup(exclusive = true, multiplicity = "0..1")
+ private ConnectionOptions connectionOptions;
+
+ @picocli.CommandLine.Mixin private CredentialsOptions credentialsOptions;
+
+ @picocli.CommandLine.Parameters(
+ index = "0",
+ arity = "1",
+ paramLabel = "COMMAND",
+ description =
+ "Package command: add-repo, add-key, list-installed, list-available,
list-deployed, install, deploy, undeploy, uninstall.")
+ private String cmd;
+
+ @picocli.CommandLine.Parameters(
+ index = "1..*",
+ arity = "0..*",
+ paramLabel = "ARGS",
+ description =
+ "Command-specific arguments (package name[:version], repository
name/URL, key file, etc.).")
+ private String[] cmdArgs;
+
+ @picocli.CommandLine.Option(
+ names = {"--collections"},
+ paramLabel = "COLLECTIONS",
+ description =
+ "Specifies that this action should affect plugins for the given
collections only, excluding cluster level plugins.")
+ private String collections;
+
+ @picocli.CommandLine.Option(
+ names = {"--cluster"},
+ description = "Specifies that this action should affect cluster-level
plugins only.")
+ private boolean cluster;
+
+ @picocli.CommandLine.Option(
+ names = {"--param"},
+ paramLabel = "PARAMS",
+ description = "List of parameters to be used with the deploy command.")
+ private String[] param;
+
+ @picocli.CommandLine.Option(
+ names = {"--update"},
+ description = "If a deployment is an update over a previous deployment.")
+ private boolean update;
+
+ @picocli.CommandLine.Option(
+ names = {"-c", "--collection"},
+ paramLabel = "COLLECTION",
+ description = "The collection to apply the package to.")
Review Comment:
got it, for now. I have kept it consistent with how it's for commons-cli
right now.
we can probably touch upon these & get better wordings once we are moving
away from commons-cli.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]