Repository: GoogleContainerTools/jib
File: jib-cli/src/main/java/com/google/cloud/tools/jib/cli/jar/JarModeProcessor.java (Java)

Code before:
      if (mainClass == null) {
        throw new IllegalArgumentException(
            "`Main-Class:` attribute for an application main class not defined in the input JAR's "
                + "manifest (`META-INF/MANIFEST.MF` in the JAR).");
      }
      return ImmutableList.of("java", "-jar", APP_ROOT + "/" + jarPath.getFileName().toString());
    }
  }

  /**
   * Computes the entrypoint for a spring boot jar in exploded mode.
   *
   * @return list of {@link String} representing entrypoint
   */
  static ImmutableList<String> computeEntrypointForExplodedSpringBoot() {
    return ImmutableList.of(
        "java", "-cp", APP_ROOT.toString(), "org.springframework.boot.loader.JarLauncher");
  }

  /**
   * Computes the entrypoint for a spring boot jar in packaged mode.
   *
   * @param jarPath path to jar file
   * @return list of {@link String} representing entrypoint
   */
  static ImmutableList<String> computeEntrypointForPackagedSpringboot(Path jarPath) {
    return ImmutableList.of("java", "-jar", APP_ROOT + "/" + jarPath.getFileName().toString());
  }

  private static List<FileEntriesLayer> getDependenciesLayers(Path jarPath, ProcessingMode mode)
      throws IOException {
    // Get dependencies from Class-Path in the jar's manifest and add a layer each for non-snapshot
    // and snapshot dependencies. If Class-Path is not present in the JAR's manifest then skip
    // adding the dependencies layers.
    try (JarFile jarFile = new JarFile(jarPath.toFile())) {
      String classPath =
          jarFile.getManifest().getMainAttributes().getValue(Attributes.Name.CLASS_PATH);
      if (classPath == null) {
        return new ArrayList<>();
      }
      List<FileEntriesLayer> layers = new ArrayList<>();
      Path jarParent = jarPath.getParent() == null ? Paths.get("") : jarPath.getParent();
      Predicate<String> isSnapshot = name -> name.contains("SNAPSHOT");
      List<String> allDependencies = Splitter.onPattern("\\s+").splitToList(classPath.trim());
      List<Path> nonSnapshots =
          allDependencies
              .stream()
              .filter(isSnapshot.negate())
              .map(Paths::get)
              .collect(Collectors.toList());
      List<Path> snapshots =

Review comment (suggestion):
```suggestion
  static ImmutableList<String> computeEntrypointForPackagedSpringBoot(Path jarPath) {
```

Code after:
      if (mainClass == null) {
        throw new IllegalArgumentException(
            "`Main-Class:` attribute for an application main class not defined in the input JAR's "
                + "manifest (`META-INF/MANIFEST.MF` in the JAR).");
      }
      return ImmutableList.of("java", "-jar", APP_ROOT + "/" + jarPath.getFileName().toString());
    }
  }

  /**
   * Computes the entrypoint for a spring boot jar in exploded mode.
   *
   * @return list of {@link String} representing entrypoint
   */
  static ImmutableList<String> computeEntrypointForExplodedSpringBoot() {
    return ImmutableList.of(
        "java", "-cp", APP_ROOT.toString(), "org.springframework.boot.loader.JarLauncher");
  }

  /**
   * Computes the entrypoint for a spring boot jar in packaged mode.
   *
   * @param jarPath path to jar file
   * @return list of {@link String} representing entrypoint
   */
  static ImmutableList<String> computeEntrypointForPackagedSpringBoot(Path jarPath) {
    return ImmutableList.of("java", "-jar", APP_ROOT + "/" + jarPath.getFileName().toString());
  }

  private static List<FileEntriesLayer> getDependenciesLayers(Path jarPath, ProcessingMode mode)
      throws IOException {
    // Get dependencies from Class-Path in the jar's manifest and add a layer each for non-snapshot
    // and snapshot dependencies. If Class-Path is not present in the JAR's manifest then skip
    // adding the dependencies layers.
    try (JarFile jarFile = new JarFile(jarPath.toFile())) {
      String classPath =
          jarFile.getManifest().getMainAttributes().getValue(Attributes.Name.CLASS_PATH);
      if (classPath == null) {
        return new ArrayList<>();
      }
      List<FileEntriesLayer> layers = new ArrayList<>();
      Path jarParent = jarPath.getParent() == null ? Paths.get("") : jarPath.getParent();
      Predicate<String> isSnapshot = name -> name.contains("SNAPSHOT");
      List<String> allDependencies = Splitter.onPattern("\\s+").splitToList(classPath.trim());
      List<Path> nonSnapshots =
          allDependencies
              .stream()
              .filter(isSnapshot.negate())
              .map(Paths::get)
              .collect(Collectors.toList());
      List<Path> snapshots =