Some times you may need to change the Java Buildpack default configuraion, such as JDK, tomcat or Groovy versions; or even the JRE vendor/distribution.
For more details , please see https://github.com/cloudfoundry/java-buildpack#configuration-and-extension
The buildpack default configuration can be overridden with an environment variable matching the configuration file you wish to override minus the .yml
extension and with a prefix of JBP_CONFIG
. Those config files are in the config folder. E.g
It is not possible to add new configuration properties and properties with nil
or empty values will be ignored by the buildpack (in this case you will have to extend the buildpack, see below). The value of the variable should be valid inline yaml, referred to as "flow style" in the yaml spec (Wikipedia has a good description of this yaml syntax). For example, to change the default version of Java to 11 and adjust the memory heuristics apply this environment variable to the application.
$ cf set-env my-application JBP_CONFIG_OPEN_JDK_JRE '{ jre: { version: 11.+ }, memory_calculator: { stack_threads: 25 } }'
For more details, please see https://github.com/cloudfoundry/java-buildpack#configuration-and-extension