Repository: GoogleContainerTools/jib
File: jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/MojoCommon.java (Java)

Code before:
      return Futures.immediateFuture(Optional.empty());
    }
    ExecutorService executorService = Executors.newSingleThreadExecutor();
    try {
      return UpdateChecker.checkForUpdate(
          executorService,
          VERSION_URL,
          projectProperties.getToolName(),
          projectProperties.getToolVersion(),
          projectProperties::log);
    } finally {
      executorService.shutdown();
    }
  }

  static void finishUpdateChecker(
      ProjectProperties projectProperties, Future<Optional<String>> updateCheckFuture) {
    UpdateChecker.finishUpdateCheck(updateCheckFuture)
        .ifPresent(
            latestVersion -> {
              String changelogUrl =
                  ProjectInfo.GITHUB_URL + "/blob/master/jib-maven-plugin/CHANGELOG.md";
              String privacyUrl = ProjectInfo.GITHUB_URL + "/blob/master/docs/privacy.md";
              String message =
                  String.format(
                      "\n\u001B[33mA new version of %s (%s) is available (currently using %s). Update your"
                          + " build configuration to use the latest features and fixes!\n%s.\u001B[0m\n\nPlease see"
                          + " %s for info on disabling this update check.\n",
                      projectProperties.getToolName(),
                      latestVersion,
                      projectProperties.getToolVersion(),
                      changelogUrl,
                      privacyUrl);
              projectProperties.log(LogEvent.lifecycle(message));
            });
  }

  /**
   * Gets the list of extra directory paths from a {@link JibPluginConfiguration}. Returns {@code
   * (project dir)/src/main/jib} by default if not configured.
   *
   * @param jibPluginConfiguration the build configuration
   * @return the list of resolved extra directories
   */
  static List<ExtraDirectoryParameters> getExtraDirectories(
      JibPluginConfiguration jibPluginConfiguration) {
    List<ExtraDirectoryParameters> extraDirectories = jibPluginConfiguration.getExtraDirectories();
    if (!extraDirectories.isEmpty()) {
      for (ExtraDirectoryParameters directory : extraDirectories) {
        if (directory.getFrom().equals(Paths.get(""))) {
          throw new IllegalArgumentException(

Review comment (suggestion):
Sorry, missed this. For Maven, we intentionally use multiple `.log()`s instead of `\n` when we need to start a new line. Not a big deal, but this is because Maven prepends the verbosity info on every line, for example,
```
[INFO] Containerizing application to francium25/test...
```

Code after:
      return Futures.immediateFuture(Optional.empty());
    }
    ExecutorService executorService = Executors.newSingleThreadExecutor();
    try {
      return UpdateChecker.checkForUpdate(
          executorService,
          VERSION_URL,
          projectProperties.getToolName(),
          projectProperties.getToolVersion(),
          projectProperties::log);
    } finally {
      executorService.shutdown();
    }
  }

  static void finishUpdateChecker(
      ProjectProperties projectProperties, Future<Optional<String>> updateCheckFuture) {
    UpdateChecker.finishUpdateCheck(updateCheckFuture)
        .ifPresent(
            latestVersion -> {
              String updateMessage =
                  String.format(
                      "A new version of %s (%s) is available (currently using %s). Update your"
                          + " build configuration to use the latest features and fixes!",
                      projectProperties.getToolName(),
                      latestVersion,
                      projectProperties.getToolVersion());
              String privacyUrl = ProjectInfo.GITHUB_URL + "/blob/master/docs/privacy.md";
              String privacyMessage =
                  String.format(
                      "Please see %s for info on disabling this update check.", privacyUrl);
              projectProperties.log(LogEvent.lifecycle(""));
              projectProperties.log(LogEvent.lifecycle("\u001B[33m" + updateMessage + "\u001B[0m"));
              projectProperties.log(
                  LogEvent.lifecycle(
                      "\u001B[33m"
                          + ProjectInfo.GITHUB_URL
                          + "/blob/master/jib-maven-plugin/CHANGELOG.md\u001B[0m"));
              projectProperties.log(LogEvent.lifecycle(""));
              projectProperties.log(LogEvent.lifecycle(privacyMessage));
              projectProperties.log(LogEvent.lifecycle(""));
            });
  }

  /**
   * Gets the list of extra directory paths from a {@link JibPluginConfiguration}. Returns {@code
   * (project dir)/src/main/jib} by default if not configured.
   *
   * @param jibPluginConfiguration the build configuration
   * @return the list of resolved extra directories
   */