Examples of OptionBuilder


Examples of com.alibaba.antx.util.cli.OptionBuilder

    public static final String OPT_OUTPUT_FILES = "o";
    public static final String OPT_TYPE = "T";
    private Options options;

    public CLIManager() {
        OptionBuilder builder = new OptionBuilder();

        options = new Options();

        options.addOption(builder.withLongOpt("help").withDescription("��ʾ������Ϣ").create(OPT_HELP));

        options.addOption(builder.withLongOpt("include-descriptors").hasArg().withDescription(
                "������Щ���������ļ������磺conf/auto-config.xml����ʹ��*��**��?ͨ��������ж���ö��ŷָ�").create(OPT_INCLUDE_DESCRIPTORS));

        options.addOption(builder.withLongOpt("exclude-descriptors").hasArg().withDescription(
                "�ų���Щ���������ļ�����ʹ��*��**��?ͨ��������ж���ö��ŷָ�").create(OPT_EXCLUDE_DESCRIPTORS));

        options.addOption(builder.withLongOpt("include-packages").hasArg().withDescription(
                "������Щ����ļ������磺target/*.war����ʹ��*��**��?ͨ��������ж���ö��ŷָ�").create(OPT_INCLUDE_PACKAGES));

        options.addOption(builder.withLongOpt("exclude-packages").hasArg().withDescription(
                "�ų���Щ����ļ�����ʹ��*��**��?ͨ��������ж���ö��ŷָ�").create(OPT_EXCLUDE_PACKAGES));

        options.addOption(builder.withLongOpt("interactive").hasOptionalArg().withDescription(
                "����ģʽ��auto|on|off��Ĭ��Ϊauto���޲�����ʾon").create(OPT_INTERACTIVE_MODE));

        options.addOption(builder.withLongOpt("non-interactive").withDescription("�ǽ���ģʽ���൱��--interactive=off").create(
                OPT_NON_INTERACTIVE_MODE));

        options.addOption(builder.withLongOpt("gui").withDescription("ͼ���û����棨����ģʽ��").create(OPT_GUI_MODE));

        options.addOption(builder.withLongOpt("text").withDescription("�ı��û����棨����ģʽ��").create(OPT_TEXT_MODE));

        options.addOption(builder.withLongOpt("verbose").withDescription("��ʾ������Ϣ").create(OPT_VERBOSE));

        options.addOption(builder.withLongOpt("charset").hasArg().withDescription("����/��������ַ���").create(OPT_CHARSET));

        options.addOption(builder.withLongOpt("userprop").hasArg().withDescription("�û������ļ�")
                .create(OPT_USER_PROPERTIES));

        options.addOption(builder.withLongOpt("shared-props").hasArg().withDescription("����������ļ�URL�б��Զ��ŷָ�").create(
                OPT_SHARED_PROPERTIES));

        options.addOption(builder.withLongOpt("shared-props-name").hasArg().withDescription("����������ļ�������").create(
                OPT_SHARED_PROPERTIES_NAME));

        options.addOption(builder.withLongOpt("output").hasArg().withDescription("����ļ�����Ŀ¼��").create(OPT_OUTPUT_FILES));

        options.addOption(builder.withLongOpt("type").hasArg().withDescription("�ļ����ͣ����磺war, jar, ear��").create(
                OPT_TYPE));
    }
View Full Code Here

Examples of com.alibaba.antx.util.cli.OptionBuilder

    public static final String OPT_OVERWRITE = "o";
    public static final String OPT_KEEP_REDUNDANT_FILES = "k";
    private Options options;

    public CLIManager() {
        OptionBuilder builder = new OptionBuilder();

        options = new Options();

        options.addOption(builder.withLongOpt("help").withDescription("��ʾ������Ϣ").create(OPT_HELP));

        options.addOption(builder.withLongOpt("verbose").withDescription("��ʾ������Ϣ").create(OPT_VERBOSE));

        options.addOption(builder.withLongOpt("charset").hasArg().withDescription("����/��������ַ���").create(OPT_CHARSET));

        options.addOption(builder.withLongOpt("expand-war").hasOptionalArg().withDescription("�Ƿ�չ��war��yes|no����Ĭ��Ϊyes")
                .create(OPT_EXPAND_WAR));

        options.addOption(builder.withLongOpt("expand-rar").hasOptionalArg().withDescription("�Ƿ�չ��rar��yes|no����Ĭ��Ϊyes")
                .create(OPT_EXPAND_RAR));

        options.addOption(builder.withLongOpt("expand-ejb-jar").hasOptionalArg().withDescription(
                "�Ƿ�չ��ejb-jar��yes|no����Ĭ��Ϊno").create(OPT_EXPAND_EJB_JAR));

        options.addOption(builder.withLongOpt("overwrite").hasOptionalArg().withDescription(
                "���Ŀ��Ŀ¼�е��ļ���zip�ļ��е���Ҫ�£��Ƿ񸲸�֮��Ĭ��Ϊno").create(OPT_OVERWRITE));

        options.addOption(builder.withLongOpt("keep-redundant-files").hasOptionalArg().withDescription(
                "���Ŀ��Ŀ¼���ж�����ļ����Ƿ񱣳ֶ���ɾ����Ĭ��Ϊno").create(OPT_KEEP_REDUNDANT_FILES));
    }
View Full Code Here

Examples of com.alibaba.antx.util.cli.OptionBuilder

    public static final String OPT_OUTPUT_FILES           = "o";
    public static final String OPT_TYPE                   = "T";
    private Options options;

    public CLIManager() {
        OptionBuilder builder = new OptionBuilder();

        options = new Options();

        options.addOption(builder.withLongOpt("help").withDescription("显示帮助信息").create(OPT_HELP));

        options.addOption(builder.withLongOpt("include-descriptors").hasArg()
                                 .withDescription("包含哪些配置描述文件,例如:conf/auto-config.xml,可使用*、**、?通配符,如有多项,用逗号分隔")
                                 .create(OPT_INCLUDE_DESCRIPTORS));

        options.addOption(builder.withLongOpt("exclude-descriptors").hasArg()
                                 .withDescription("排除哪些配置描述文件,可使用*、**、?通配符,如有多项,用逗号分隔").create(OPT_EXCLUDE_DESCRIPTORS));

        options.addOption(builder.withLongOpt("include-packages").hasArg()
                                 .withDescription("包含哪些打包文件,例如:target/*.war,可使用*、**、?通配符,如有多项,用逗号分隔").create(OPT_INCLUDE_PACKAGES));

        options.addOption(builder.withLongOpt("exclude-packages").hasArg()
                                 .withDescription("排除哪些打包文件,可使用*、**、?通配符,如有多项,用逗号分隔").create(OPT_EXCLUDE_PACKAGES));

        options.addOption(builder.withLongOpt("interactive").hasOptionalArg()
                                 .withDescription("交互模式:auto|on|off,默认为auto,无参数表示on").create(OPT_INTERACTIVE_MODE));

        options.addOption(builder.withLongOpt("non-interactive").withDescription("非交互模式,相当于--interactive=off")
                                 .create(OPT_NON_INTERACTIVE_MODE));

        options.addOption(builder.withLongOpt("gui").withDescription("图形用户界面(交互模式)").create(OPT_GUI_MODE));

        options.addOption(builder.withLongOpt("text").withDescription("文本用户界面(交互模式)").create(OPT_TEXT_MODE));

        options.addOption(builder.withLongOpt("verbose").withDescription("显示更多信息").create(OPT_VERBOSE));

        options.addOption(builder.withLongOpt("charset").hasArg().withDescription("输入/输出编码字符集").create(OPT_CHARSET));

        options.addOption(builder.withLongOpt("userprop").hasArg().withDescription("用户属性文件")
                                 .create(OPT_USER_PROPERTIES));

        options.addOption(builder.withLongOpt("shared-props").hasArg().withDescription("共享的属性文件URL列表,以逗号分隔")
                                 .create(OPT_SHARED_PROPERTIES));

        options.addOption(builder.withLongOpt("shared-props-name").hasArg().withDescription("共享的属性文件的名称")
                                 .create(OPT_SHARED_PROPERTIES_NAME));

        options.addOption(builder.withLongOpt("output").hasArg().withDescription("输出文件名或目录名").create(OPT_OUTPUT_FILES));

        options.addOption(builder.withLongOpt("type").hasArg().withDescription("文件类型,例如:war, jar, ear等")
                                 .create(OPT_TYPE));
    }
View Full Code Here

Examples of com.alibaba.antx.util.cli.OptionBuilder

    public static final String OPT_OVERWRITE            = "o";
    public static final String OPT_KEEP_REDUNDANT_FILES = "k";
    private Options options;

    public CLIManager() {
        OptionBuilder builder = new OptionBuilder();

        options = new Options();

        options.addOption(builder.withLongOpt("help").withDescription("显示帮助信息").create(OPT_HELP));

        options.addOption(builder.withLongOpt("verbose").withDescription("显示更多信息").create(OPT_VERBOSE));

        options.addOption(builder.withLongOpt("charset").hasArg().withDescription("输入/输出编码字符集").create(OPT_CHARSET));

        options.addOption(builder.withLongOpt("expand-war").hasOptionalArg().withDescription("是否展开war(yes|no),默认为yes")
                                 .create(OPT_EXPAND_WAR));

        options.addOption(builder.withLongOpt("expand-rar").hasOptionalArg().withDescription("是否展开rar(yes|no),默认为yes")
                                 .create(OPT_EXPAND_RAR));

        options.addOption(builder.withLongOpt("expand-ejb-jar").hasOptionalArg()
                                 .withDescription("是否展开ejb-jar(yes|no),默认为no").create(OPT_EXPAND_EJB_JAR));

        options.addOption(builder.withLongOpt("overwrite").hasOptionalArg()
                                 .withDescription("如果目标目录中的文件比zip文件中的项要新,是否覆盖之,默认为no").create(OPT_OVERWRITE));

        options.addOption(builder.withLongOpt("keep-redundant-files").hasOptionalArg()
                                 .withDescription("如果目标目录中有多余的文件,是否保持而不删除,默认为no").create(OPT_KEEP_REDUNDANT_FILES));
    }
View Full Code Here

Examples of com.alibaba.antx.util.cli.OptionBuilder

    public static final String OPT_OUTPUT_FILES = "o";
    public static final String OPT_TYPE = "T";
    private Options options;

    public CLIManager() {
        OptionBuilder builder = new OptionBuilder();

        options = new Options();

        options.addOption(builder.withLongOpt("help").withDescription("��ʾ������Ϣ").create(OPT_HELP));

        options.addOption(builder.withLongOpt("include-descriptors").hasArg().withDescription(
                "������Щ���������ļ������磺conf/auto-config.xml����ʹ��*��**��?ͨ��������ж���ö��ŷָ�").create(OPT_INCLUDE_DESCRIPTORS));

        options.addOption(builder.withLongOpt("exclude-descriptors").hasArg().withDescription(
                "�ų���Щ���������ļ�����ʹ��*��**��?ͨ��������ж���ö��ŷָ�").create(OPT_EXCLUDE_DESCRIPTORS));

        options.addOption(builder.withLongOpt("include-packages").hasArg().withDescription(
                "������Щ����ļ������磺target/*.war����ʹ��*��**��?ͨ��������ж���ö��ŷָ�").create(OPT_INCLUDE_PACKAGES));

        options.addOption(builder.withLongOpt("exclude-packages").hasArg().withDescription(
                "�ų���Щ����ļ�����ʹ��*��**��?ͨ��������ж���ö��ŷָ�").create(OPT_EXCLUDE_PACKAGES));

        options.addOption(builder.withLongOpt("interactive").hasOptionalArg().withDescription(
                "����ģʽ��auto|on|off��Ĭ��Ϊauto���޲�����ʾon").create(OPT_INTERACTIVE_MODE));

        options.addOption(builder.withLongOpt("non-interactive").withDescription("�ǽ���ģʽ���൱��--interactive=off").create(
                OPT_NON_INTERACTIVE_MODE));

        options.addOption(builder.withLongOpt("gui").withDescription("ͼ���û����棨����ģʽ��").create(OPT_GUI_MODE));

        options.addOption(builder.withLongOpt("text").withDescription("�ı��û����棨����ģʽ��").create(OPT_TEXT_MODE));

        options.addOption(builder.withLongOpt("verbose").withDescription("��ʾ������Ϣ").create(OPT_VERBOSE));

        options.addOption(builder.withLongOpt("charset").hasArg().withDescription("����/��������ַ���").create(OPT_CHARSET));

        options.addOption(builder.withLongOpt("userprop").hasArg().withDescription("�û������ļ�")
                .create(OPT_USER_PROPERTIES));

        options.addOption(builder.withLongOpt("shared-props").hasArg().withDescription("����������ļ�URL�б��Զ��ŷָ�").create(
                OPT_SHARED_PROPERTIES));

        options.addOption(builder.withLongOpt("shared-props-name").hasArg().withDescription("����������ļ�������").create(
                OPT_SHARED_PROPERTIES_NAME));

        options.addOption(builder.withLongOpt("output").hasArg().withDescription("����ļ�����Ŀ¼��").create(OPT_OUTPUT_FILES));

        options.addOption(builder.withLongOpt("type").hasArg().withDescription("�ļ����ͣ����磺war, jar, ear��").create(
                OPT_TYPE));
    }
View Full Code Here

Examples of com.google.gwt.dom.builder.shared.OptionBuilder

    // Append a child select element to the div.
    SelectBuilder selectBuilder = divBuilder.startSelect();

    // Append three options to the select element.
    for (int i = 0; i < 3; i++) {
      OptionBuilder optionBuilder = selectBuilder.startOption();
      optionBuilder.value("value" + i);
      optionBuilder.text("Option " + i);
      optionBuilder.endOption();
    }

    /*
     * End the select and div elements. Note that ending the remaining elements
     * before calling asElement() below is optional, but a good practice. If we
View Full Code Here

Examples of org.apache.commons.cli.OptionBuilder

                        + "A URI to connect to Geronimo (including optional host and port parameters) has the form: "
                        + "deployer:geronimo:jmx[://host[:port]] (though you could also just use --host and --port instead).");
    }

    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

Examples of org.apache.commons.cli.OptionBuilder

                        + "A URI to connect to Geronimo (including optional host and port parameters) has the form: "
                        + "deployer:geronimo:jmx[://host[:port]] (though you could also just use --host and --port instead).");
    }

    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

Examples of org.apache.commons.cli.OptionBuilder

                        + "This is resolved relative to the geronimo base directory.\n",
                true);
    }
   
    protected void addOverride() {
        OptionBuilder optionBuilder = OptionBuilder.hasArgs().withArgName("moduleId ...");
        optionBuilder = optionBuilder.withLongOpt(ARGUMENT_MODULE_OVERRIDE);
        optionBuilder = optionBuilder.withDescription("USE WITH CAUTION!  Overrides the modules in "
                + "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);
    }
View Full Code Here

Examples of org.apache.commons.cli.OptionBuilder

                        + "A URI to connect to Geronimo (including optional host and port parameters) has the form: "
                        + "deployer:geronimo:jmx[://host[:port]] (though you could also just use --host and --port instead).");
    }

    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
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.