Source:
public static void main(final String[] args) { try { final Arguments arguments = new Arguments(args); configureLogging(arguments.getConsoleLogLevel(), arguments.getFileLogLevel()); LOG.info("Version: {}", arguments.getVersion()); LOG.info("Command line args: {}", Joiner.on(", ").join(args)); LOG.info("Console log level: {}", arguments.getConsoleLogLevel().toString()); LOG.info("Log file log level: {}", arguments.getFileLogLevel().toString()); LOG.info(CliCommand.getPlatformInformation()); LOG.info(arguments.getArgumentLog()); if (arguments.isHelp()) { if (arguments.getHelp().equalsIgnoreCase("LIST_COMMANDS")) { System.out.println(CliCommandFactory.listAllCommands()); } else { System.out.println(CliCommand.getLongHelp(arguments.getHelp())); final CliCommand helpCommand = CliCommandFactory.getCommandExecutor(arguments.getHelp()); helpCommand.printArgumentHelp(arguments); } System.exit(0); } final Ds3Client client = arguments.createClient(); if (!Utils.isVersionSupported(client)) { System.out.println(String.format("ERROR: Minimum Black Pearl supported is %s", Utils.MINIMUM_VERSION_SUPPORTED)); System.exit(2); } final Ds3Provider provider = new Ds3ProviderImpl(client, Ds3ClientHelpers.wrap(client)); final FileUtils fileUtils = new FileUtilsImpl(); final CliCommand command = CliCommandFactory.getCommandExecutor(arguments.getCommand()).withProvider(provider, fileUtils); command.init(arguments); final CommandResponse response = command.render(); System.out.println(response.getMessage()); System.exit(response.getReturnCode()); } catch (final Exception e) { EXCEPTION.handleException(e); System.exit(2); } }

Target:
public static void main(final String[] args) { try { final Properties props = Utils.readProperties(PROPERTY_FILE); final Arguments arguments = new Arguments(args); configureLogging(arguments.getConsoleLogLevel(), arguments.getFileLogLevel()); LOG.info("Version: {}", Utils.getVersion(props)); LOG.info("Build Date: {}", Utils.getBuildDate(props)); LOG.info("Command line args: {}", Joiner.on(", ").join(args)); LOG.info("Console log level: {}", arguments.getConsoleLogLevel().toString()); LOG.info("Log file log level: {}", arguments.getFileLogLevel().toString()); LOG.info(CliCommand.getPlatformInformation()); if(arguments.isHelp()) { printHelp(arguments); System.exit(0); } if (arguments.isPrintVersion()) { printVersion(props); System.exit(0); } try { if (arguments.getCommand() == null) { throw new MissingOptionException(COMMAND.getOpt()); } } catch (final IllegalArgumentException e) { throw new BadArgumentException("Unknown command", e); } final Ds3Client client = ClientFactory.createClient(arguments); if (!Utils.isVersionSupported(client)) { System.out.println(String.format("ERROR: Minimum Black Pearl supported is %s", Utils.MINIMUM_VERSION_SUPPORTED)); System.exit(2); } final Ds3Provider provider = new Ds3ProviderImpl(client, Ds3ClientHelpers.wrap(client)); final FileUtils fileUtils = new FileUtilsImpl(); final CliCommand command = CliCommandFactory.getCommandExecutor(arguments.getCommand()).withProvider(provider, fileUtils); command.init(arguments); final CommandResponse response = command.render(); System.out.println(response.getMessage()); System.exit(response.getReturnCode()); } catch (final Exception e) { EXCEPTION.handleException(e); System.exit(2); } }