bootique
bootique copied to clipboard
API to suppress module options
We already allow to explicitly suppress module commands:
BQModuleProvider commands = Commands
.builder(HelpCommand.class, HelpConfigCommand.class)
.noModuleCommands()
.build();
Would be also useful to suppress module options. E.g. Liquibase module defines both commands and standalone options. And turning off commands (when running LB via a custom command), but not options leaves the app in a confusing state.
There may be a similar API for Options:
BQModuleProvider commands = Options
.builder(CliConfigurationSource.configOption())
.noModuleOptions()
.addOption("o1")
.addOption(OptionMetadata.builder("o2").build())
.build();
It will deal solely with options added at the top level. Command-related option set should be driven by whatever commands are active in the system. I.e. command-provided options should stay active no matter whether noModuleOptions is on or off. This includes options for a default command. Also Command-provided options should only include options for active commands.