@VisibleForTesting
  static void addJvmArgFilesLayer(
      RawConfiguration rawConfiguration,
      ProjectProperties projectProperties,
      JibContainerBuilder jibContainerBuilder,
      String classpath,
      String mainClass)
      throws IOException, InvalidAppRootException {
    Path projectCache = projectProperties.getDefaultCacheDirectory();
    Path classpathFile = projectCache.resolve(JIB_CLASSPATH_FILE);
    Path mainClassFile = projectCache.resolve(JIB_MAIN_CLASS_FILE);

    // It's perfectly fine to always generate a new temp file or rewrite an existing file. However,
    // fixing the source file path and preserving the file timestamp prevents polluting the Jib
    // layer cache space by not creating new cache selectors every time. (Note, however, creating
    // new selectors does not affect correctness at all.)
    writeFileConservatively(classpathFile, classpath);
    writeFileConservatively(mainClassFile, mainClass);

    AbsoluteUnixPath appRoot = getAppRootChecked(rawConfiguration, projectProperties);
    jibContainerBuilder.addFileEntriesLayer(
        FileEntriesLayer.builder()
            .setName(LayerType.JVM_ARG_FILES.getName())
            .addEntry(classpathFile, appRoot.resolve(JIB_CLASSPATH_FILE))
            .addEntry(mainClassFile, appRoot.resolve(JIB_MAIN_CLASS_FILE))
            .build());
  }
Computes the container entrypoint.

<p>Computation occurs in this order:

<ol>
  <li>null (inheriting from the base image), if the user specified value is {@code INHERIT}
  <li>the user specified one, if set
  <li>for a WAR project, null (inheriting) if a custom base image is specified, and {@code
      ["java", "-jar", "/usr/local/jetty/start.jar", "--module=ee10-deploy"]} otherwise
      (default Jetty base image)
  <li>for a non-WAR project, by resolving the main class
</ol>

@param rawConfiguration raw configuration data
@param projectProperties used for providing additional information
@param jibContainerBuilder container builder
@return the entrypoint
@throws MainClassInferenceException if no valid main class is configured or discovered
@throws InvalidAppRootException if {@code appRoot} value is not an absolute Unix path
@throws InvalidContainerizingModeException if {@code containerizingMode} value is invalid
jib-plugins-common/src/main/java/com/google/cloud/tools/jib/plugins/common/PluginConfigurationProcessor.java