Package org.apache.commons.cli

Examples of org.apache.commons.cli.OptionBuilder.create()


    protected void addOptionWithParam(String longOption, String shortOption, String argName, String desc) {
        OptionBuilder optionBuilder = OptionBuilder.hasArg().withArgName(argName);
        optionBuilder = optionBuilder.withLongOpt(longOption);
        optionBuilder = optionBuilder.withDescription(desc);
        Option option = optionBuilder.create(shortOption);
        options.addOption(option);
    }

}
View Full Code Here


        optionBuilder = optionBuilder.withLongOpt(ARGUMENT_TARGETS);
        optionBuilder = optionBuilder
                .withDescription("If no targets are provided, the module is distributed to all available "
                        + "targets. Geronimo only provides one target (ever), so this is primarily "
                        + "useful when using a different driver.\n");
        Option option = optionBuilder.create(ARGUMENT_TARGETS_SHORTFORM);
        options.addOption(option);
    }

    protected void addInPlace() {
        options.addOption(ARGUMENT_IN_PLACE_SHORTFORM,
View Full Code Here

    protected void addOptionWithParam(String longOption, String shortOption, String argName, String desc) {
        OptionBuilder optionBuilder = OptionBuilder.hasArg().withArgName(argName);
        optionBuilder = optionBuilder.withLongOpt(longOption);
        optionBuilder = optionBuilder.withDescription(desc);
        Option option = optionBuilder.create(shortOption);
        options.addOption(option);
    }

}
View Full Code Here

    protected void addOptionWithParam(String longOption, String shortOption, String argName, String desc) {
        OptionBuilder optionBuilder = OptionBuilder.hasArg().withArgName(argName);
        optionBuilder = optionBuilder.withLongOpt(longOption);
        optionBuilder = optionBuilder.withDescription(desc);
        Option option = optionBuilder.create(shortOption);
        options.addOption(option);
    }
}
View Full Code Here

                + "var/config/config.xml such that only the modules listed on "
                + "the command line will be started.  Note that many J2EE "
                + "features depend on certain modules being started, so you "
                + "should be very careful what you omit.  Any arguments after "
                + "this are assumed to be module names.");
        Option option = optionBuilder.create(ARGUMENT_MODULE_OVERRIDE_SHORTFORM);
        options.addOption(option);
    }

    protected void addSecure() {
        options.addOption(ARGUMENT_SECURE_SHORTFORM, ARGUMENT_SECURE, false,
View Full Code Here

        OptionBuilder optionBuilder = OptionBuilder.hasArg().withArgName(ARGUMENT_GROUP_ID);
        optionBuilder = optionBuilder.withLongOpt(ARGUMENT_GROUP_ID);
        optionBuilder = optionBuilder
                .withDescription("If a groupId is provided, the library file will be installed under that groupId. "+
                        "Otherwise, default will be used.");
        Option option = optionBuilder.create(ARGUMENT_GROUP_ID_SHORTFORM);
        options.addOption(option);
    }

    public String getGroupId() {
        return commandLine.getOptionValue(ARGUMENT_GROUP_ID_SHORTFORM);
View Full Code Here

        OptionBuilder optionBuilder = OptionBuilder.hasArg().withArgName(ARGUMENT_GROUP_ID);
        optionBuilder = optionBuilder.withLongOpt(ARGUMENT_GROUP_ID);
        optionBuilder = optionBuilder
                .withDescription("If a groupId is provided, the library file will be installed under that groupId. "+
                        "Otherwise, default will be used.");
        Option option = optionBuilder.create(ARGUMENT_GROUP_ID_SHORTFORM);
        options.addOption(option);
    }

    public String getGroupId() {
        return commandLine.getOptionValue(ARGUMENT_GROUP_ID_SHORTFORM);
View Full Code Here

        OptionBuilder optionBuilder = OptionBuilder.hasArg().withArgName(ARGUMENT_GROUP_ID);
        optionBuilder = optionBuilder.withLongOpt(ARGUMENT_GROUP_ID);
        optionBuilder = optionBuilder
                .withDescription("If a groupId is provided, the library file will be installed under that groupId. "+
                        "Otherwise, default will be used.");
        Option option = optionBuilder.create(ARGUMENT_GROUP_ID_SHORTFORM);
        options.addOption(option);
    }

    public String getGroupId() {
        return commandLine.getOptionValue(ARGUMENT_GROUP_ID_SHORTFORM);
View Full Code Here

    protected void addOptionWithParam(String longOption, String shortOption, String argName, String desc) {
        OptionBuilder optionBuilder = OptionBuilder.hasArg().withArgName(argName);
        optionBuilder = optionBuilder.withLongOpt(longOption);
        optionBuilder = optionBuilder.withDescription(desc);
        Option option = optionBuilder.create(shortOption);
        options.addOption(option);
    }

}
View Full Code Here

                + "var/config/config.xml such that only the modules listed on "
                + "the command line will be started.  Note that many J2EE "
                + "features depend on certain modules being started, so you "
                + "should be very careful what you omit.  Any arguments after "
                + "this are assumed to be module names.");
        Option option = optionBuilder.create(ARGUMENT_MODULE_OVERRIDE_SHORTFORM);
        options.addOption(option);
    }
   
    protected void addSecure() {
        options.addOption(ARGUMENT_SECURE_SHORTFORM,
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.