cloudfoundry / java-buildpack

Cloud Foundry buildpack for running Java applications
Apache License 2.0
435 stars 2.58k forks source link

Add Tomcat 10 to the buildpack #1015

Closed azee closed 1 year ago

azee commented 1 year ago

Spring Boot 3 requires Servlet API 5.0.

Tomcat 9+ supports Servlet API 4.0 while Tomcat 10+ supports Servlet API 5.0. We are unable to migrate to Spring Boot 3 as it requires Jakarta Servlet API 5.0 compatible container.

It is a critical issue as Spring boot 2.7+ has vulnerabilities.

Please release a buildpack version with Tomcat 10+.

azee commented 1 year ago

Seems that it could be done via tomcat.version parameter.

dmikusa commented 1 year ago

Yes, Tomcat 10 has been an option for a long time now. It's just not the default.

You just need to tell the buildpack you want Tomcat 10.

env:
  JBP_CONFIG_TOMCAT: '{ tomcat: { version: 8.0.+ } }'

You can see the full list of versions available here.

krismarc commented 8 months ago

Is there any plan to set Tomcat 10 as a default? We relay on offline version of the buildpack and this prevents us from using optional ones.