/** * Adds the configuration file argument for the configured command. * @param subparser The subparser to register the argument on * @return the register argument */ protected Argument addFileArgument(Subparser subparser) { return subparser.addArgument("file") .nargs("?") .help("application configuration file"); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("--migrations") .dest("migrations-file") .help("the file containing the Liquibase migrations for the application"); subparser.addArgument("--catalog") .dest("catalog") .help("Specify the database catalog (use database default if omitted)"); subparser.addArgument("--schema") .dest("schema") .help("Specify the database schema (use database default if omitted)"); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("output").nargs(1).help("output directory"); }
public JobStatusCommand(final Subparser parser) { super(parser); parser.help("show job or host status"); jobArg = parser.addArgument("-j", "--job") .help("Job filter"); hostArg = parser.addArgument("--host") .setDefault("") .help("Host pattern"); fullArg = parser.addArgument("-f") .action(storeTrue()) .help("Print full hostnames, job and container id's."); }
public HostDeregisterCommand(Subparser parser) { super(parser); parser.help("deregister a host"); hostArg = parser.addArgument("host") .help("Host name to deregister."); yesArg = parser.addArgument("--yes") .action(Arguments.storeTrue()) .help("Automatically answer 'yes' to the interactive prompt."); }
private void addHelp(ArgumentParser p) { p.addArgument("-h", "--help") .action(new SafeHelpAction(stdOut)) .help("show this help message and exit") .setDefault(Arguments.SUPPRESS); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("-c", "--count") .dest("count") .type(Integer.class) .help("limit script to the specified number of pending change sets"); subparser.addArgument("-i", "--include") .action(Arguments.append()) .dest("contexts") .help("include change sets from the given context"); }
public DeploymentGroupRemoveCommand(final Subparser parser) { super(parser); parser.help("remove a deployment-group. Note that this does not undeploy jobs previously " + "deployed by the deployment-group"); nameArg = parser.addArgument("deployment-group-name") .required(true) .help("Deployment group name"); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("-v", "--verbose") .action(Arguments.storeTrue()) .dest("verbose") .help("Output verbose information"); subparser.addArgument("-i", "--include") .action(Arguments.append()) .dest("contexts") .help("include change sets from the given context"); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("--confirm-delete-everything") .action(Arguments.storeTrue()) .required(true) .help("indicate you understand this deletes everything in your database"); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("-i", "--include") .action(Arguments.append()) .dest("contexts") .help("include change sets from the given context"); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("tag-name") .dest("tag-name") .nargs(1) .required(true) .help("The tag name"); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("-n", "--dry-run") .action(Arguments.storeTrue()) .dest("dry-run") .setDefault(Boolean.FALSE) .help("output the DDL to stdout, don't run it"); subparser.addArgument("-c", "--count") .type(Integer.class) .dest("count") .help("only apply the next N change sets"); subparser.addArgument("-i", "--include") .action(Arguments.append()) .dest("contexts") .help("include change sets from the given context"); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("-l", "--list") .dest("list") .action(Arguments.storeTrue()) .setDefault(Boolean.FALSE) .help("list all open locks"); subparser.addArgument("-r", "--force-release") .dest("release") .action(Arguments.storeTrue()) .setDefault(Boolean.FALSE) .help("forcibly release all open locks"); }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("-n", "--dry-run") .action(Arguments.storeTrue()) .dest("dry-run") .setDefault(Boolean.FALSE) .help("output the DDL to stdout, don't run it"); subparser.addArgument("-a", "--all") .action(Arguments.storeTrue()) .dest("all") .setDefault(Boolean.FALSE) .help("mark all pending change sets as applied"); subparser.addArgument("-i", "--include") .action(Arguments.append()) .dest("contexts") .help("include change sets from the given context"); }
private ArgumentParser buildParser(JarLocation location) { final String usage = "java -jar " + location; final ArgumentParser p = ArgumentParsers.newFor(usage).addHelp(false).build(); p.version(location.getVersion().orElse( "No application version detected. Add a Implementation-Version " + "entry to your JAR's manifest to enable this.")); addHelp(p); p.addArgument("-v", "--version") .action(Arguments.help()) // never gets called; intercepted in #run .help("show the application version and exit"); return p; }
@Override public void configure(Subparser subparser) { super.configure(subparser); subparser.addArgument("-i", "--include-default") .action(Arguments.storeTrue()) .dest("include-default") .help("Also render the template with the default name"); subparser.addArgument("names").nargs("*"); }