Hi,
I just came across JCommander for the first time while trying to create a command-line parser.
My first attempts have succeeded to parse options and commands, but I'm unsure about how to model something like grouped commands.
The tool I try to develop has several command categories like "user" and "group" and each of the them have some actions like "list", "create", "delete".
Some of the actions have additional parameters, some do not.
user list
user create -firstName <first> -lastName <last>
user delete -id <id>
group list
group create -name <name>
How can I do that with JCommander?
I tried with a CommandUser and a CommandGroup, but then I don't know how to model the actions, with are basically nested commands.
I could create a new command for each action like UserListCommand, UserCreateCommand...
What is the recommended way?
Best regards,
Dominik