Skip to content

[go-migration] Tomcat version enforced based on used java version. #1155

@mshlyukarski

Description

@mshlyukarski

Based on Tomcat Compatibility Matrix, Tomcat version 9x should be able to be used with java versions => 8. This works as expected in the current Ruby based java community buildpack.

Staging logs example:

   -----> Java Buildpack v4.77.0 (offline) | https://github.com/cloudfoundry/java-buildpack.git#1194e2c3
   -----> Downloading Jvmkill Agent 1.17.0_RELEASE from https://java-buildpack.cloudfoundry.org/jvmkill/jammy/x86_64/jvmkill-1.17.0-RELEASE.so (found in cache)
   -----> Downloading Sap Machine JRE 11.0.27_0.0.b0 from https://github.com/SAP/SapMachine/releases/download/sapmachine-11.0.27/sapmachine-jre-11.0.27_linux-x64_bin.tar.gz (found in cache)
   Expanding Sap Machine JRE to .java-buildpack/open_jdk_jre (0.7s)
   JVM DNS caching disabled in lieu of BOSH DNS caching
   -----> Downloading Open JDK Like Memory Calculator 3.13.0_RELEASE from https://java-buildpack.cloudfoundry.org/memory-calculator/jammy/x86_64/memory-calculator-3.13.0-RELEASE.tar.gz (found in cache)
   Loaded Classes: 14797, Threads: 250
   -----> Downloading Client Certificate Mapper 2.0.1 from https://java-buildpack.cloudfoundry.org/client-certificate-mapper/client-certificate-mapper-2.0.1.jar (found in cache)
   -----> Downloading Container Security Provider 1.20.0_RELEASE from https://java-buildpack.cloudfoundry.org/container-security-provider/container-security-provider-1.20.0-RELEASE.jar (found in cache)
   -----> Downloading Tomcat Instance 9.0.104 from https://java-buildpack.cloudfoundry.org/tomcat/tomcat-9.0.104.tar.gz (found in cache)

This does not work in such a way in the go based Java buildpack due to the following check. Consequently, even though the specific version of java is provided in the manifest
For example:

    env:
      JBP_CONFIG_OPEN_JDK_JRE: '{ jre: { version: 11.+ } }'
      JBP_CONFIG_TOMCAT: '{ tomcat: { version: "9.+" } }'

the users are provided with tomcat 10 during staging process:

-----> Supplying Java
   Detected container: Tomcat
   Selected JRE: OpenJDK
   -----> Installing OpenJDK JRE
   Installing OpenJDK 11.0.27
...
-----> Supplying Tomcat
   Using Tomcat 10.x for Java 11
   -----> Installing tomcat 10.1.50
   Copy [/tmp/cache/final/dependencies/cbc74cfe1ac278444e065e5e394774565ba9aabb680b94f523a78af3af41c474/tomcat-10.1.50.tar.gz]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions