Example usage for org.apache.commons.cli OptionBuilder withDescription

List of usage examples for org.apache.commons.cli OptionBuilder withDescription

Introduction

In this page you can find the example usage for org.apache.commons.cli OptionBuilder withDescription.

Prototype

public static OptionBuilder withDescription(String newDescription) 

Source Link

Document

The next Option created will have the specified description

Usage

From source file:org.apache.nutch.webui.NutchUiServer.java

private static Options createWebAppOptions() {
    Options options = new Options();
    Option helpOpt = new Option("h", "help", false, "show this help message");
    OptionBuilder.withDescription("Port to run the WebApplication on.");
    OptionBuilder.hasOptionalArg();//from  w  w w .j av a 2  s .  c  o m
    OptionBuilder.withArgName("port number");
    options.addOption(OptionBuilder.create(CMD_PORT));
    options.addOption(helpOpt);
    return options;
}

From source file:org.apache.sqoop.shell.CloneJobFunction.java

@SuppressWarnings("static-access")
public CloneJobFunction() {
    this.addOption(OptionBuilder.withDescription(resourceString(Constants.RES_PROMPT_JOB_ID))
            .withLongOpt(Constants.OPT_JID).isRequired().hasArg().create(Constants.OPT_JID_CHAR));
}

From source file:org.apache.sqoop.shell.CloneLinkFunction.java

@SuppressWarnings("static-access")
public CloneLinkFunction() {
    this.addOption(OptionBuilder.withDescription(resourceString(Constants.RES_PROMPT_LINK_ID))
            .withLongOpt(Constants.OPT_LID).hasArg().isRequired().create(Constants.OPT_LID_CHAR));
}

From source file:org.apache.sqoop.shell.CreateJobFunction.java

@SuppressWarnings("static-access")
public CreateJobFunction() {
    this.addOption(OptionBuilder.withDescription(resourceString(Constants.RES_PROMPT_LINK_ID))
            .withLongOpt(Constants.OPT_FROM).isRequired().hasArg().create(Constants.OPT_FROM_CHAR));
    this.addOption(OptionBuilder.withDescription(resourceString(Constants.RES_PROMPT_LINK_ID))
            .withLongOpt(Constants.OPT_TO).isRequired().hasArg().create(Constants.OPT_TO_CHAR));
}

From source file:org.apache.sqoop.shell.CreateLinkFunction.java

@SuppressWarnings("static-access")
public CreateLinkFunction() {
    this.addOption(OptionBuilder.withDescription(resourceString(Constants.RES_CONNECTOR_ID))
            .withLongOpt(Constants.OPT_CID).isRequired().hasArg().create(Constants.OPT_CID_CHAR));
}

From source file:org.apache.sqoop.shell.CreateRoleFunction.java

@SuppressWarnings("static-access")
public CreateRoleFunction() {
    this.addOption(OptionBuilder.withDescription(resourceString(Constants.RES_PROMPT_ROLE))
            .withLongOpt(Constants.OPT_ROLE).isRequired().hasArg().create(Constants.OPT_ROLE_CHAR));
}

From source file:org.apache.sqoop.shell.DeleteJobFunction.java

@SuppressWarnings("static-access")
public DeleteJobFunction() {
    this.addOption(OptionBuilder.withDescription(resourceString(Constants.RES_PROMPT_JOB_ID))
            .withLongOpt(Constants.OPT_JID).isRequired().hasArg().create(Constants.OPT_JID_CHAR));
}

From source file:org.apache.sqoop.shell.DeleteLinkFunction.java

@SuppressWarnings("static-access")
public DeleteLinkFunction() {
    this.addOption(OptionBuilder.withDescription(resourceString(Constants.RES_PROMPT_LINK_ID))
            .withLongOpt(Constants.OPT_LID).isRequired().hasArg().create(Constants.OPT_LID_CHAR));
}

From source file:org.apache.sqoop.shell.DeleteRoleFunction.java

@SuppressWarnings("static-access")
public DeleteRoleFunction() {
    this.addOption(OptionBuilder.withDescription(resourceString(Constants.RES_PROMPT_ROLE))
            .withLongOpt(Constants.OPT_ROLE).isRequired().hasArg().create(Constants.OPT_ROLE_CHAR));
}

From source file:org.apache.sqoop.shell.DisableJobFunction.java

@SuppressWarnings("static-access")
public DisableJobFunction() {
    this.addOption(OptionBuilder.withDescription(resourceString(Constants.RES_PROMPT_JOB_ID))
            .withLongOpt(Constants.OPT_JID).hasArg().create('j'));
}