Limit spring boot version in grails latest dep tests
Fixes
Fixes
MODIFY
instrumentation/grails-3.0/javaagent/build.gradle.kts
instrumentation/grails-3.0/javaagent/build.gradle.kts
@@ -33,6 +33,9 @@ dependencies {
testLibrary("org.springframework.boot:spring-boot-autoconfigure:$springBootVersion")
testLibrary("org.springframework.boot:spring-boot-starter-tomcat:$springBootVersion")
+
+ latestDepTestLibrary("org.springframework.boot:spring-boot-autoconfigure:2.+")
+ latestDepTestLibrary("org.springframework.boot:spring-boot-starter-tomcat:2.+")
}
// testing-common pulls in groovy 4 and spock as dependencies, exclude them

MODIFY
instrumentation/spring/spring-boot-actuator-autoconfigure-2.0/javaagent/build.gradle.kts
instrumentation/spring/spring-boot-actuator-autoconfigure-2.0/javaagent/build.gradle.kts
@@ -25,6 +25,17 @@ tasks.withType<Test>().configureEach {
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
}
+val latestDepTest = findProperty("testLatestDeps") as Boolean
+
+// spring 6 (spring boot 3) requires java 17
+if (latestDepTest) {
+ otelJava {
+ minJavaVersionSupported.set(JavaVersion.VERSION_17)
+ }
+}
+
+// spring 6 (spring boot 3) uses slf4j 2.0
+if (!latestDepTest) {
configurations.testRuntimeClasspath {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
@@ -32,3 +43,4 @@ configurations.testRuntimeClasspath {
force("org.slf4j:slf4j-api:1.7.36")
}
}
+}

MODIFY
instrumentation/spring/spring-integration-4.1/javaagent/build.gradle.kts
instrumentation/spring/spring-integration-4.1/javaagent/build.gradle.kts
@@ -34,6 +34,8 @@ dependencies {
testImplementation("javax.servlet:javax.servlet-api:3.1.0")
latestDepTestLibrary("org.springframework.integration:spring-integration-core:5.+")
+ latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.+")
+ latestDepTestLibrary("org.springframework.boot:spring-boot-starter:2.+")
}
tasks {

MODIFY
instrumentation/spring/spring-integration-4.1/library/build.gradle.kts
instrumentation/spring/spring-integration-4.1/library/build.gradle.kts
@@ -16,6 +16,8 @@ dependencies {
testLibrary("org.springframework.cloud:spring-cloud-stream-binder-rabbit:2.2.1.RELEASE")
latestDepTestLibrary("org.springframework.integration:spring-integration-core:5.+")
+ latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.+")
+ latestDepTestLibrary("org.springframework.boot:spring-boot-starter:2.+")
}
tasks {

MODIFY
instrumentation/spring/spring-kafka-2.7/javaagent/build.gradle.kts
instrumentation/spring/spring-kafka-2.7/javaagent/build.gradle.kts
@@ -29,6 +29,9 @@ dependencies {
testLibrary("org.springframework.boot:spring-boot-starter:2.5.3")
latestDepTestLibrary("org.springframework.kafka:spring-kafka:2.+")
+ // TODO: temp change, will be reverted in #7271
+ latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.+")
+ latestDepTestLibrary("org.springframework.boot:spring-boot-starter:2.+")
}
testing {

MODIFY
instrumentation/spring/spring-kafka-2.7/library/build.gradle.kts
instrumentation/spring/spring-kafka-2.7/library/build.gradle.kts
@@ -20,6 +20,9 @@ dependencies {
testLibrary("org.springframework.boot:spring-boot-starter:2.5.3")
latestDepTestLibrary("org.springframework.kafka:spring-kafka:2.+")
+ // TODO: temp change, will be reverted in #7271
+ latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.+")
+ latestDepTestLibrary("org.springframework.boot:spring-boot-starter:2.+")
}
configurations.testRuntimeClasspath {

MODIFY
instrumentation/spring/spring-rabbit-1.0/javaagent/build.gradle.kts
instrumentation/spring/spring-rabbit-1.0/javaagent/build.gradle.kts
@@ -21,8 +21,6 @@ dependencies {
testLibrary("org.springframework.amqp:spring-rabbit:2.1.7.RELEASE")
testLibrary("org.springframework.boot:spring-boot-starter-test:1.5.22.RELEASE")
testLibrary("org.springframework.boot:spring-boot-starter:1.5.22.RELEASE")
-
- latestDepTestLibrary("org.springframework.amqp:spring-rabbit:2.+")
}
tasks {
@@ -31,6 +29,17 @@ tasks {
}
}
+val latestDepTest = findProperty("testLatestDeps") as Boolean
+
+// spring 6 requires java 17
+if (latestDepTest) {
+ otelJava {
+ minJavaVersionSupported.set(JavaVersion.VERSION_17)
+ }
+}
+
+// spring 6 uses slf4j 2.0
+if (!latestDepTest) {
configurations.testRuntimeClasspath {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
@@ -38,3 +47,4 @@ configurations.testRuntimeClasspath {
force("org.slf4j:slf4j-api:1.7.36")
}
}
+}

MODIFY
instrumentation/spring/spring-rmi-4.0/javaagent/build.gradle.kts
instrumentation/spring/spring-rmi-4.0/javaagent/build.gradle.kts
@@ -23,6 +23,7 @@ dependencies {
latestDepTestLibrary("org.springframework:spring-context:5.+")
latestDepTestLibrary("org.springframework:spring-aop:5.+")
+ latestDepTestLibrary("org.springframework.boot:spring-boot:2.+")
}
tasks.withType<Test>().configureEach {

MODIFY
instrumentation/spring/spring-web-3.1/library/build.gradle.kts
instrumentation/spring/spring-web-3.1/library/build.gradle.kts
@@ -5,7 +5,8 @@ plugins {
dependencies {
compileOnly("org.springframework:spring-web:3.1.0.RELEASE")
- testImplementation("org.springframework:spring-web:3.1.0.RELEASE")
+ testLibrary("org.springframework:spring-web:3.1.0.RELEASE")
+ latestDepTestLibrary("org.springframework:spring-web:5.+")
testImplementation(project(":testing-common"))
testImplementation("io.opentelemetry:opentelemetry-sdk-testing")

MODIFY
instrumentation/spring/spring-webflux-5.0/javaagent/build.gradle.kts
instrumentation/spring/spring-webflux-5.0/javaagent/build.gradle.kts
@@ -57,6 +57,10 @@ dependencies {
testLibrary("org.springframework.boot:spring-boot-starter-test:2.0.0.RELEASE")
testLibrary("org.springframework.boot:spring-boot-starter-reactor-netty:2.0.0.RELEASE")
testImplementation("org.spockframework:spock-spring:1.1-groovy-2.4")
+
+ latestDepTestLibrary("org.springframework.boot:spring-boot-starter-webflux:2.+")
+ latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.+")
+ latestDepTestLibrary("org.springframework.boot:spring-boot-starter-reactor-netty:2.+")
}
tasks.withType<Test>().configureEach {

MODIFY
instrumentation/spring/spring-webmvc-3.1/javaagent/build.gradle.kts
instrumentation/spring/spring-webmvc-3.1/javaagent/build.gradle.kts
@@ -40,6 +40,10 @@ dependencies {
testLibrary("org.springframework.boot:spring-boot-starter-web:1.5.17.RELEASE")
testLibrary("org.springframework.boot:spring-boot-starter-security:1.5.17.RELEASE")
+ latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:2.+")
+ latestDepTestLibrary("org.springframework.boot:spring-boot-starter-web:2.+")
+ latestDepTestLibrary("org.springframework.boot:spring-boot-starter-security:2.+")
+
testImplementation("org.springframework.security.oauth:spring-security-oauth2:2.0.16.RELEASE")
// For spring security

MODIFY
instrumentation/spring/spring-ws-2.0/javaagent/build.gradle.kts
instrumentation/spring/spring-ws-2.0/javaagent/build.gradle.kts
@@ -38,6 +38,9 @@ dependencies {
testLibrary("org.springframework.boot:spring-boot-starter-web-services:2.0.0.RELEASE")
testLibrary("org.springframework.boot:spring-boot-starter-web:2.0.0.RELEASE")
+ latestDepTestLibrary("org.springframework.boot:spring-boot-starter-web-services:2.+")
+ latestDepTestLibrary("org.springframework.boot:spring-boot-starter-web:2.+")
+
testImplementation("wsdl4j:wsdl4j:1.6.3")
testImplementation("com.sun.xml.messaging.saaj:saaj-impl:1.5.2")
testImplementation("javax.xml.bind:jaxb-api:2.2.11")

Limit spring boot version in grails latest dep tests (#7310)

Fixes #7309 
Fixes #7308