private static final Integer BEAKER_SERVER_PORT_OFFSET = 2;
private static CommandLine parseCommandLine(String[] args)
throws ParseException
{
CommandLineParser parser = new GnuParser();
Options opts = new Options();
opts.addOption("h", "help", false, "print this message");
opts.addOption(null, "disable-kerberos", false, "do not require kerberos authentication");
opts.addOption(null, "open-browser", true, "open a web browser connected to the Beaker server");
opts.addOption(null, "port-base", true, "main port number to use, other ports are allocated starting here");
opts.addOption(null, "default-notebook", true, "file name to find default notebook");
opts.addOption(null, "plugin-option", true, "pass option on to plugin");
opts.addOption(null, "public-server", false, "allow connections from external computers");
opts.addOption(null, "no-password", false, "do not require a password from external connections " +
"(warning: for advanced users only!)");
CommandLine line = parser.parse(opts, args);
if (line.hasOption("help")) {
new HelpFormatter().printHelp("beaker.command", opts);
System.exit(0);
}
return line;