Package org.apache.commons.cli

Examples of org.apache.commons.cli.Option


        .withValueSeparator()
        .withDescription("use hadoop value for given property")
        .create('D'));

    // [-h|--help]
    options.addOption(new Option("h", "help", false, "Print help information"));

    Parser parser = new GnuParser();
    CommandLine cmdLine = null;

    try {
View Full Code Here


  }
 
  @SuppressWarnings("static-access")
  private int parseArgs(String[] args) {
    Options opts = new Options();
    Option logFiles = OptionBuilder.withArgName(ACTIONS)
    .hasArg()
    .withDescription(
        "disposition of unrecovered region server logs: {abort|ignore|delete|prompt}")
    .create("logfiles");

    Option extraFiles = OptionBuilder.withArgName(ACTIONS)
    .hasArg()
    .withDescription("disposition of 'extra' files: {abort|ignore|delete|prompt}")
    .create("extrafiles");
   
    opts.addOption(logFiles);
View Full Code Here

    private String[] args;

    public AssemblerCLI(String[] args) {
        this.args = args;
        options = new Options();
        Option destination =
            new Option("d" , "destination", true,
                       "specify where the resulting webapp should be written ");
        destination.setArgName("file");

        Option debug =
            new Option("debug", false, "print debug information.");
        options.addOption(destination);
        options.addOption(debug);
    }
View Full Code Here

    private boolean shouldForce;
    private boolean shouldFormat;
    private boolean shouldPrintHelp;

    CommandLineOpts() {
      geteditsizeOpt = new Option("geteditsize",
        "return the number of uncheckpointed transactions on the NameNode");
      checkpointOpt = OptionBuilder.withArgName("force")
        .hasOptionalArg().withDescription("checkpoint on startup").create("checkpoint");;
      formatOpt = new Option("format", "format the local storage during startup");
      helpOpt = new Option("h", "help", false, "get help information");
     
      options.addOption(geteditsizeOpt);
      options.addOption(checkpointOpt);
      options.addOption(formatOpt);
      options.addOption(helpOpt);
View Full Code Here

    }

    @Override
    @SuppressWarnings("static-access")
    public void addOption(final Options options) {
        final Option option = OptionBuilder.withArgName("name").hasArg().withLongOpt(TYPE_LONG_OPT).withDescription("deployment type: " + types).create(TYPE_OPT);
        options.addOption(option);
    }
View Full Code Here

    }

    @Override
    @SuppressWarnings("static-access")
    public void addOption(final Options options) {
        final Option option = OptionBuilder.withArgName("class name").hasArg().withLongOpt(FIXTURE_LONG_OPT).withDescription("fully qualified fixture class").create(FIXTURE_OPT);
        options.addOption(option);
    }
View Full Code Here

    }

    @Override
    @SuppressWarnings("static-access")
    public void addOption(final Options options) {
        final Option option = OptionBuilder.withArgName("password").hasArg().withLongOpt(PASSWORD_LONG_OPT).withDescription("password to automatically log in with").create(PASSWORD_OPT);
        options.addOption(option);
    }
View Full Code Here

    private String configurationResource;

    @Override
    @SuppressWarnings("static-access")
    public void addOption(final Options options) {
        final Option option = OptionBuilder.withArgName("config file").hasArg().withLongOpt(CONFIGURATION_LONG_OPT).withDescription("read in configuration file (as well as isis.properties)").create(CONFIGURATION_OPT);
        options.addOption(option);
    }
View Full Code Here

    @Override
    @SuppressWarnings("static-access")
    public void addOption(final Options options) {
        final Object[] reflectors = installerRepository.getInstallers(ObjectReflectorInstaller.class);
        final Option option = OptionBuilder.withArgName("name|class name").hasArg().withLongOpt(REFLECTOR_LONG_OPT).withDescription("reflector to use (ignored if type is prototype or client): " + availableInstallers(reflectors) + "; or class name").create(REFLECTOR_OPT);
        options.addOption(option);

    }
View Full Code Here

    }

    @Override
    @SuppressWarnings("static-access")
    public void addOption(final Options options) {
        final Option option = OptionBuilder.withArgName("user name").hasArg().withLongOpt(USER_LONG_OPT).withDescription("user name to log in with").create(USER_OPT);
        options.addOption(option);

    }
View Full Code Here

TOP

Related Classes of org.apache.commons.cli.Option

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.