public void validate() {
    if (targetImage.startsWith(TAR_IMAGE_PREFIX) && name == null) {
      throw new CommandLine.ParameterException(
          spec.commandLine(),
          "Missing option: --name must be specified when using --target=tar://....");
    }
  }
Validates parameters defined in this class that could not be done declaratively.
jib-cli/src/main/java/com/google/cloud/tools/jib/cli/CommonCliOptions.java