Browse Source

Fix JDK9 build after Groovy 2.5 upgrade

After the Groovy 2.5 upgrade, the Spring Framework build on JDK9 hit
GROOVY-8631. Adding the relevant `jax-api` dependency to the module
didn't fix this issue. The Groovy release notes mention the use of the
`--add-modules` JVM flag, but this is not an option for this build which
should run on JDK8 -> JDK11.

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`).

See:

* http://groovy-lang.org/releasenotes/groovy-2.5.html#Groovy2.5releasenotes-Knownissues
* https://issues.apache.org/jira/browse/GROOVY-8631

Issue: SPR-15407
pull/1848/merge
Brian Clozel 7 years ago
parent
commit
0092653d42
  1. 2
      spring-beans/spring-beans.gradle
  2. 5
      spring-context/spring-context.gradle

2
spring-beans/spring-beans.gradle

@ -6,7 +6,7 @@ dependencies { @@ -6,7 +6,7 @@ dependencies {
compile(project(':spring-core'))
optional("javax.inject:javax.inject:1")
optional("org.yaml:snakeyaml:1.21")
optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
optional("org.codehaus.groovy:groovy-xml:${groovyVersion}")
optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")

5
spring-context/spring-context.gradle

@ -17,12 +17,15 @@ dependencies { @@ -17,12 +17,15 @@ dependencies {
optional("javax.validation:validation-api:1.1.0.Final")
optional("javax.xml.ws:jaxws-api:2.3.0")
optional("org.aspectj:aspectjweaver:${aspectjVersion}")
optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
optional("org.codehaus.groovy:groovy:${groovyVersion}")
optional("org.beanshell:bsh:2.0b5")
optional("joda-time:joda-time:2.10")
optional("org.hibernate:hibernate-validator:5.4.2.Final")
optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
optional("org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}")
testCompile("org.codehaus.groovy:groovy-xml:${groovyVersion}")
testCompile("org.codehaus.groovy:groovy-jsr223:${groovyVersion}")
testCompile("org.codehaus.groovy:groovy-test:${groovyVersion}")
testCompile("org.apache.commons:commons-pool2:2.5.0")
testCompile("javax.inject:javax.inject-tck:1")
testRuntime("javax.xml.bind:jaxb-api:2.3.0")

Loading…
Cancel
Save