use of com.evolveum.midpoint.ninja.impl.Command in project midpoint by Evolveum.
the class NinjaUtils method setupCommandLineParser.
public static JCommander setupCommandLineParser() {
BaseOptions base = new BaseOptions();
ConnectionOptions connection = new ConnectionOptions();
JCommander.Builder builder = JCommander.newBuilder().expandAtSign(false).addObject(base).addObject(connection);
for (Command cmd : Command.values()) {
builder.addCommand(cmd.getCommandName(), cmd.createOptions());
}
JCommander jc = builder.build();
jc.setProgramName("java [-Dloader.path=<jdbc_driver_jar_path>] -jar ninja.jar");
jc.setColumnSize(110);
jc.setAtFileCharset(Charset.forName(base.getCharset()));
return jc;
}
Aggregations