*/
public static void main(String[] args) throws Exception {
String repoLocation = null;
String confLocation = null;
CommandLineOptionParser optionsParser = new CommandLineOptionParser(args);
List invalidOptionsList = optionsParser.getInvalidOptions(new OptionsValidator() {
public boolean isInvalid(CommandLineOption option) {
String optionType = option.getOptionType();
return !("repo".equalsIgnoreCase(optionType) || "conf"
.equalsIgnoreCase(optionType));
}
});
if ((invalidOptionsList.size() > 0) || (args.length > 4)) {
printUsage();
return;
}
Map optionsMap = optionsParser.getAllOptions();
CommandLineOption repoOption = (CommandLineOption) optionsMap
.get("repo");
CommandLineOption confOption = (CommandLineOption) optionsMap
.get("conf");