Package org.apache.commons.cli2.builder

Examples of org.apache.commons.cli2.builder.GroupBuilder.withOption()


        "Query the status of an NT service or Unix daemon").create());
    gBuilder.withOption(oBuilder.reset().withId(OPTION_Y).withShortName("y").withLongName("tray").withDescription("Start System Tray Icon")
        .create());
    gBuilder.withOption(oBuilder.reset().withId(OPTION_QS).withShortName("qs").withLongName("querysilent").withDescription(
        "Silent Query the status of an NT service or Unix daemon").create());
    gBuilder.withOption(oBuilder.reset().withId(OPTION_QX).withShortName("qx").withLongName("queryposix").withDescription(
        "Query the status of a posix daemon. Return status as exit code").create());

    Argument pid = aBuilder.reset().withName(PID).withDescription("PID of process to reconnect to").withMinimum(1).withMaximum(1).withValidator(
        NumberValidator.getIntegerInstance()).create();
View Full Code Here


        "Query the status of a posix daemon. Return status as exit code").create());

    Argument pid = aBuilder.reset().withName(PID).withDescription("PID of process to reconnect to").withMinimum(1).withMaximum(1).withValidator(
        NumberValidator.getIntegerInstance()).create();

    gBuilder.withOption(oBuilder.reset().withId(OPTION_N).withShortName("n").withLongName("reconnect").withDescription(
        "recoNnect to existing application").withArgument(pid).create());

    Argument pid2 = aBuilder.reset().withName(PID).withDescription("PID of process to reconnect to").withMinimum(1).withMaximum(1).withValidator(
        NumberValidator.getIntegerInstance()).create();
View Full Code Here

     * ).withLongName("genconf").withDescription(
     * "Generate configuration file from pid"
     * ).withArgument(pid2).withChildren(childGbuilder.create()).create());
     */

    gBuilder.withOption(oBuilder.reset().withId(OPTION_D).withShortName("d").withLongName("defaultConf").withDescription(
        "Default Configuration File").withArgument(defaultFile).create());

    gBuilder.withOption(oBuilder.reset().withId(OPTION_G).withShortName("g").withLongName("genconf").withDescription(
        "Generate configuration file from pid").withArgument(pid2).create());

View Full Code Here

     */

    gBuilder.withOption(oBuilder.reset().withId(OPTION_D).withShortName("d").withLongName("defaultConf").withDescription(
        "Default Configuration File").withArgument(defaultFile).create());

    gBuilder.withOption(oBuilder.reset().withId(OPTION_G).withShortName("g").withLongName("genconf").withDescription(
        "Generate configuration file from pid").withArgument(pid2).create());

    FileValidator fValidator = VFSFileValidator.getExistingFileInstance().setBase(".");
    fValidator.setFile(false);
    // fValidator.setReadable(true);
View Full Code Here

        "Generate configuration file from pid").withArgument(pid2).create());

    FileValidator fValidator = VFSFileValidator.getExistingFileInstance().setBase(".");
    fValidator.setFile(false);
    // fValidator.setReadable(true);
    gBuilder.withOption(aBuilder.reset().withName(CONF_FILE).withDescription("is the wrapper.conf to use.  Name must be absolute or relative")
        .withMinimum(0).withMaximum(10).create());

    Validator pValidator = new Validator()
    {
View Full Code Here

        }

      }

    };
    gBuilder.withOption(aBuilder.reset().withName(PROPERTIES).withDescription(
        "are configuration name-value pairs which override values. For example: wrapper.debug=true").withMinimum(0).withValidator(pValidator)
        .create());

    gBuilder.withMaximum(3);
    group = gBuilder.create();
View Full Code Here

   
    GroupBuilder gBuilder = new GroupBuilder().withName("Options").withOption(inputOpt)
        .withOption(tempDirOpt).withOption(outputOpt).withOption(helpOpt).withOption(jarFileOpt);
   
    for (Option opt : extraOpts) {
      gBuilder = gBuilder.withOption(opt);
    }
   
    Group group = gBuilder.create();
   
    CommandLine cmdLine;
View Full Code Here

    addOption("endPhase", null, "Last phase to run", String.valueOf(Integer.MAX_VALUE));

    GroupBuilder gBuilder = new GroupBuilder().withName("Job-Specific Options:");

    for (Option opt : options) {
      gBuilder = gBuilder.withOption(opt);
    }

    Group group = gBuilder.create();

    CommandLine cmdLine;
View Full Code Here

    addOption("endPhase", null, "Last phase to run", String.valueOf(Integer.MAX_VALUE));

    GroupBuilder gBuilder = new GroupBuilder().withName("Job-Specific Options:");

    for (Option opt : options) {
      gBuilder = gBuilder.withOption(opt);
    }

    group = gBuilder.create();

    CommandLine cmdLine;
View Full Code Here

                        .withMinimum(0)
                        .withMaximum(1);
                Iterator iter = commands.iterator();
                while (iter.hasNext()) {
                    CliCommand c = (CliCommand) iter.next();
                    gbuilder.withOption(c.getCommand());
                }
                grpCommands = gbuilder.create();
            } catch (Exception e) {
                log.error("Error while building command group.", e);
                throw new ExecutionException("Error while building command gorup.", e);
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.