Package org.apache.commons.cli

Examples of org.apache.commons.cli.Options.addOption()


  }
 
  protected Options getOptions()
  {
    Options options = new Options();
    options.addOption( new Option("f", "filename", true, "filename to write log to"));
    return options;
  }
 
  public void execute(String commandName, final ConsoleInput ci, CommandLine commandLine)
  {
View Full Code Here


    if (args==null)
      return null;
   
    CommandLineParser parser = new PosixParser();
    Options options = new Options();
    options.addOption("h", "help", false, "Show this help.");
    OptionBuilder.withLongOpt("exec");
    OptionBuilder.hasArg();
    OptionBuilder.withArgName("file");
    OptionBuilder.withDescription("Execute script file. The file should end with 'logout', otherwise the parser thread doesn't stop.");
View Full Code Here

    OptionBuilder.withLongOpt("exec");
    OptionBuilder.hasArg();
    OptionBuilder.withArgName("file");
    OptionBuilder.withDescription("Execute script file. The file should end with 'logout', otherwise the parser thread doesn't stop.");
    options.addOption( OptionBuilder.create('e'));
   
    OptionBuilder.withLongOpt("command");
    OptionBuilder.hasArg();
    OptionBuilder.withArgName("command");
    OptionBuilder.withDescription("Execute single script command. Try '-c help' for help on commands.");
View Full Code Here

   
    OptionBuilder.withLongOpt("command");
    OptionBuilder.hasArg();
    OptionBuilder.withArgName("command");
    OptionBuilder.withDescription("Execute single script command. Try '-c help' for help on commands.");
    options.addOption(OptionBuilder.create('c'));
   
    OptionBuilder.withLongOpt("ui");
    OptionBuilder.withDescription("Run <uis>. ',' separated list of user interfaces to run. The first one given will respond to requests without determinable source UI (e.g. further torrents added via command line).");
    OptionBuilder.withArgName("uis");
    OptionBuilder.hasArg();
View Full Code Here

   
    OptionBuilder.withLongOpt("ui");
    OptionBuilder.withDescription("Run <uis>. ',' separated list of user interfaces to run. The first one given will respond to requests without determinable source UI (e.g. further torrents added via command line).");
    OptionBuilder.withArgName("uis");
    OptionBuilder.hasArg();
    options.addOption(OptionBuilder.create('u'));
   
    CommandLine commands = null;
    try {
      commands = parser.parse(options, args, true);
    } catch( ParseException exp ) {
View Full Code Here

    Option helpOption = new Option("h", "help", false, "print this help");
    Option serverURLOption = new Option("s", "serverURL", true,
        "URL of Sesame server to connect to, e.g. http://localhost/openrdf-sesame/ (required)");
    Option keyOption = new Option("k", "shutdownKey", true, "Key to shut down server");

    options.addOption(helpOption);
    options.addOption(serverURLOption);
    options.addOption(keyOption);

    CommandLineParser argsParser = new PosixParser();
View Full Code Here

    Option serverURLOption = new Option("s", "serverURL", true,
        "URL of Sesame server to connect to, e.g. http://localhost/openrdf-sesame/ (required)");
    Option keyOption = new Option("k", "shutdownKey", true, "Key to shut down server");

    options.addOption(helpOption);
    options.addOption(serverURLOption);
    options.addOption(keyOption);

    CommandLineParser argsParser = new PosixParser();

    try {
View Full Code Here

        "URL of Sesame server to connect to, e.g. http://localhost/openrdf-sesame/ (required)");
    Option keyOption = new Option("k", "shutdownKey", true, "Key to shut down server");

    options.addOption(helpOption);
    options.addOption(serverURLOption);
    options.addOption(keyOption);

    CommandLineParser argsParser = new PosixParser();

    try {
      CommandLine commandLine = argsParser.parse(options, args);
View Full Code Here

    }
  }

  private static Options createCliOptions() {
    Options options = new Options();
    options.addOption(helpOption);
    options.addOption(versionOption);
    options.addOption(dirOption);
    options.addOption(portOption);
    options.addOption(sslPortOption);
    options.addOption(maxAgeOption);
View Full Code Here

  }

  private static Options createCliOptions() {
    Options options = new Options();
    options.addOption(helpOption);
    options.addOption(versionOption);
    options.addOption(dirOption);
    options.addOption(portOption);
    options.addOption(sslPortOption);
    options.addOption(maxAgeOption);
    options.addOption(keyOption);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.