For Spring Framework 5.1, the Groovy dependency was updated to Groovy 2.5. Here's an extract from Groovy's documentation:
2.4.X: The core plus all the modules merged into one "fat jar". Optional dependencies are marked as optional, so you may need to include some of the optional dependencies to use some features of Groovy, e.g. AntBuilder, GroovyMBeans...
2.5+: A "fat pom" groovy-all-x.y.z.pom referring to the core plus all modules (excluding optional ones). In order to cater to the module system of Java 9+, the groovy-all-x.y.z.jar file is no longer available.
In some places (because of issues with Java modularity with the arrival of Java 9) the reference to the groovy-all artifact has been made more focused and replaced with references to individual groovy components (see commit 0092653):
This commit changes the dependency from groovy-all to more focused
dependencies on Groovy in the spring-beans and spring-context
modules. This change seems to avoid the automatic loading of Groovy
enhancements to JAXB (shipped with groovy-xml).
However, there are a few other places where references to groovy-all still occur as an apparent compilation dependency: