Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some Spring Framework modules still reference groovy-all artifact [SPR-17446] #21978

spring-projects-issues opened this issue Oct 30, 2018 · 0 comments
type: task


Copy link

@spring-projects-issues spring-projects-issues commented Oct 30, 2018

Ian Young opened SPR-17446 and commented

For Spring Framework 5.1, the Groovy dependency was updated to Groovy 2.5. Here's an extract from Groovy's documentation:

Packaging Scheme:
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:

$ grep -r "groovy-all" *
spring-test/spring-test.gradle:	optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
spring-tx/spring-tx.gradle:	testCompile("org.codehaus.groovy:groovy-all:${groovyVersion}")
spring-web/spring-web.gradle:	optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
spring-webmvc/spring-webmvc.gradle:	optional("org.codehaus.groovy:groovy-all:${groovyVersion}")

These don't cause issues at run time because the dependency on the groovy-all artifact (which no longer exists, as it has become essentially a BOM) is optional.

They do cause issues if you try to recursively resolve the dependencies of an application using Spring Framework using Maven, because it goes looking for the artifact that no longer exists.

The right fix for this, I think, would be to replace those references to groovy-all to instead reference the components of Groovy that each module actually (optionally?) requires.

Affects: 5.1.2

Referenced from: commits f65408f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
type: task
None yet

No branches or pull requests

2 participants