final CommandLine line;
try {
line = parser.parse(options, args);
} catch (ParseException e) {
throw new ParameterProblem("Problem parsing parameters", e);
}
// first, parse out actions
if (line.hasOption(Opts.RUN_OPT_STRING)) {
this.actions.add(Action.RUN);
}
if (line.hasOption(Opts.HELP_OPT_STRING)) {
this.actions.add(Action.HELP);
// don't bother further parsing if help is specified
return;
}
// look for propfile option next and load it up
if (line.hasOption(Opts.PROPFILE_OPT_STRING)) {
this.propertiesPath =
line.getOptionValue(Opts.PROPFILE_OPT_STRING);
try {
this.intakePropertiesFile(this.propertiesPath);
} catch (IOException e) {
throw new ParameterProblem("Failed to load properties file '"+
this.propertiesPath+"'", e);
}
}
// now everything else. Note that these params may override