There are two existing situations where a JDK is used as a launch time JRE. These are where a JRE is not available as a dependency and where BP_JRE_TYPE=jdk. Neither of these approaches read the JRE type from the build plan. Therefore, a buildpack cannot programmatically request that a JDK is used instead of a JRE.
Possible Solution
libjvm uses a jreSkipped boolean to allow using a JDK as a JRE. An approach would be to expose jre-skipped: true in the build plan metadata.
Motivation
There are situations where a JDK is needed at runtime. I need to write a buildpack that detects project settings in a slightly strange way (for reasons...). The buildpack requires a jdk implementation (eg: paketo-buildpacks/adoptium or paketo-buildpacks/bellsoft-liberica) and needs to require the jdk at runtime.
Allow specifying a build plan that allows using a JDK as a JRE.
Describe the Enhancement
There are two existing situations where a JDK is used as a launch time JRE. These are where a JRE is not available as a dependency and where
BP_JRE_TYPE=jdk
. Neither of these approaches read the JRE type from the build plan. Therefore, a buildpack cannot programmatically request that a JDK is used instead of a JRE.Possible Solution
libjvm
uses ajreSkipped
boolean to allow using a JDK as a JRE. An approach would be to exposejre-skipped: true
in the build plan metadata.Motivation
There are situations where a JDK is needed at runtime. I need to write a buildpack that detects project settings in a slightly strange way (for reasons...). The buildpack requires a
jdk
implementation (eg:paketo-buildpacks/adoptium
orpaketo-buildpacks/bellsoft-liberica
) and needs to require thejdk
at runtime.