From dd812a3f76ac27c6c91bab0e02ea08c58ecaddd1 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 18 Mar 2022 12:34:13 +0000 Subject: [PATCH] Upgrade to Groovy 4.0.1 Closes gh-30279 --- .../classpath/CheckClasspathForProhibitedDependencies.java | 3 +++ spring-boot-project/spring-boot-autoconfigure/build.gradle | 2 +- spring-boot-project/spring-boot-cli/build.gradle | 6 +++--- .../src/main/content/legal/open_source_licenses.txt | 4 ++-- .../test/resources/repro-samples/grab-ant-builder.groovy | 3 ++- spring-boot-project/spring-boot-dependencies/build.gradle | 4 ++-- spring-boot-project/spring-boot-docs/build.gradle | 2 +- .../spring-boot-starter-groovy-templates/build.gradle | 2 +- spring-boot-project/spring-boot-test/build.gradle | 4 ++-- spring-boot-project/spring-boot/build.gradle | 4 ++-- 10 files changed, 19 insertions(+), 15 deletions(-) diff --git a/buildSrc/src/main/java/org/springframework/boot/build/classpath/CheckClasspathForProhibitedDependencies.java b/buildSrc/src/main/java/org/springframework/boot/build/classpath/CheckClasspathForProhibitedDependencies.java index f0ea6caa8a..0ea787a4dc 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/classpath/CheckClasspathForProhibitedDependencies.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/classpath/CheckClasspathForProhibitedDependencies.java @@ -76,6 +76,9 @@ public class CheckClasspathForProhibitedDependencies extends DefaultTask { if (group.equals("javax.money")) { return false; } + if (group.equals("org.codehaus.groovy")) { + return true; + } if (group.startsWith("javax")) { return true; } diff --git a/spring-boot-project/spring-boot-autoconfigure/build.gradle b/spring-boot-project/spring-boot-autoconfigure/build.gradle index dc32fef9c3..e252258320 100644 --- a/spring-boot-project/spring-boot-autoconfigure/build.gradle +++ b/spring-boot-project/spring-boot-autoconfigure/build.gradle @@ -67,7 +67,7 @@ dependencies { optional("org.apache.tomcat.embed:tomcat-embed-websocket") optional("org.apache.tomcat:tomcat-jdbc") optional("org.apiguardian:apiguardian-api") - optional("org.codehaus.groovy:groovy-templates") + optional("org.apache.groovy:groovy-templates") optional("com.github.ben-manes.caffeine:caffeine") optional("com.github.mxab.thymeleaf.extras:thymeleaf-extras-data-attribute") optional("com.sendgrid:sendgrid-java") { diff --git a/spring-boot-project/spring-boot-cli/build.gradle b/spring-boot-project/spring-boot-cli/build.gradle index 57bfc18262..6c839203e2 100644 --- a/spring-boot-project/spring-boot-cli/build.gradle +++ b/spring-boot-project/spring-boot-cli/build.gradle @@ -16,7 +16,7 @@ configurations { dependencies { compileOnly(project(":spring-boot-project:spring-boot")) compileOnly("jakarta.servlet:jakarta.servlet-api") - compileOnly("org.codehaus.groovy:groovy-templates") + compileOnly("org.apache.groovy:groovy-templates") compileOnly("org.springframework:spring-web") dependenciesBom(project(path: ":spring-boot-project:spring-boot-dependencies", configuration: "effectiveBom")) @@ -41,7 +41,7 @@ dependencies { implementation("org.apache.maven:maven-settings-builder") { exclude group: "javax.inject", module: "javax.inject" } - implementation("org.codehaus.groovy:groovy") + implementation("org.apache.groovy:groovy") implementation("org.slf4j:slf4j-simple") implementation("org.sonatype.plexus:plexus-sec-dispatcher") implementation("org.sonatype.sisu:sisu-inject-plexus") { @@ -64,7 +64,7 @@ dependencies { testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) testImplementation(project(":spring-boot-project:spring-boot-test")) testImplementation("org.assertj:assertj-core") - testImplementation("org.codehaus.groovy:groovy-templates") + testImplementation("org.apache.groovy:groovy-templates") testImplementation("org.junit.jupiter:junit-jupiter") testImplementation("org.mockito:mockito-core") testImplementation("org.mockito:mockito-junit-jupiter") diff --git a/spring-boot-project/spring-boot-cli/src/main/content/legal/open_source_licenses.txt b/spring-boot-project/spring-boot-cli/src/main/content/legal/open_source_licenses.txt index 82ae3dbe2a..9ef7dcfc99 100644 --- a/spring-boot-project/spring-boot-cli/src/main/content/legal/open_source_licenses.txt +++ b/spring-boot-project/spring-boot-cli/src/main/content/legal/open_source_licenses.txt @@ -43,7 +43,7 @@ SECTION 2: Apache License, V2.0 >>> Plexus Cipher: encryption/decryption Component (org.sonatype.plexus:plexus-cipher) >>> Plexus Security Dispatcher Component (org.sonatype.plexus:plexus-sec-dispatcher) >>> Apache Commons Logging (commons-logging:commons-logging) - >>> Apache Groovy (org.codehaus.groovy:groovy) + >>> Apache Groovy (org.apache.groovy:groovy) >>> Maven Aether Provider (org.apache.maven:maven-aether-provider) >>> Maven Model (org.apache.maven:maven-model) >>> Maven Model Builder (org.apache.maven:maven-model-builder) @@ -178,7 +178,7 @@ Apache License, V2.0 is applicable to the following component(s). >>> org.sonatype.plexus:plexus-cipher >>> org.sonatype.plexus:plexus-sec-dispatcher >>> commons-logging:commons-logging ->>> org.codehaus.groovy:groovy +>>> org.apache.groovy:groovy >>> org.apache.maven:maven-aether-provider >>> org.apache.maven:maven-model >>> org.apache.maven:maven-model-builder diff --git a/spring-boot-project/spring-boot-cli/src/test/resources/repro-samples/grab-ant-builder.groovy b/spring-boot-project/spring-boot-cli/src/test/resources/repro-samples/grab-ant-builder.groovy index d25fa42c4b..75685c56a5 100644 --- a/spring-boot-project/spring-boot-cli/src/test/resources/repro-samples/grab-ant-builder.groovy +++ b/spring-boot-project/spring-boot-cli/src/test/resources/repro-samples/grab-ant-builder.groovy @@ -1,4 +1,5 @@ -@Grab("org.codehaus.groovy:groovy-ant:2.1.6") +@Grab("org.apache.groovy:groovy-ant:4.0.1") +import groovy.ant.AntBuilder @RestController class MainController { diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 8fc561db9d..c46c98e73e 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -284,8 +284,8 @@ bom { ] } } - library("Groovy", "3.0.9") { - group("org.codehaus.groovy") { + library("Groovy", "4.0.1") { + group("org.apache.groovy") { imports = [ "groovy-bom" ] diff --git a/spring-boot-project/spring-boot-docs/build.gradle b/spring-boot-project/spring-boot-docs/build.gradle index 3fc86dbdd9..3449f3d217 100644 --- a/spring-boot-project/spring-boot-docs/build.gradle +++ b/spring-boot-project/spring-boot-docs/build.gradle @@ -102,7 +102,7 @@ dependencies { } implementation("org.apache.tomcat.embed:tomcat-embed-core") implementation("org.assertj:assertj-core") - implementation("org.codehaus.groovy:groovy") + implementation("org.apache.groovy:groovy") implementation("org.hibernate:hibernate-jcache") { exclude group: "javax.activation", module: "javax.activation-api" exclude group: "javax.persistence", module: "javax.persistence-api" diff --git a/spring-boot-project/spring-boot-starters/spring-boot-starter-groovy-templates/build.gradle b/spring-boot-project/spring-boot-starters/spring-boot-starter-groovy-templates/build.gradle index 45bd105672..954ee968af 100644 --- a/spring-boot-project/spring-boot-starters/spring-boot-starter-groovy-templates/build.gradle +++ b/spring-boot-project/spring-boot-starters/spring-boot-starter-groovy-templates/build.gradle @@ -6,5 +6,5 @@ description = "Starter for building MVC web applications using Groovy Templates dependencies { api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web")) - api("org.codehaus.groovy:groovy-templates") + api("org.apache.groovy:groovy-templates") } diff --git a/spring-boot-project/spring-boot-test/build.gradle b/spring-boot-project/spring-boot-test/build.gradle index 1f5ae74c83..542ec2051c 100644 --- a/spring-boot-project/spring-boot-test/build.gradle +++ b/spring-boot-project/spring-boot-test/build.gradle @@ -46,8 +46,8 @@ dependencies { testImplementation("ch.qos.logback:logback-classic") testImplementation("com.squareup.okhttp3:okhttp") testImplementation("org.apache.tomcat.embed:tomcat-embed-core") - testImplementation("org.codehaus.groovy:groovy") - testImplementation("org.codehaus.groovy:groovy-xml") + testImplementation("org.apache.groovy:groovy") + testImplementation("org.apache.groovy:groovy-xml") testImplementation("org.eclipse:yasson") testImplementation("org.junit.jupiter:junit-jupiter") testImplementation("org.mockito:mockito-junit-jupiter") diff --git a/spring-boot-project/spring-boot/build.gradle b/spring-boot-project/spring-boot/build.gradle index 299a2d6b30..0afcf70010 100644 --- a/spring-boot-project/spring-boot/build.gradle +++ b/spring-boot-project/spring-boot/build.gradle @@ -56,8 +56,8 @@ dependencies { optional("org.apache.tomcat.embed:tomcat-embed-jasper") optional("org.apache.tomcat:tomcat-jdbc") optional("org.assertj:assertj-core") - optional("org.codehaus.groovy:groovy") - optional("org.codehaus.groovy:groovy-xml") + optional("org.apache.groovy:groovy") + optional("org.apache.groovy:groovy-xml") optional("org.eclipse.jetty:jetty-servlets") optional("org.eclipse.jetty:jetty-util") optional("org.eclipse.jetty:jetty-webapp") {