@Override
  public int handleParseException(ParameterException exception, String[] args) {
    CommandLine command = exception.getCommandLine();
    PrintWriter writer = command.getErr();

    // Print error message
    writer.println(exception.getMessage());
    CommandLine.UnmatchedArgumentException.printSuggestions(exception, writer);
    writer.print(command.getHelp().fullSynopsis());

    CommandSpec commandSpec = command.getCommandSpec();
    writer.printf("Run '%s --help' for more information on usage.%n", commandSpec.qualifiedName());
    return command.getExitCodeExceptionMapper() != null
        ? command.getExitCodeExceptionMapper().getExitCode(exception)
        : commandSpec.exitCodeOnInvalidInput();
  }
Class to print a short error message when an invalid input is passed in.
jib-cli/src/main/java/com/google/cloud/tools/jib/cli/ShortErrorMessageHandler.java