Search code examples
javaspring-boottomcatjettyembedded-jetty

Why does spring-boot-starter-jetty depend on tomcat-embed-el?


We are using Spring-Boot (2.7.x) with Jetty. Our dependency scanner told us, that we still have Tomcat dependencies in our dependency tree.

When looking at the POM for spring-boot-starter-jetty 2.7.1 I found out that spring-boot-starter-jetty depends on tomcat-embed-el. The tomcat-embed-el contains classes from the javax.el and org.apache.el package, so I thinks this is an/the Expression-Language-Parser implementation for Tomcat?

Anybody knows why? I downloaded the same version of Standalone-Jetty and it doesn't have this tomcat library.

See here for the dependencies https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-jetty/2.7.1


Solution

  • In Spring Boot 2.5 the decision has been made to unify the EL implementation to the Apache one (See this issue).

    Hence all containers now depend on the tomcat-embed-el as that is the Apache implementation (and regular API) for the Javax EL. Hence Jetty (and Undertow as well) have this small dependency on a Tomcat jar.