From 79754e7d20cca2881092883b9923fe8296a58c6f Mon Sep 17 00:00:00 2001 From: James Fredley Date: Fri, 13 Dec 2024 19:05:59 -0500 Subject: [PATCH 1/9] initial changes for grails 7 --- build.gradle | 18 +++---- buildSrc/build.gradle | 6 +-- buildSrc/gradle.properties | 4 +- gradle.properties | 12 +++-- gradle/wrapper/gradle-wrapper.properties | 2 +- resources/doc.properties | 10 ++-- src/en/guide/REST/callingRestServices.adoc | 5 +- .../REST/renderers/objectMarshallers.adoc | 2 +- src/en/guide/commandLine.adoc | 1 - src/en/guide/commandLine/creatingProject.adoc | 2 +- .../gradleBuild/gradleDependencies.adoc | 4 +- src/en/guide/commandLine/interactiveMode.adoc | 3 +- ...adoc => supportedJakartaEEContainers.adoc} | 0 .../mappingWithHibernateAnnotations.adoc | 6 +-- src/en/guide/index.adoc | 6 +-- src/en/guide/introduction/whatsNew.adoc | 12 ++--- .../whatsNew/dependencyUpgrades.adoc | 16 +++--- src/en/guide/links.yml | 2 +- .../controllers/controllersAndScopes.adoc | 8 +-- .../controllers/redirectsAndChaining.adoc | 2 +- src/en/guide/theWebLayer/taglibs.adoc | 2 +- src/en/guide/toc.yml | 2 +- src/en/guide/upgrading/upgrading60x.adoc | 51 ++++++++++--------- src/en/ref/Command Line/create-app.adoc | 2 +- src/en/ref/Command Line/create-plugin.adoc | 2 +- src/en/ref/Command Line/create-restapi.adoc | 2 +- .../ref/Command Line/create-web-plugin.adoc | 2 +- src/en/ref/Command Line/help.adoc | 2 +- src/en/ref/Command Line/list-features.adoc | 1 - src/en/ref/Controllers/request.adoc | 4 +- src/en/ref/Controllers/response.adoc | 4 +- src/en/ref/Controllers/servletContext.adoc | 4 +- src/en/ref/Controllers/session.adoc | 4 +- .../ref/Dependency Versions/Grails BOM.adoc | 22 ++------ src/en/ref/Servlet API/request.adoc | 6 +-- src/en/ref/Servlet API/response.adoc | 4 +- src/en/ref/Servlet API/servletContext.adoc | 6 +-- src/en/ref/Servlet API/session.adoc | 6 +-- 38 files changed, 111 insertions(+), 136 deletions(-) rename src/en/guide/gettingStarted/{supportedJavaEEContainers.adoc => supportedJakartaEEContainers.adoc} (100%) diff --git a/build.gradle b/build.gradle index 73e60a9da80..5c8b145babe 100644 --- a/build.gradle +++ b/build.gradle @@ -9,6 +9,8 @@ repositories { maven { url = "https://repo.grails.org/grails/core" } } +compileJava.options.release = 17 + import org.apache.tools.ant.taskdefs.condition.Os version = project.findProperty("grails.version") @@ -39,10 +41,10 @@ configurations { gdoc2asciidoc { apiLinks = ['org.hibernate' : 'https://docs.jboss.org/hibernate/orm/current/javadocs/', - 'org.springframework.boot' : 'https://docs.spring.io/spring-boot/docs/2.5.2/api', - 'org.springframework' : 'https://docs.spring.io/spring/docs/5.3.8/javadoc-api/', - 'javax.servlet' : 'https://docs.oracle.com/javaee/1.4/api/', - 'java.' : 'https://docs.oracle.com/javase/6/docs/api/', + 'org.springframework.boot' : "https://docs.spring.io/spring-boot/docs/$springBootVersion/api", + 'org.springframework' : "https://docs.spring.io/spring/docs/$springVersion/javadoc-api/", + 'jakarta.servlet' : 'https://jakarta.ee/specifications/servlet/6.0/', + 'java.' : 'https://docs.oracle.com/en/java/javase/17/docs/api/', 'groovy.' : 'https://docs.groovy-lang.org/docs/latest/html/api/', 'org.codehaus.groovy.grails': "https://docs.grails.org/$githubBranch/api", 'grails.orm.' : 'https://gorm.grails.org/latest/api', @@ -161,7 +163,7 @@ tasks.register('publishGuide', grails.doc.gradle.PublishGuide) { propertiesFiles = [new File(projectDir, "gradle.properties")] asciidoc = true properties = [ - 'javaee' : "https://docs.oracle.com/javaee/7/api/", + 'jakartaee' : "https://jakarta.ee/specifications/platform/10/apidocs/", 'javase' : "https://docs.oracle.com/en/java/javase/17/docs/api/", 'groovyapi' : "https://docs.groovy-lang.org/${groovyVersion}/html/gapi/", 'springapi' : "https://docs.spring.io/spring/docs/${springVersion}/javadoc-api/", @@ -217,8 +219,4 @@ artifacts { archives dist } -java { - toolchain { - languageVersion = JavaLanguageVersion.of(17) - } -} +compileJava.options.release = 17 diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 4d9c767100b..a3ca1146fa0 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -6,11 +6,7 @@ repositories { maven { url = "https://repo.grails.org/grails/core" } } -java { - toolchain { - languageVersion = JavaLanguageVersion.of(17) - } -} +compileJava.options.release = 17 configurations { configureEach { diff --git a/buildSrc/gradle.properties b/buildSrc/gradle.properties index 5decd8c1f45..f931f59fa03 100644 --- a/buildSrc/gradle.properties +++ b/buildSrc/gradle.properties @@ -1,2 +1,4 @@ -groovyVersion=4.0.22 +groovyVersion=4.0.24 + +# This references grails-core/grails-docs grailsDocsVersion=7.0.0-SNAPSHOT \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 9d57d5b0a9e..8a7ff8c21e9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,12 +1,16 @@ grails.version=7.0.0-SNAPSHOT + githubSlug=grails/grails-doc githubBranch=7.0.x -springBootVersion=3.2.6 -springVersion=6.1.8 -gradleVersion=8.10 +springBootVersion=3.4.0 +springVersion=6.2.1 +gradleVersion=8.11.1 gormVersion=9.0.0-SNAPSHOT -groovyVersion=4.0.22 +groovyVersion=4.0.24 gspVersion=7.0.0-SNAPSHOT + +grailsGdocVersion=1.0.1 + org.gradle.caching=true org.gradle.daemon=true org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1536M -XX:MaxMetaspaceSize=768M diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9355b415575..e2847c82004 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/resources/doc.properties b/resources/doc.properties index c20fdcd943c..50e52dfa2a4 100644 --- a/resources/doc.properties +++ b/resources/doc.properties @@ -82,12 +82,12 @@ alias.urlmappings=6.4 URL Mappings alias.validation=7. Validation alias.XML=6.1.7 XML and JSON Responses -# javadoc alias used to link to external javadocs in the form [HttpServletRequest|api:javax.servlet.http.HttpServletRequest] +# javadoc alias used to link to external javadocs in the form [HttpServletRequest|api:jakarta.servlet.http.HttpServletRequest] api.org.hibernate=https://docs.jboss.org/hibernate/orm/current/javadocs/ -api.org.springframework.boot=http://docs.spring.io/spring-boot/docs/current/api -api.org.springframework=https://docs.spring.io/spring/docs/current/javadoc-api/ -api.javax.servlet=https://docs.oracle.com/javaee/7/api/ -api.java.=https://docs.oracle.com/javase/11/docs/api/ +api.org.springframework.boot=https://docs.spring.io/spring-boot/api/java/index.html +api.org.springframework=https://docs.spring.io/spring-framework/docs/current/javadoc-api/ +api.jakarta.servlet=https://jakarta.ee/specifications/platform/10/apidocs/ +api.java.=https://docs.oracle.com/en/java/javase/17/docs/api/ api.groovy.=http://docs.groovy-lang.org/docs/latest/html/api api.org.codehaus.groovy.grails=http://docs.grails.org/latest/api/ api.grails.orm.=http://gorm.grails.org/latest/hibernate/api diff --git a/src/en/guide/REST/callingRestServices.adoc b/src/en/guide/REST/callingRestServices.adoc index c2269b0eb9b..d3e2bb41769 100644 --- a/src/en/guide/REST/callingRestServices.adoc +++ b/src/en/guide/REST/callingRestServices.adoc @@ -1,11 +1,12 @@ Calling Grails REST services - as well as third-party services - is very straightforward using the https://docs.micronaut.io/latest/guide/index.html#httpClient[Micronaut HTTP Client]. This HTTP client has both a low-level API and a higher level AOP-driven API, making it useful for both simple requests as well as building declarative, type-safe API layers. -To use the Micronaut HTTP client you must have the `micronaut-http-client` dependency on your classpath. Add the following dependency to your `build.gradle` file. +To use the Micronaut HTTP client you must have the `micronaut-http-client` and `micronaut-serde-jackson` dependencies on your classpath. Add the following dependency to your `build.gradle` file. .build.gradle [source,groovy] ---- -implementation 'io.micronaut:micronaut-http-client' +implementation "io.micronaut:micronaut-http-client:4.6.6" +implementation "io.micronaut.serde:micronaut-serde-jackson:2.11.0" ---- ==== Low-level API diff --git a/src/en/guide/REST/renderers/objectMarshallers.adoc b/src/en/guide/REST/renderers/objectMarshallers.adoc index ad31662b38c..269415420f2 100644 --- a/src/en/guide/REST/renderers/objectMarshallers.adoc +++ b/src/en/guide/REST/renderers/objectMarshallers.adoc @@ -41,7 +41,7 @@ Note that if you have many custom marshallers it is recommended you split the re ---- class CustomMarshallerRegistrar { - @javax.annotation.PostConstruct + @jakarta.annotation.PostConstruct void registerMarshallers() { JSON.registerObjectMarshaller(DateTime) { return it?.toString("yyyy-MM-dd'T'HH:mm:ss'Z'") diff --git a/src/en/guide/commandLine.adoc b/src/en/guide/commandLine.adoc index 868f83c5d05..64c57871e1a 100644 --- a/src/en/guide/commandLine.adoc +++ b/src/en/guide/commandLine.adoc @@ -57,7 +57,6 @@ features: - grails-web-testing-support - h2 - logback - - micronaut-inject-groovy - readme - scaffolding - spock diff --git a/src/en/guide/commandLine/creatingProject.adoc b/src/en/guide/commandLine/creatingProject.adoc index c203eae80b6..62bdfcb56b6 100644 --- a/src/en/guide/commandLine/creatingProject.adoc +++ b/src/en/guide/commandLine/creatingProject.adoc @@ -142,7 +142,7 @@ mongodb, neo4j. ---- | -f, --features -| The features to use. Possible values: h2, gorm-hibernate5, spring-boot-starter-jetty, springloaded, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, micronaut-inject-groovy, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, views-json, gorm-neo4j, asciidoctor, embedded-mongodb, grails-web-console, logbackGroovy, mongo-sync, shade, properties +| The features to use. Possible values: h2, gorm-hibernate5, spring-boot-starter-jetty, springloaded, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, views-json, gorm-neo4j, asciidoctor, embedded-mongodb, grails-web-console, logbackGroovy, mongo-sync, shade, properties | [source,shell] ---- diff --git a/src/en/guide/commandLine/gradleBuild/gradleDependencies.adoc b/src/en/guide/commandLine/gradleBuild/gradleDependencies.adoc index ee85db59ca2..642bdeb7b90 100644 --- a/src/en/guide/commandLine/gradleBuild/gradleDependencies.adoc +++ b/src/en/guide/commandLine/gradleBuild/gradleDependencies.adoc @@ -24,15 +24,13 @@ dependencies { implementation("org.springframework.boot:spring-boot-starter-logging") implementation("org.springframework.boot:spring-boot-starter-tomcat") implementation("org.springframework.boot:spring-boot-starter-validation") - compileOnly("io.micronaut:micronaut-inject-groovy") console("org.grails:grails-console") runtimeOnly("com.bertramlabs.plugins:asset-pipeline-grails:4.3.0") runtimeOnly("com.h2database:h2") - runtimeOnly("javax.xml.bind:jaxb-api:2.3.1") + runtimeOnly("jakarta.xml.bind:jakarta.xml.bind-api:4.0.2") runtimeOnly("org.apache.tomcat:tomcat-jdbc") runtimeOnly("org.fusesource.jansi:jansi:1.18") runtimeOnly("org.glassfish.web:el-impl:2.2.1-b05") - testImplementation("io.micronaut:micronaut-inject-groovy") testImplementation("org.grails:grails-gorm-testing-support") testImplementation("org.grails:grails-web-testing-support") testImplementation("org.grails.plugins:geb") diff --git a/src/en/guide/commandLine/interactiveMode.adoc b/src/en/guide/commandLine/interactiveMode.adoc index a7436b57400..1ec5bd4ae51 100644 --- a/src/en/guide/commandLine/interactiveMode.adoc +++ b/src/en/guide/commandLine/interactiveMode.adoc @@ -25,7 +25,7 @@ Creates an application spring-boot-starter-jetty, springloaded, spring-boot-starter-tomcat, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, - assertj, mockito, spring-boot-starter-undertow, micronaut-inject-groovy, + assertj, mockito, spring-boot-starter-undertow, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, asset-pipeline-grails, views-json, gorm-neo4j, asciidoctor, embedded-mongodb, grails-web-console, @@ -100,7 +100,6 @@ Available Features Other geb (+) This plugins configure Geb for Grails framework to write automation tests. grails-console (+) Starts the Grails console, which is an extended version of the regular Groovy console. - micronaut-inject-groovy (+) micronaut-inject-groovy scaffolding (+) The GrailsĀ® framework Scaffolding plugin replicates much of the functionality from Grails 2, but uses the fields plugin instead. Packaging diff --git a/src/en/guide/gettingStarted/supportedJavaEEContainers.adoc b/src/en/guide/gettingStarted/supportedJakartaEEContainers.adoc similarity index 100% rename from src/en/guide/gettingStarted/supportedJavaEEContainers.adoc rename to src/en/guide/gettingStarted/supportedJakartaEEContainers.adoc diff --git a/src/en/guide/hibernate/mappingWithHibernateAnnotations.adoc b/src/en/guide/hibernate/mappingWithHibernateAnnotations.adoc index 890238a9105..813e35a96cd 100644 --- a/src/en/guide/hibernate/mappingWithHibernateAnnotations.adoc +++ b/src/en/guide/hibernate/mappingWithHibernateAnnotations.adoc @@ -4,9 +4,9 @@ To map a domain class with annotations, create a new class in `src/main/groovy/` ---- package com.books; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; @Entity public class Book { diff --git a/src/en/guide/index.adoc b/src/en/guide/index.adoc index b4ec613e10f..7e4cc29fbc4 100644 --- a/src/en/guide/index.adoc +++ b/src/en/guide/index.adoc @@ -73,10 +73,10 @@ include::gettingStarted/testingAnApplication.adoc[] include::gettingStarted/deployingAnApplication.adoc[] -[[supportedJavaEEContainers]] -=== Supported Java EE Containers +[[supportedJakartaEEContainers]] +=== Supported Jakarta EE Containers -include::gettingStarted/supportedJavaEEContainers.adoc[] +include::gettingStarted/supportedJakartaEEContainers.adoc[] [[creatingArtefacts]] === Creating Artefacts diff --git a/src/en/guide/introduction/whatsNew.adoc b/src/en/guide/introduction/whatsNew.adoc index 9a36f79f1de..90f48d94527 100644 --- a/src/en/guide/introduction/whatsNew.adoc +++ b/src/en/guide/introduction/whatsNew.adoc @@ -1,13 +1,9 @@ -This section covers all the new features introduced in Grails 6 +This section covers all the new features introduced in Grails 7 === Overview -Grails framework 6 updates Spring Boot to version 2.7. We recommend checking the following Spring technologies release notes for more information. +Grails framework 7 updates Spring Boot to version 3.4. We recommend checking the following Spring technologies release notes for more information. -* https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.7-Release-Notes[Spring Boot 2.7] +* https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.4-Release-Notes[Spring Boot 3.4] -The minimum Java version required to run Grails 6 has been updated to Java 11. - -=== Support for Micronaut Environments in `application.yml` - -The support has been introduced for Micronaut's Environments concept within the `application.yml` file. This feature allows developers to define environment-specific configurations seamlessly, aiding in smoother transitions between different operational environments like development, testing, and production. \ No newline at end of file +The minimum Java version required to run Grails 7 has been updated to Java 17. \ No newline at end of file diff --git a/src/en/guide/introduction/whatsNew/dependencyUpgrades.adoc b/src/en/guide/introduction/whatsNew/dependencyUpgrades.adoc index 4d21573add4..083c6a02a14 100644 --- a/src/en/guide/introduction/whatsNew/dependencyUpgrades.adoc +++ b/src/en/guide/introduction/whatsNew/dependencyUpgrades.adoc @@ -1,12 +1,10 @@ Grails {version} ships with the following dependency upgrades: -* Groovy 3.0.21 -* Micronaut 3.10.4 -* Micronaut for Spring 4.5.1 -* GORM 8.1.2 -* Spring Framework 5.3.39 -* Spring Boot 2.7.18 -* Gradle 7.6.4 -* Spock 2.1-groovy-3.0 -* Grails Testing Support 3.2.1 +* Groovy 4.0.24 +* GORM 9.0.0-M1 +* Spring Framework 6.2.1 +* Spring Boot 3.4.0 +* Gradle 8.11.1 +* Spock 2.3-groovy-4.0 +* Grails Testing Support 4.0.0-M1 diff --git a/src/en/guide/links.yml b/src/en/guide/links.yml index 938643b0345..55a1e3e41df 100644 --- a/src/en/guide/links.yml +++ b/src/en/guide/links.yml @@ -17,7 +17,7 @@ conventionOverConfiguration: 2.7 Convention over Configuration runningAndDebuggingAnApplication: 2.8 Running and Debugging an Application testingAnApplication: 2.9 Testing an Application deployingAnApplication: 2.10 Deploying an Application -supportedJavaEEContainers: 2.11 Supported Java EE Containers +supportedJakartaEEContainers: 2.11 Supported Jakarta EE Containers generatingAnApplication: 2.12 Generating an Application creatingArtefacts: 2.13 Creating Artefacts conf: 3. Configuration diff --git a/src/en/guide/theWebLayer/controllers/controllersAndScopes.adoc b/src/en/guide/theWebLayer/controllers/controllersAndScopes.adoc index 4568b786a75..77dd7b03d9f 100644 --- a/src/en/guide/theWebLayer/controllers/controllersAndScopes.adoc +++ b/src/en/guide/theWebLayer/controllers/controllersAndScopes.adoc @@ -3,9 +3,9 @@ Scopes are hash-like objects where you can store variables. The following scopes are available to controllers: -* link:../ref/Controllers/servletContext.html[servletContext] - Also known as application scope, this scope lets you share state across the entire web application. The servletContext is an instance of {javaee}javax/servlet/ServletContext.html[ServletContext] -* link:../ref/Controllers/session.html[session] - The session allows associating state with a given user and typically uses cookies to associate a session with a client. The session object is an instance of {javaee}javax/servlet/http/HttpSession.html[HttpSession] -* link:../ref/Controllers/request.html[request] - The request object allows the storage of objects for the current request only. The request object is an instance of {javaee}javax/servlet/http/HttpServletRequest.html[HttpServletRequest] +* link:../ref/Controllers/servletContext.html[servletContext] - Also known as application scope, this scope lets you share state across the entire web application. The servletContext is an instance of {jakartaee}jakarta/servlet/ServletContext.html[ServletContext] +* link:../ref/Controllers/session.html[session] - The session allows associating state with a given user and typically uses cookies to associate a session with a client. The session object is an instance of {jakartaee}jakarta/servlet/http/HttpSession.html[HttpSession] +* link:../ref/Controllers/request.html[request] - The request object allows the storage of objects for the current request only. The request object is an instance of {jakartaee}jakarta/servlet/http/HttpServletRequest.html[HttpServletRequest] * link:../ref/Controllers/params.html[params] - Mutable map of incoming request query string or POST parameters * link:../ref/Controllers/flash.html[flash] - See below @@ -13,7 +13,7 @@ Scopes are hash-like objects where you can store variables. The following scopes ==== Accessing Scopes -Scopes can be accessed using the variable names above in combination with Groovy's array index operator, even on classes provided by the Servlet API such as the {javaee}javax/servlet/http/HttpServletRequest.html[HttpServletRequest]: +Scopes can be accessed using the variable names above in combination with Groovy's array index operator, even on classes provided by the Servlet API such as the {jakartaee}jakarta/servlet/http/HttpServletRequest.html[HttpServletRequest]: [source,groovy] ---- diff --git a/src/en/guide/theWebLayer/controllers/redirectsAndChaining.adoc b/src/en/guide/theWebLayer/controllers/redirectsAndChaining.adoc index 8cee321fe49..9d1cc9c043e 100644 --- a/src/en/guide/theWebLayer/controllers/redirectsAndChaining.adoc +++ b/src/en/guide/theWebLayer/controllers/redirectsAndChaining.adoc @@ -19,7 +19,7 @@ class OverviewController { } ---- -Internally the link:../ref/Controllers/redirect.html[redirect] method uses the {javaee}javax/servlet/http/HttpServletResponse.html[HttpServletResponse] object's `sendRedirect` method. +Internally the link:../ref/Controllers/redirect.html[redirect] method uses the {jakartaee}jakarta/servlet/http/HttpServletResponse.html[HttpServletResponse] object's `sendRedirect` method. The `redirect` method expects one of: diff --git a/src/en/guide/theWebLayer/taglibs.adoc b/src/en/guide/theWebLayer/taglibs.adoc index 852daddf0aa..40ebb56abc9 100644 --- a/src/en/guide/theWebLayer/taglibs.adoc +++ b/src/en/guide/theWebLayer/taglibs.adoc @@ -1,4 +1,4 @@ -Like http://www.oracle.com/technetwork/java/javaee/jsp/index.html[Java Server Pages] (JSP), GSP supports the concept of custom tag libraries. Unlike JSP, Grails' tag library mechanism is simple, elegant and completely reloadable at runtime. +Like https://jakarta.ee/specifications/pages/3.1/[Java Server Pages] (JSP), GSP supports the concept of custom tag libraries. Unlike JSP, Grails' tag library mechanism is simple, elegant and completely reloadable at runtime. Quite simply, to create a tag library create a Groovy class that ends with the convention `TagLib` and place it within the `grails-app/taglib` directory: diff --git a/src/en/guide/toc.yml b/src/en/guide/toc.yml index c87d6b9ca2c..4332bcd7245 100644 --- a/src/en/guide/toc.yml +++ b/src/en/guide/toc.yml @@ -15,7 +15,7 @@ gettingStarted: runningAndDebuggingAnApplication: Running and Debugging an Application testingAnApplication: Testing an Application deployingAnApplication: Deploying an Application - supportedJavaEEContainers: Supported Java EE Containers + supportedJakartaEEContainers: Supported Jakarta EE Containers creatingArtefacts: Creating Artefacts generatingAnApplication: Generating an Application upgrading: diff --git a/src/en/guide/upgrading/upgrading60x.adoc b/src/en/guide/upgrading/upgrading60x.adoc index 11f0a4673df..2f4854580a2 100644 --- a/src/en/guide/upgrading/upgrading60x.adoc +++ b/src/en/guide/upgrading/upgrading60x.adoc @@ -1,9 +1,9 @@ -:todoGormVersion: X.X.X -:todoGradleVersion: X.X.X -:todoGrailsVersion: X.X.X -:todoGrailsGradlePluginVersion: X.X.X -:todoSpringVersion: X.X.X -:todoSpringBootVersion: X.X.X +:GormVersion: 9.0.0-M1 +:GradleVersion: 8.11.1 +:GrailsVersion: 7.0.0-M1 +:GrailsGradlePluginVersion: 7.0.0-M2 +:SpringVersion: 6.2.1 +:SpringBootVersion: 3.4.0 ### Upgrade Instructions for Grails and Related Dependencies @@ -23,8 +23,8 @@ To upgrade to Grails 7, it's important to configure the appropriate versions in .gradle.properties [,,subs="attributes"] ---- -grailsVersion={todoGrailsVersion} -grailsGradlePluginVersion={todoGrailsGradlePluginVersion} +grailsVersion={GrailsVersion} +grailsGradlePluginVersion={GrailsGradlePluginVersion} ---- By specifying the above versions, you'll gain access to the latest features, improvements, and bug fixes introduced in Grails 7. Upgrading to this version empowers your application with enhanced performance and improved security. Additionally, it allows you to leverage the latest advancements in the Grails framework for a more efficient and secure development experience. @@ -36,33 +36,33 @@ If your project utilizes GORM, ensure to update the version in the `gradle.prope .gradle.properties [,,subs="attributes"] ---- -gormVersion={todoGormVersion} +gormVersion={GormVersion} ---- -By upgrading to GORM {todoGormVersion}, you will benefit from essential updates and optimizations. This upgrade guarantees seamless interactions with your database and enhances your data management experience. Staying current with GORM allows you to take advantage of the latest database features and improvements, thereby optimizing the performance and functionality of your application. +By upgrading to GORM {GormVersion}, you will benefit from essential updates and optimizations. This upgrade guarantees seamless interactions with your database and enhances your data management experience. Staying current with GORM allows you to take advantage of the latest database features and improvements, thereby optimizing the performance and functionality of your application. #### 5. Gradle Version: -Grails 7 uses Gradle {todoGradleVersion} which offers performance improvements, bug fixes, and new features over previous versions. Upgrading to the latest Gradle version helps accelerate your build processes and ensures compatibility with other dependencies. +Grails 7 uses Gradle {GradleVersion} which offers performance improvements, bug fixes, and new features over previous versions. Upgrading to the latest Gradle version helps accelerate your build processes and ensures compatibility with other dependencies. -##### 5.1. Upgrade to Gradle {todoGradleVersion} +##### 5.1. Upgrade to Gradle {GradleVersion} -Run the following command to update the Gradle wrapper to the desired version (e.g., Gradle {todoGradleVersion}): +Run the following command to update the Gradle wrapper to the desired version (e.g., Gradle {GradleVersion}): [,console,subs="attributes"] ---- -./gradlew wrapper --gradle-version {todoGradleVersion} +./gradlew wrapper --gradle-version {GradleVersion} ---- This command will download the specified Gradle version and update the Gradle wrapper settings in your project. ##### 5.2. Check Gradle Version: -After the command finishes, you can verify that the Gradle version has been updated by checking the `gradle-wrapper.properties` file located in the `gradle/wrapper` directory. The `distributionUrl` in the file should now point to the Gradle {todoGradleVersion} distribution: +After the command finishes, you can verify that the Gradle version has been updated by checking the `gradle-wrapper.properties` file located in the `gradle/wrapper` directory. The `distributionUrl` in the file should now point to the Gradle {GradleVersion} distribution: [,,subs="attributes"] ---- -distributionUrl=https\://services.gradle.org/distributions/gradle-{todoGradleVersion}-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-{GradleVersion}-bin.zip ---- @@ -76,25 +76,26 @@ After updating the Gradle wrapper, you can now build your Grails project using t This will initiate the build process with the new Gradle version. -#### 6. Spring {todoSpringVersion}: +#### 6. Spring {SpringVersion}: -Grails 7 is built on Spring {todoSpringVersion}. If your project uses Spring-specific features, refer to the https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-6.x[Upgrading to Spring 6 guide]. +Grails 7 is built on Spring {SpringVersion}. If your project uses Spring-specific features, refer to the https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-6.x[Upgrading to Spring 6 guide]. -Spring {todoSpringVersion} introduces enhancements and fixes to the Spring framework, providing you with the latest improvements in dependency injection, web frameworks, and other Spring-related functionalities. +Spring {SpringVersion} introduces enhancements and fixes to the Spring framework, providing you with the latest improvements in dependency injection, web frameworks, and other Spring-related functionalities. -#### 7. Spring Boot {todoSpringBootVersion}: +#### 7. Spring Boot {SpringBootVersion}: -Grails 7 updates to Spring Boot {todoSpringBootVersion}. For more information, consult the https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.3-Release-Notes[Spring Boot 3 Release Notes] +Grails 7 updates to Spring Boot {SpringBootVersion}. For more information, consult the https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.3-Release-Notes[Spring Boot 3 Release Notes] -Spring Boot {todoSpringBootVersion} comes with new features, performance enhancements, and compatibility improvements, making it a solid foundation for your Grails application. +Spring Boot {SpringBootVersion} comes with new features, performance enhancements, and compatibility improvements, making it a solid foundation for your Grails application. #### 8. Breaking changes Grails 7 introduces several breaking changes that may require updates to your application. -##### 8.1. Inheritance in GORM -With the update to Groovy 4, there is an issue with extending domain classes. A workaround is to *_not_* annotate parent classes with `@Entity` or put them in the `grails-app/domain` folder. Use `src/main/groovy` instead. +#### 8.1. Removed libraries/classes +- The `grails-web-fileupload` library, including its sole class `ContentLengthAwareCommonsMultipartResolver`, has been removed. This change was necessitated by the removal of the superclass `CommonsMultipartResolver` in Spring 6. The `ContentLengthAwareCommonsMultipartResolver` was originally introduced to address a bug in Safari back in 2007, but it is likely no longer needed. Spring has transitioned away from `CommonsMultipartResolver` and now recommends using the built-in support for multipart uploads provided by servlet containers. For more information on handling file uploads in Spring Boot, please refer to the relevant sections of the https://docs.spring.io/spring-boot/how-to/spring-mvc.html#howto.spring-mvc.multipart-file-uploads[Spring Boot documentation] and the https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-6.x#web-applications-1[Spring Framework 6 upgrade guide]. +- `org.grails.spring.beans.factory.OptimizedAutowireCapableBeanFactory` was deprecated and is now removed. -#### 8.2. Removed libraries/classes +#### 8.2. Micronaut is now supported via Spring Boot Starter - The `grails-web-fileupload` library, including its sole class `ContentLengthAwareCommonsMultipartResolver`, has been removed. This change was necessitated by the removal of the superclass `CommonsMultipartResolver` in Spring 6. The `ContentLengthAwareCommonsMultipartResolver` was originally introduced to address a bug in Safari back in 2007, but it is likely no longer needed. Spring has transitioned away from `CommonsMultipartResolver` and now recommends using the built-in support for multipart uploads provided by servlet containers. For more information on handling file uploads in Spring Boot, please refer to the relevant sections of the https://docs.spring.io/spring-boot/how-to/spring-mvc.html#howto.spring-mvc.multipart-file-uploads[Spring Boot documentation] and the https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-6.x#web-applications-1[Spring Framework 6 upgrade guide]. - `org.grails.spring.beans.factory.OptimizedAutowireCapableBeanFactory` was deprecated and is now removed. \ No newline at end of file diff --git a/src/en/ref/Command Line/create-app.adoc b/src/en/ref/Command Line/create-app.adoc index 788bf536d77..66a2c55cde7 100644 --- a/src/en/ref/Command Line/create-app.adoc +++ b/src/en/ref/Command Line/create-app.adoc @@ -22,7 +22,7 @@ Options include specifying features, configuring the GORM implementation, select Here are the available options for the create-app command: - `NAME`: The desired name for the application. -- `-f, --features=FEATURE[,FEATURE...]`: Specifies the features to include. Available options include h2, scaffolding, gorm-hibernate5, spring-boot-starter-jetty, springloaded, spring-boot-starter-tomcat, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, micronaut-inject-groovy, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, asset-pipeline-grails, views-json, gorm-neo4j, asciidoctor, embedded-mongodb, grails-web-console, logbackGroovy, mongo-sync, shade, geb, properties. +- `-f, --features=FEATURE[,FEATURE...]`: Specifies the features to include. Available options include h2, scaffolding, gorm-hibernate5, spring-boot-starter-jetty, springloaded, spring-boot-starter-tomcat, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, asset-pipeline-grails, views-json, gorm-neo4j, asciidoctor, embedded-mongodb, grails-web-console, logbackGroovy, mongo-sync, shade, geb, properties. - `-g, --gorm=`: Specifies the GORM Implementation to configure, with options like hibernate, mongodb, neo4j. - `-i, --inplace`: Creates the application within the current directory. - `--jdk=`: Specifies the JDK version for the project. diff --git a/src/en/ref/Command Line/create-plugin.adoc b/src/en/ref/Command Line/create-plugin.adoc index 8730bd7cd57..d71f48ef9b4 100644 --- a/src/en/ref/Command Line/create-plugin.adoc +++ b/src/en/ref/Command Line/create-plugin.adoc @@ -23,7 +23,7 @@ Options include specifying features, configuring the GORM implementation, select Here are the available options for the create-plugin command: -- -f, --features=FEATURE[,FEATURE...]: Specifies the features to include in the plugin. Available options include h2, gorm-hibernate5, spring-boot-starter-jetty, springloaded, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, micronaut-inject-groovy, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, views-json, gorm-neo4j, asciidoctor, embedded-mongodb, grails-web-console, logbackGroovy, mongo-sync, shade, properties. +- -f, --features=FEATURE[,FEATURE...]: Specifies the features to include in the plugin. Available options include h2, gorm-hibernate5, spring-boot-starter-jetty, springloaded, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, views-json, gorm-neo4j, asciidoctor, embedded-mongodb, grails-web-console, logbackGroovy, mongo-sync, shade, properties. - -g, --gorm=GORM Implementation: Specifies the GORM Implementation to configure for the plugin. Possible values are hibernate, mongodb, neo4j. - -h, --help: Displays the help message and exits. - -i, --inplace: Creates a service within the current directory. diff --git a/src/en/ref/Command Line/create-restapi.adoc b/src/en/ref/Command Line/create-restapi.adoc index ea709edc0a4..21d11515ceb 100644 --- a/src/en/ref/Command Line/create-restapi.adoc +++ b/src/en/ref/Command Line/create-restapi.adoc @@ -21,7 +21,7 @@ The `create-restapi` command accepts the following options: - `NAME`: The desired name for the REST API application. -- `-f, --features=FEATURE[,FEATURE...]`: Specifies the features to include. Available options include h2, scaffolding, gorm-hibernate5, spring-boot-starter-jetty, springloaded, spring-boot-starter-tomcat, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, micronaut-inject-groovy, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, asset-pipeline-grails, views-json, gorm-neo4j, asciidoctor, embedded-mongodb, grails-web-console, logbackGroovy, mongo-sync, shade, geb, properties. +- `-f, --features=FEATURE[,FEATURE...]`: Specifies the features to include. Available options include h2, scaffolding, gorm-hibernate5, spring-boot-starter-jetty, springloaded, spring-boot-starter-tomcat, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, asset-pipeline-grails, views-json, gorm-neo4j, asciidoctor, embedded-mongodb, grails-web-console, logbackGroovy, mongo-sync, shade, geb, properties. - `-g, --gorm=GORM Implementation`: Specifies the GORM Implementation to configure, with options like hibernate, mongodb, neo4j. diff --git a/src/en/ref/Command Line/create-web-plugin.adoc b/src/en/ref/Command Line/create-web-plugin.adoc index 04e13dcd265..db8825a0fba 100644 --- a/src/en/ref/Command Line/create-web-plugin.adoc +++ b/src/en/ref/Command Line/create-web-plugin.adoc @@ -19,7 +19,7 @@ grails create-web-plugin [OPTIONS] NAME Here are the available options for the `create-web-plugin` command: -- `-f, --features=FEATURE[,FEATURE...]`: Specifies the features to include in the plugin. Available options include h2, gorm-hibernate5, spring-boot-starter-jetty, springloaded, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, micronaut-inject-groovy, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, views-json, gorm-neo4j, asciidoctor, embedded-mongodb, grails-web-console, logbackGroovy, mongo-sync, shade, properties. +- `-f, --features=FEATURE[,FEATURE...]`: Specifies the features to include in the plugin. Available options include h2, gorm-hibernate5, spring-boot-starter-jetty, springloaded, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, views-json, gorm-neo4j, asciidoctor, embedded-mongodb, grails-web-console, logbackGroovy, mongo-sync, shade, properties. - `-g, --gorm=GORM Implementation`: Specifies the GORM Implementation to configure for the plugin. Possible values are hibernate, mongodb, neo4j. diff --git a/src/en/ref/Command Line/help.adoc b/src/en/ref/Command Line/help.adoc index 31baf902be9..2b2c23db82f 100644 --- a/src/en/ref/Command Line/help.adoc +++ b/src/en/ref/Command Line/help.adoc @@ -80,7 +80,7 @@ Creates an application spring-boot-starter-jetty, springloaded, spring-boot-starter-tomcat, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, - assertj, mockito, spring-boot-starter-undertow, micronaut-inject-groovy, + assertj, mockito, spring-boot-starter-undertow, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, asset-pipeline-grails, views-json, gorm-neo4j, asciidoctor, embedded-mongodb, grails-web-console, diff --git a/src/en/ref/Command Line/list-features.adoc b/src/en/ref/Command Line/list-features.adoc index 8128540b600..2996cbc725c 100644 --- a/src/en/ref/Command Line/list-features.adoc +++ b/src/en/ref/Command Line/list-features.adoc @@ -72,7 +72,6 @@ Available Features Other grails-console (+) Starts the Grails console, which is an extended version of the regular Groovy console. - micronaut-inject-groovy (+) micronaut-inject-groovy Packaging shade Adds the ability to build a Fat/Shaded JAR diff --git a/src/en/ref/Controllers/request.adoc b/src/en/ref/Controllers/request.adoc index 1c4342a62bc..dd92b7032f7 100644 --- a/src/en/ref/Controllers/request.adoc +++ b/src/en/ref/Controllers/request.adoc @@ -6,7 +6,7 @@ === Purpose -The link:../Servlet%20API/request.html[request] object is an instance of the Servlet API's {javaee}javax/servlet/http/HttpServletRequest.html[HttpServletRequest] class. +The link:../Servlet%20API/request.html[request] object is an instance of the Servlet API's {jakartaee}jakarta/servlet/http/HttpServletRequest.html[HttpServletRequest] class. === Examples @@ -27,6 +27,6 @@ class BookController { === Description -The {javaee}javax/servlet/http/HttpServletRequest.html[HttpServletRequest] class is useful for, amongst other things, obtaining request headers, storing request scoped attributes and establishing information about the client. Refer to the Servlet API's javadocs for further information. +The {jakartaee}jakarta/servlet/http/HttpServletRequest.html[HttpServletRequest] class is useful for, amongst other things, obtaining request headers, storing request scoped attributes and establishing information about the client. Refer to the Servlet API's javadocs for further information. NOTE: The additional methods added to the link:../Servlet%20API/request.html[request] object are documented in the Grails Servlet API reference guide diff --git a/src/en/ref/Controllers/response.adoc b/src/en/ref/Controllers/response.adoc index 1079f0f74e8..b4f9b032992 100644 --- a/src/en/ref/Controllers/response.adoc +++ b/src/en/ref/Controllers/response.adoc @@ -6,7 +6,7 @@ === Purpose -The link:../Servlet%20API/response.html[response] object is an instance of the Servlet API's {javaee}javax/servlet/http/HttpServletResponse.html[HttpServletResponse] class. +The link:../Servlet%20API/response.html[response] object is an instance of the Servlet API's {jakartaee}jakarta/servlet/http/HttpServletResponse.html[HttpServletResponse] class. === Examples @@ -26,6 +26,6 @@ class BookController { === Description -The Servlet API's `HttpServletResponse` class can be used within Grails to perform all typical activities such as writing out binary data, writing directly to the response and sending error response codes to name but a few. Refer to the documentation on the {javaee}javax/servlet/http/HttpServletResponse.html[HttpServletResponse] class in the Servlet API for more information. +The Servlet API's `HttpServletResponse` class can be used within Grails to perform all typical activities such as writing out binary data, writing directly to the response and sending error response codes to name but a few. Refer to the documentation on the {jakartaee}jakarta/servlet/http/HttpServletResponse.html[HttpServletResponse] class in the Servlet API for more information. NOTE: The additional methods added to the link:../Servlet%20API/response.html[response] object are documented in the Grails Servlet API reference guide diff --git a/src/en/ref/Controllers/servletContext.adoc b/src/en/ref/Controllers/servletContext.adoc index a0b15af32e2..a4caa007ed4 100644 --- a/src/en/ref/Controllers/servletContext.adoc +++ b/src/en/ref/Controllers/servletContext.adoc @@ -6,7 +6,7 @@ === Purpose -The link:../Servlet%20API/servletContext.html[servletContext] object is an instance of the Servlet API's {javaee}javax/servlet/ServletContext.html[ServletContext] class. +The link:../Servlet%20API/servletContext.html[servletContext] object is an instance of the Servlet API's {jakartaee}jakarta/servlet/ServletContext.html[ServletContext] class. === Examples @@ -33,6 +33,6 @@ class BookController { === Description -The Servlet API's {javaee}javax/servlet/ServletContext.html[ServletContext] is useful for, amongst other things, storing global application attributes, reading local server resources and establishing information about the servlet container. +The Servlet API's {jakartaee}jakarta/servlet/ServletContext.html[ServletContext] is useful for, amongst other things, storing global application attributes, reading local server resources and establishing information about the servlet container. NOTE: Grails adds additional methods to the standard Servlet API's link:../Servlet%20API/servletContext.html[servletContext] object. See link for details. diff --git a/src/en/ref/Controllers/session.adoc b/src/en/ref/Controllers/session.adoc index 0b635b7ab39..7cac509a6f2 100644 --- a/src/en/ref/Controllers/session.adoc +++ b/src/en/ref/Controllers/session.adoc @@ -6,7 +6,7 @@ === Purpose -The link:../Servlet%20API/session.html[session] object is an instance of the Servlet API's {javaee}javax/servlet/http/HttpSession.html[HttpSession] class. +The link:../Servlet%20API/session.html[session] object is an instance of the Servlet API's {jakartaee}jakarta/servlet/http/HttpSession.html[HttpSession] class. === Examples @@ -30,6 +30,6 @@ class UserController { === Description -The {javaee}javax/servlet/http/HttpSession.html[HttpSession] class is useful for associated session data with a client. +The {jakartaee}jakarta/servlet/http/HttpSession.html[HttpSession] class is useful for associated session data with a client. NOTE: The additional methods added to the link:../Servlet%20API/session.html[session] object are documented in the Grails Servlet API reference guide diff --git a/src/en/ref/Dependency Versions/Grails BOM.adoc b/src/en/ref/Dependency Versions/Grails BOM.adoc index 3a7ab1b374e..85eb030c329 100644 --- a/src/en/ref/Dependency Versions/Grails BOM.adoc +++ b/src/en/ref/Dependency Versions/Grails BOM.adoc @@ -18,29 +18,13 @@ This document provides information about the dependencies mentioned in the Grail | directory-watcher | {io_methvin_directory_watcher_version} -| io.micronaut -| micronaut-aop, micronaut-bom, micronaut-buffer-netty, micronaut-core, micronaut-http, micronaut-http-client, micronaut-http-netty, micronaut-inject, micronaut-inject-groovy, micronaut-inject-java, micronaut-runtime -| {io_micronaut_micronaut_core_version} - -| io.micronaut.cache -| micronaut-cache-core -| {io_micronaut_cache_micronaut_cache_core_version} - -| io.micronaut.groovy -| micronaut-runtime-groovy -| {io_micronaut_groovy_micronaut_runtime_groovy_version} - -| io.micronaut.spring -| micronaut-spring, micronaut-spring-annotation, micronaut-spring-boot, micronaut-spring-boot-annotation, micronaut-spring-context, micronaut-spring-web, micronaut-spring-web-annotation -| {io_micronaut_spring_micronaut_spring_spring_version} - | jakarta.annotation | jakarta.annotation-api | {jakarta_annotation_jakarta_annotation_api_version} -| javax.annotation -| javax.annotation-api -| {javax_annotation_javax_annotation_api_version} +| jakarta.annotation +| jakarta.annotation-api +| {jakarta_annotation_jakarta_annotation_api_version} | org.codehaus.groovy | groovy, groovy-ant, groovy-console, groovy-dateutil, groovy-json, groovy-macro, groovy-nio, groovy-sql, groovy-swing, groovy-templates, groovy-xml diff --git a/src/en/ref/Servlet API/request.adoc b/src/en/ref/Servlet API/request.adoc index 9ce6dd99099..48d3fab0790 100644 --- a/src/en/ref/Servlet API/request.adoc +++ b/src/en/ref/Servlet API/request.adoc @@ -6,7 +6,7 @@ === Purpose -The `request` object is an instance of the Servlet API's {javaee}javax/servlet/http/HttpServletRequest.html[HttpServletRequest] interface +The `request` object is an instance of the Servlet API's {jakartaee}jakarta/servlet/http/HttpServletRequest.html[HttpServletRequest] interface === Examples @@ -27,7 +27,7 @@ class BookController { === Description -The {javaee}javax/servlet/http/HttpServletRequest.html[HttpServletRequest] class is useful for, amongst other things, obtaining request headers, storing request scoped attributes and establishing information about the client. Refer to the Servlet API's javadocs for further information. +The {jakartaee}jakarta/servlet/http/HttpServletRequest.html[HttpServletRequest] class is useful for, amongst other things, obtaining request headers, storing request scoped attributes and establishing information about the client. Refer to the Servlet API's javadocs for further information. Grails enhances the `HttpServletRequest` instance by adding the following new properties and methods: @@ -61,7 +61,7 @@ def title = request.XML?.title render "The Title is $title" ---- -Request attributes which are normally accessible from the {javaee}javax/servlet/ServletRequest#getAttribute(java/lang/String).html[getAttribute] can also be indexed into using the array index operator or de-reference operator: +Request attributes which are normally accessible from the {jakartaee}jakarta/servlet/ServletRequest#getAttribute(java/lang/String).html[getAttribute] can also be indexed into using the array index operator or de-reference operator: [source,groovy] ---- diff --git a/src/en/ref/Servlet API/response.adoc b/src/en/ref/Servlet API/response.adoc index daf06a20ccc..f7d9c03efcb 100644 --- a/src/en/ref/Servlet API/response.adoc +++ b/src/en/ref/Servlet API/response.adoc @@ -6,7 +6,7 @@ === Purpose -The `response` object is an instance of the Servlet API's {javaee}javax/servlet/http/HttpServletResponse.html[HttpServletResponse] class +The `response` object is an instance of the Servlet API's {jakartaee}jakarta/servlet/http/HttpServletResponse.html[HttpServletResponse] class === Examples @@ -26,7 +26,7 @@ class BookController { === Description -The Servlet API's `HttpServletResponse` class can be used within Grails to perform all typical activities such as writing out binary data, writing directly to the response and sending error response codes to name but a few. Refer to the documentation on the {javaee}javax/servlet/http/HttpServletResponse.html[HttpServletResponse] class in the Servlet API for more information. Grails provides the following additional methods and/or properties on the `response` object +The Servlet API's `HttpServletResponse` class can be used within Grails to perform all typical activities such as writing out binary data, writing directly to the response and sending error response codes to name but a few. Refer to the documentation on the {jakartaee}jakarta/servlet/http/HttpServletResponse.html[HttpServletResponse] class in the Servlet API for more information. Grails provides the following additional methods and/or properties on the `response` object * `format` - The request format, used for link:{guidePath}/theWebLayer.html#contentNegotiation[Content Negotiation]. * `withFormat(Closure)` - The withFormat method, used for link:{guidePath}/theWebLayer.html#contentNegotiation[Content Negotiation]. diff --git a/src/en/ref/Servlet API/servletContext.adoc b/src/en/ref/Servlet API/servletContext.adoc index a3ec2c05ddc..4fdb1360459 100644 --- a/src/en/ref/Servlet API/servletContext.adoc +++ b/src/en/ref/Servlet API/servletContext.adoc @@ -6,7 +6,7 @@ === Purpose -The servletContext object is an instance of the Servlet API's {javaee}javax/servlet/ServletContext.html[ServletContext] class. +The servletContext object is an instance of the Servlet API's {jakartaee}jakarta/servlet/ServletContext.html[ServletContext] class. === Examples @@ -33,9 +33,9 @@ class BookController { === Description -The Servlet API's {javaee}javax/servlet/ServletContext.html[ServletContext] is useful for, amongst other things, storing global application attributes, reading local server resources and establishing information about the servlet container. +The Servlet API's {jakartaee}jakarta/servlet/ServletContext.html[ServletContext] is useful for, amongst other things, storing global application attributes, reading local server resources and establishing information about the servlet container. -Application attributes which are normally accessible from the {javaee}javax/servlet/ServletContext#getAttribute(java/lang/String).html[getAttribute] can also be indexed into using the array index operator or de-reference operator: +Application attributes which are normally accessible from the {jakartaee}jakarta/servlet/ServletContext#getAttribute(java/lang/String).html[getAttribute] can also be indexed into using the array index operator or de-reference operator: [source,groovy] ---- diff --git a/src/en/ref/Servlet API/session.adoc b/src/en/ref/Servlet API/session.adoc index 92ea39814c4..6c7f142abe6 100644 --- a/src/en/ref/Servlet API/session.adoc +++ b/src/en/ref/Servlet API/session.adoc @@ -6,7 +6,7 @@ === Purpose -The `session` object is an instance of the Servlet API's {javaee}javax/servlet/http/HttpSession.html[HttpSession] class +The `session` object is an instance of the Servlet API's {jakartaee}jakarta/servlet/http/HttpSession.html[HttpSession] class === Examples @@ -30,9 +30,9 @@ class UserController { === Description -The {javaee}javax/servlet/http/HttpSession.html[HttpSession] class is useful for associated session data with a client. +The {jakartaee}jakarta/servlet/http/HttpSession.html[HttpSession] class is useful for associated session data with a client. -Session attributes which are normally accessible from the {javaee}javax/servlet/http/HttpSession#getAttribute(java/lang/String).html[getAttribute] can also be indexed into using the array index operator or de-reference operator: +Session attributes which are normally accessible from the {jakartaee}jakarta/servlet/http/HttpSession#getAttribute(java/lang/String).html[getAttribute] can also be indexed into using the array index operator or de-reference operator: [source,groovy] ---- From 0654cc31b6d19b397a91eb273d44a77a202682f4 Mon Sep 17 00:00:00 2001 From: James Fredley Date: Fri, 13 Dec 2024 19:33:54 -0500 Subject: [PATCH 2/9] Update Micronaut for Grails 7 details --- src/en/guide/upgrading/upgrading60x.adoc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/en/guide/upgrading/upgrading60x.adoc b/src/en/guide/upgrading/upgrading60x.adoc index 2f4854580a2..f0eeb1f5772 100644 --- a/src/en/guide/upgrading/upgrading60x.adoc +++ b/src/en/guide/upgrading/upgrading60x.adoc @@ -96,6 +96,11 @@ Grails 7 introduces several breaking changes that may require updates to your ap - The `grails-web-fileupload` library, including its sole class `ContentLengthAwareCommonsMultipartResolver`, has been removed. This change was necessitated by the removal of the superclass `CommonsMultipartResolver` in Spring 6. The `ContentLengthAwareCommonsMultipartResolver` was originally introduced to address a bug in Safari back in 2007, but it is likely no longer needed. Spring has transitioned away from `CommonsMultipartResolver` and now recommends using the built-in support for multipart uploads provided by servlet containers. For more information on handling file uploads in Spring Boot, please refer to the relevant sections of the https://docs.spring.io/spring-boot/how-to/spring-mvc.html#howto.spring-mvc.multipart-file-uploads[Spring Boot documentation] and the https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-6.x#web-applications-1[Spring Framework 6 upgrade guide]. - `org.grails.spring.beans.factory.OptimizedAutowireCapableBeanFactory` was deprecated and is now removed. -#### 8.2. Micronaut is now supported via Spring Boot Starter -- The `grails-web-fileupload` library, including its sole class `ContentLengthAwareCommonsMultipartResolver`, has been removed. This change was necessitated by the removal of the superclass `CommonsMultipartResolver` in Spring 6. The `ContentLengthAwareCommonsMultipartResolver` was originally introduced to address a bug in Safari back in 2007, but it is likely no longer needed. Spring has transitioned away from `CommonsMultipartResolver` and now recommends using the built-in support for multipart uploads provided by servlet containers. For more information on handling file uploads in Spring Boot, please refer to the relevant sections of the https://docs.spring.io/spring-boot/how-to/spring-mvc.html#howto.spring-mvc.multipart-file-uploads[Spring Boot documentation] and the https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-6.x#web-applications-1[Spring Framework 6 upgrade guide]. -- `org.grails.spring.beans.factory.OptimizedAutowireCapableBeanFactory` was deprecated and is now removed. \ No newline at end of file +#### 8.2. Micronaut in Grails is now supported via the Micronaut Spring Boot Starter +- This change was made based on community input: https://github.com/orgs/grails/discussions/13517 +- The removal of Micronaut enabled simplification of the Grails codebase and the return of Live Reload via https://github.com/HotswapProjects/HotswapAgent +- The Micronaut Parent Context is no longer in Grails by default. +- The following dependencies are no longer included in Grails or grails-bom: io.micronaut:micronaut-\*, io.micronaut.cache:micronaut-cache-core, io.micronaut.groovy:micronaut-runtime-groovy and io.micronaut.spring:micronaut-spring-* +- Micronaut can be added via the Micronaut Spring Boot Starter: https://micronaut-projects.github.io/micronaut-spring/latest/guide/#springBootStarter. +- Using Micronaut Parent Context: https://micronaut-projects.github.io/micronaut-spring/latest/guide/#springParentContext +- Using a Bean Post Processor: https://micronaut-projects.github.io/micronaut-spring/latest/guide/#beanPostProcessor \ No newline at end of file From 7eb9d8d5d1c28e3f43a2a601554dd4ff3ffb67ad Mon Sep 17 00:00:00 2001 From: James Fredley Date: Fri, 13 Dec 2024 20:04:14 -0500 Subject: [PATCH 3/9] Update default dependencies for new Grails 7 project --- .../gradleBuild/gradleDependencies.adoc | 85 ++++++++++--------- 1 file changed, 46 insertions(+), 39 deletions(-) diff --git a/src/en/guide/commandLine/gradleBuild/gradleDependencies.adoc b/src/en/guide/commandLine/gradleBuild/gradleDependencies.adoc index 642bdeb7b90..914705517d9 100644 --- a/src/en/guide/commandLine/gradleBuild/gradleDependencies.adoc +++ b/src/en/guide/commandLine/gradleBuild/gradleDependencies.adoc @@ -5,49 +5,56 @@ The default dependencies for the Grails Web application can be seen below: [source,groovy] ---- dependencies { - implementation("org.grails:grails-core") - implementation("org.grails:grails-logging") - implementation("org.grails:grails-plugin-databinding") - implementation("org.grails:grails-plugin-i18n") - implementation("org.grails:grails-plugin-interceptors") - implementation("org.grails:grails-plugin-rest") - implementation("org.grails:grails-plugin-services") - implementation("org.grails:grails-plugin-url-mappings") - implementation("org.grails:grails-web-boot") - implementation("org.grails.plugins:gsp") - implementation("org.grails.plugins:hibernate5") - implementation("org.grails.plugins:scaffolding") - implementation("org.hibernate:hibernate-core:5.6.15.Final") - implementation("org.springframework.boot:spring-boot-autoconfigure") - implementation("org.springframework.boot:spring-boot-starter") - implementation("org.springframework.boot:spring-boot-starter-actuator") - implementation("org.springframework.boot:spring-boot-starter-logging") - implementation("org.springframework.boot:spring-boot-starter-tomcat") - implementation("org.springframework.boot:spring-boot-starter-validation") - console("org.grails:grails-console") - runtimeOnly("com.bertramlabs.plugins:asset-pipeline-grails:4.3.0") - runtimeOnly("com.h2database:h2") - runtimeOnly("jakarta.xml.bind:jakarta.xml.bind-api:4.0.2") - runtimeOnly("org.apache.tomcat:tomcat-jdbc") - runtimeOnly("org.fusesource.jansi:jansi:1.18") - runtimeOnly("org.glassfish.web:el-impl:2.2.1-b05") - testImplementation("org.grails:grails-gorm-testing-support") - testImplementation("org.grails:grails-web-testing-support") - testImplementation("org.grails.plugins:geb") - testImplementation("org.seleniumhq.selenium:selenium-api:4.10.0") - testImplementation("org.seleniumhq.selenium:selenium-remote-driver:4.10.0") - testImplementation("org.seleniumhq.selenium:selenium-support:4.10.0") - testImplementation("org.spockframework:spock-core") - testRuntimeOnly("org.seleniumhq.selenium:selenium-chrome-driver:4.10.0") - testRuntimeOnly("org.seleniumhq.selenium:selenium-firefox-driver:4.10.0") - testRuntimeOnly("org.seleniumhq.selenium:selenium-safari-driver:4.10.0") - testImplementation("io.micronaut:micronaut-http-client") - + profile "org.grails.profiles:web" + implementation "org.grails:grails-core" + implementation "org.grails:grails-logging" + implementation "org.grails:grails-plugin-databinding" + implementation "org.grails:grails-plugin-i18n" + implementation "org.grails:grails-plugin-interceptors" + implementation "org.grails:grails-plugin-rest" + implementation "org.grails:grails-plugin-services" + implementation "org.grails:grails-plugin-url-mappings" + implementation "org.grails:grails-web-boot" + implementation "org.grails.plugins:gsp" + implementation "org.grails.plugins:hibernate5" + implementation "org.grails.plugins:scaffolding" + implementation "org.springframework.boot:spring-boot-autoconfigure" + implementation "org.springframework.boot:spring-boot-starter" + implementation "org.springframework.boot:spring-boot-starter-actuator" + implementation "org.springframework.boot:spring-boot-starter-logging" + implementation "org.springframework.boot:spring-boot-starter-tomcat" + implementation "org.springframework.boot:spring-boot-starter-validation" + console "org.grails:grails-console" + runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails" + runtimeOnly "com.h2database:h2" + runtimeOnly "org.apache.tomcat:tomcat-jdbc" + runtimeOnly "org.fusesource.jansi:jansi" + integrationTestImplementation testFixtures ("org.grails.plugins:geb") + testImplementation "org.grails:grails-gorm-testing-support" + testImplementation "org.grails:grails-web-testing-support" + testImplementation "org.spockframework:spock-core" } ---- -Note that version numbers are not present in the majority of the dependencies. This is thanks to the dependency management plugin which configures a Maven BOM that defines the default dependency versions for certain commonly used dependencies and plugins: +Note that version numbers are not present in the majority of the dependencies. + +This is thanks to the Spring dependency management plugin which automatically configures `grails-bom` as a Maven BOM via the Grails Gradle Plugin. This defines the default dependency versions for most commonly used dependencies and plugins. + +For a Grails App, applying `org.grails:grails-gradle-plugin` will automatically configure the `grails-bom`. No other steps required. + +For Plugins and Projects which do not use `org.grails:grails-gradle-plugin`, you can apply the `grails-bom` in one of the following two ways. + +build.gradle, using Gradle Platforms: +[source,groovy] +---- +dependencies { + implementation platform("org.grails:grails-bom:$grailsVersion") + + +} +---- +build.gradle, using Spring dependency management plugin: [source,groovy] ---- dependencyManagement { From 8323074e383b52edba4ab941d263e70e7d3af5f7 Mon Sep 17 00:00:00 2001 From: James Fredley Date: Fri, 13 Dec 2024 20:45:03 -0500 Subject: [PATCH 4/9] back to spring 6.2.0 --- gradle.properties | 2 +- src/en/guide/introduction/whatsNew/dependencyUpgrades.adoc | 2 +- src/en/guide/upgrading/upgrading60x.adoc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 8a7ff8c21e9..5f92bb2fa75 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ grails.version=7.0.0-SNAPSHOT githubSlug=grails/grails-doc githubBranch=7.0.x springBootVersion=3.4.0 -springVersion=6.2.1 +springVersion=6.2.0 gradleVersion=8.11.1 gormVersion=9.0.0-SNAPSHOT groovyVersion=4.0.24 diff --git a/src/en/guide/introduction/whatsNew/dependencyUpgrades.adoc b/src/en/guide/introduction/whatsNew/dependencyUpgrades.adoc index 083c6a02a14..ac0c3d36788 100644 --- a/src/en/guide/introduction/whatsNew/dependencyUpgrades.adoc +++ b/src/en/guide/introduction/whatsNew/dependencyUpgrades.adoc @@ -2,7 +2,7 @@ Grails {version} ships with the following dependency upgrades: * Groovy 4.0.24 * GORM 9.0.0-M1 -* Spring Framework 6.2.1 +* Spring Framework 6.2.0 * Spring Boot 3.4.0 * Gradle 8.11.1 * Spock 2.3-groovy-4.0 diff --git a/src/en/guide/upgrading/upgrading60x.adoc b/src/en/guide/upgrading/upgrading60x.adoc index f0eeb1f5772..1628e2069f6 100644 --- a/src/en/guide/upgrading/upgrading60x.adoc +++ b/src/en/guide/upgrading/upgrading60x.adoc @@ -2,7 +2,7 @@ :GradleVersion: 8.11.1 :GrailsVersion: 7.0.0-M1 :GrailsGradlePluginVersion: 7.0.0-M2 -:SpringVersion: 6.2.1 +:SpringVersion: 6.2.0 :SpringBootVersion: 3.4.0 From 099c45aa81f3f8f8070b482213102ee392751e93 Mon Sep 17 00:00:00 2001 From: James Fredley Date: Fri, 13 Dec 2024 22:19:42 -0500 Subject: [PATCH 5/9] more cleanup --- build.gradle | 2 +- src/en/guide/REST/restProfile.adoc | 2 +- .../guide/commandLine/gradleBuild/gradleDependencies.adoc | 3 +-- src/en/guide/index.adoc | 2 +- src/en/guide/introduction.adoc | 4 ++-- src/en/guide/toc.yml | 2 +- src/en/ref/Dependency Versions/Grails BOM.adoc | 8 -------- 7 files changed, 7 insertions(+), 16 deletions(-) diff --git a/build.gradle b/build.gradle index 5c8b145babe..df3cc852233 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { id 'base' - id 'org.asciidoctor.jvm.convert' version '4.0.0-alpha.1' + id 'org.asciidoctor.jvm.convert' version '4.0.3' id 'org.grails.grails-gdoc-to-asciidoc' id 'groovy' } diff --git a/src/en/guide/REST/restProfile.adoc b/src/en/guide/REST/restProfile.adoc index 394eea31d8a..0116ee40d0c 100644 --- a/src/en/guide/REST/restProfile.adoc +++ b/src/en/guide/REST/restProfile.adoc @@ -23,6 +23,6 @@ $ grails create-domain-class my.api.Book $ ./gradlew runCommand -Pargs="generate-all my.api.Book" ---- -NOTE: The generate-* commands are only available after adding the `org.grails.plugins:scaffolding` dependency to your project. They are not available by default in a REST application. Also, they will no longer produce *.gson files as that was a feature of the REST API-profile. Profiles where removed in Grails 6. +NOTE: The generate-* commands are only available after adding the `org.grails.plugins:scaffolding` dependency to your project. They are not available by default in a REST application. Also, they will no longer produce *.gson files as that was a feature of the REST API-profile. Instead of CRUD HTML interface a REST endpoint is generated that produces JSON responses. In addition, the generated functional and unit tests by default test the REST endpoint. diff --git a/src/en/guide/commandLine/gradleBuild/gradleDependencies.adoc b/src/en/guide/commandLine/gradleBuild/gradleDependencies.adoc index 914705517d9..22248ce3b12 100644 --- a/src/en/guide/commandLine/gradleBuild/gradleDependencies.adoc +++ b/src/en/guide/commandLine/gradleBuild/gradleDependencies.adoc @@ -49,8 +49,7 @@ build.gradle, using Gradle Platforms: ---- dependencies { implementation platform("org.grails:grails-bom:$grailsVersion") - - + // all other dependencies } ---- diff --git a/src/en/guide/index.adoc b/src/en/guide/index.adoc index 7e4cc29fbc4..617d3b9e390 100644 --- a/src/en/guide/index.adoc +++ b/src/en/guide/index.adoc @@ -9,7 +9,7 @@ Puneet Behl, Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, include::introduction.adoc[] [[whatsNew]] -=== What's new in Grails 6? +=== What's new in Grails 7? include::introduction/whatsNew.adoc[] diff --git a/src/en/guide/introduction.adoc b/src/en/guide/introduction.adoc index 28c9252e45e..ccc75eee228 100644 --- a/src/en/guide/introduction.adoc +++ b/src/en/guide/introduction.adoc @@ -4,9 +4,9 @@ Dynamic frameworks like Rails and Django helped pave the way to a more modern wa Grails is a full stack framework and attempts to solve as many pieces of the web development puzzle through the core technology and its associated plugins. Included out the box are things like: -* http://gorm.grails.org[GORM] - An easy to use Object Mapping library with support for http://gorm.grails.org/latest/hibernate[SQL], http://gorm.grails.org/latest/mongodb[MongoDB], http://gorm.grails.org/latest/neo4j[Neo4j] and http://gorm.grails.org[more]. +* http://gorm.grails.org[GORM] - An easy-to-use Object Mapping library with support for http://gorm.grails.org/latest/hibernate[SQL], http://gorm.grails.org/latest/mongodb[MongoDB], http://gorm.grails.org/latest/neo4j[Neo4j] and http://gorm.grails.org[more]. * View technologies for https://gsp.grails.org[rendering HTML] as well as http://views.grails.org[JSON] -* A controller layer built on http://www.spring.io[Spring Boot] +* A controller layer built on https://spring.io/projects/spring-boot[Spring Boot] * A plugin system featuring http://plugins.grails.org[hundreds of plugins]. * Flexible profiles to http://start.grails.org/#/index[create applications with AngularJS, React and more]. * An interactive command line environment and build system based on http://gradle.org[Gradle] diff --git a/src/en/guide/toc.yml b/src/en/guide/toc.yml index 4332bcd7245..c703f21c880 100644 --- a/src/en/guide/toc.yml +++ b/src/en/guide/toc.yml @@ -1,7 +1,7 @@ introduction: title: Introduction whatsNew: - title: What's new in Grails 6? + title: What's new in Grails 7? dependencyUpgrades: Updated Dependencies gettingStarted: title: Getting Started diff --git a/src/en/ref/Dependency Versions/Grails BOM.adoc b/src/en/ref/Dependency Versions/Grails BOM.adoc index 85eb030c329..a034670a670 100644 --- a/src/en/ref/Dependency Versions/Grails BOM.adoc +++ b/src/en/ref/Dependency Versions/Grails BOM.adoc @@ -22,10 +22,6 @@ This document provides information about the dependencies mentioned in the Grail | jakarta.annotation-api | {jakarta_annotation_jakarta_annotation_api_version} -| jakarta.annotation -| jakarta.annotation-api -| {jakarta_annotation_jakarta_annotation_api_version} - | org.codehaus.groovy | groovy, groovy-ant, groovy-console, groovy-dateutil, groovy-json, groovy-macro, groovy-nio, groovy-sql, groovy-swing, groovy-templates, groovy-xml | {org_codehaus_groovy_groovy_version} @@ -46,10 +42,6 @@ This document provides information about the dependencies mentioned in the Grail | grails-gorm-testing-support, grails-testing-support, grails-web-testing-support | {org_grails_grails_testing_support_version} -| org.grails -| scaffolding-core -| {org_grails_scaffolding_core_version} - | org.grails | views-json-testing-support | {org_grails_views_json_testing_support_version} From f3dcc13c6cd95325ec5ceb2edf45f02f53282b5a Mon Sep 17 00:00:00 2001 From: James Fredley Date: Fri, 13 Dec 2024 23:00:17 -0500 Subject: [PATCH 6/9] more cleanup --- src/en/guide/deployment/deploymentContainer.adoc | 2 +- src/en/guide/gettingStarted/ide.adoc | 2 +- src/en/guide/gettingStarted/requirements.adoc | 3 +++ src/en/guide/gettingStarted/supportedJakartaEEContainers.adoc | 2 +- src/en/guide/index.adoc | 2 +- src/en/guide/upgrading/upgrading50x.adoc | 2 -- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/en/guide/deployment/deploymentContainer.adoc b/src/en/guide/deployment/deploymentContainer.adoc index 4b33021e103..55df2ff9c18 100644 --- a/src/en/guide/deployment/deploymentContainer.adoc +++ b/src/en/guide/deployment/deploymentContainer.adoc @@ -26,4 +26,4 @@ testImplementation "org.springframework.boot:spring-boot-starter-tomcat" == Application servers -The Grails framework requires that runtime containers support Servlet 3.0 and above. By default, Grails framework applications are bundled with an embeddable Tomcat and testing is primarily done with Tomcat. Any servlet container meeting the minimum requirements should be able to run Grails framework applications, but some workarounds may be required for container-specific bugs or configurations. +The Grails framework requires that runtime containers support Servlet 6.0.0 and above. By default, Grails framework applications are bundled with an embeddable Tomcat and testing is primarily done with Tomcat. Any servlet container meeting the minimum requirements should be able to run Grails framework applications, but some workarounds may be required for container-specific bugs or configurations. diff --git a/src/en/guide/gettingStarted/ide.adoc b/src/en/guide/gettingStarted/ide.adoc index 1306dce8f42..f60cc956328 100644 --- a/src/en/guide/gettingStarted/ide.adoc +++ b/src/en/guide/gettingStarted/ide.adoc @@ -4,7 +4,7 @@ Because Grails is built upon the https://spring.io[Spring Framework] (Spring Boo IntelliJ IDEA is a widely used IDE for Grails development. It offers comprehensive support for Groovy and Grails, including features like code-completion, intelligent code analysis, and seamless integration with Grails artefacts. -IntelliJ IDEA also provides powerful database tools that work with Grails' GORM (Grails Object Relational Mapping) seamlessly. It offers both a Community (free) and Ultimate (paid) edition, with the latter offering more advanced Grails support, including an embedded version of the https://start.grails.org[Grails Forge], and view resolution for both GSPs and JSON views. +IntelliJ IDEA also provides powerful database tools that work with Grails' GORM (Grails Object Relational Mapping) seamlessly. It offers both a Community (free) and Ultimate (paid) edition, with the latter offering more advanced Grails support via the regularly updated https://plugins.jetbrains.com/plugin/18504-grails/versions[Grails Plugin], including an embedded version of the https://start.grails.org[Grails Forge], and view resolution for both GSPs and JSON views. https://www.jetbrains.com/idea/[IntelliJ IDEA Website] diff --git a/src/en/guide/gettingStarted/requirements.adoc b/src/en/guide/gettingStarted/requirements.adoc index 560fbe0efc8..04d3ad6ff9f 100644 --- a/src/en/guide/gettingStarted/requirements.adoc +++ b/src/en/guide/gettingStarted/requirements.adoc @@ -1,9 +1,12 @@ Before installing Grails you will need a Java Development Kit (JDK) installed with the minimum version denoted in the table below. Download the appropriate JDK for your operating system, run the installer, and then set up an environment variable called `JAVA_HOME` pointing to the location of this installation. +We recommend Liberica JDK 17 LTS: https://bell-sw.com/pages/downloads/#jdk-17-lts + [cols="1,1"] |=== | Grails version | JDK version (minimum) +| 7 | 17 | 6 | 11 | 5 | 8 |=== diff --git a/src/en/guide/gettingStarted/supportedJakartaEEContainers.adoc b/src/en/guide/gettingStarted/supportedJakartaEEContainers.adoc index c30ba95e562..e333a1e1564 100644 --- a/src/en/guide/gettingStarted/supportedJakartaEEContainers.adoc +++ b/src/en/guide/gettingStarted/supportedJakartaEEContainers.adoc @@ -1,3 +1,3 @@ -The Grails framework requires that runtime containers support Servlet 3.0 and above. By default, Grails framework applications are bundled with an embedded Tomcat server. For more information, please see the link:deployment.html[Deployment] section of this documentation. +The Grails framework requires that runtime containers support Servlet 6.0.0 and above. By default, Grails framework applications are bundled with an embedded Tomcat server. For more information, please see the link:deployment.html[Deployment] section of this documentation. In addition, read the https://guides.grails.org/[Grails Guides] for tips on how to deploy Grails to various popular Cloud services. diff --git a/src/en/guide/index.adoc b/src/en/guide/index.adoc index 617d3b9e390..4cf0f3b0ba5 100644 --- a/src/en/guide/index.adoc +++ b/src/en/guide/index.adoc @@ -747,7 +747,7 @@ include::async/asyncGorm.adoc[] include::async/asyncRequests.adoc[] [[asyncServletApi]] -=== Servlet 3.0 Async +=== Servlet 6.0.0 Async include::async/asyncServletApi.adoc[] diff --git a/src/en/guide/upgrading/upgrading50x.adoc b/src/en/guide/upgrading/upgrading50x.adoc index 6657e31c3a7..17959b8ecf8 100644 --- a/src/en/guide/upgrading/upgrading50x.adoc +++ b/src/en/guide/upgrading/upgrading50x.adoc @@ -32,8 +32,6 @@ For example, to run your Grails 6 application, you can use the following command As a result of these improvements, the new CLI provides a more streamlined and efficient way to work with Grails applications and plugins. -Additionally, in order to fully embrace the improvements in Grails 6, it is advised to remove the old Grails wrapper files `./grailsw` and `./grails` from your project root folder. This ensures that you solely rely on the enhanced capabilities of the new CLI. - Overall, Grails 6 offers a significantly improved development experience with its new CLI, optimized commands, and advanced features for generating applications and plugins. #### 3. Setting Grails Version and Grails Gradle Plugin: From 264f1ee9bf14dd776961df4d78cf1712e7327507 Mon Sep 17 00:00:00 2001 From: Mattias Reichel Date: Mon, 16 Dec 2024 23:12:12 +0100 Subject: [PATCH 7/9] docs: add whats new section about `grails-geb` update --- src/en/guide/introduction/whatsNew.adoc | 33 ++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/src/en/guide/introduction/whatsNew.adoc b/src/en/guide/introduction/whatsNew.adoc index 90f48d94527..423c238f812 100644 --- a/src/en/guide/introduction/whatsNew.adoc +++ b/src/en/guide/introduction/whatsNew.adoc @@ -6,4 +6,35 @@ Grails framework 7 updates Spring Boot to version 3.4. We recommend checking the * https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.4-Release-Notes[Spring Boot 3.4] -The minimum Java version required to run Grails 7 has been updated to Java 17. \ No newline at end of file +The minimum Java version required to run Grails 7 has been updated to Java 17. + +=== Ubiquitous Containerized Browser Testing with Geb + +The https://github.com/grails/geb[Grails Geb Plugin] has received a significant update, introducing test fixtures that enable ubiquitous containerized browser testing. + +This new approach is now the recommended way to write functional tests in Grails. However, the previous method using WebDriver binaries remains supported for backward compatibility. + +==== Key Features + +By extending your test classes with `ContainerGebSpec`, your tests will automatically leverage a containerized browser provided by https://www.testcontainers.org[Testcontainers]. This setup eliminates the need for managing browser versions and ensures consistent test environments. + +==== Requirements + +To use `ContainerGebSpec`, ensure that you have a compatible container runtime installed. Supported options include: + +- **Docker Desktop** +- **OrbStack** (macOS only) +- **Rancher Desktop** +- **Podman Desktop** +- **Colima** (macOS and Linux) + +==== How It Works + +Once a compatible container runtime is installed, no additional configuration is needed. Simply extend your test classes with `ContainerGebSpec` (instead of `GebSpec`), and the following will happen: + +1. A container will be started automatically when you run your integration tests. +2. The container will be configured to launch a browser capable of accessing your application under test. + +With this setup, you gain the benefits of containerized testing, such as isolation, reproducibility, and reduced setup complexity. + + From 7a6bd1f9186d2ed86fc39cf5c9d30a42dbadf98d Mon Sep 17 00:00:00 2001 From: James Fredley Date: Tue, 17 Dec 2024 12:05:50 -0500 Subject: [PATCH 8/9] remove space after textFixtures --- src/en/guide/commandLine/gradleBuild/gradleDependencies.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/en/guide/commandLine/gradleBuild/gradleDependencies.adoc b/src/en/guide/commandLine/gradleBuild/gradleDependencies.adoc index 22248ce3b12..78aea6366e0 100644 --- a/src/en/guide/commandLine/gradleBuild/gradleDependencies.adoc +++ b/src/en/guide/commandLine/gradleBuild/gradleDependencies.adoc @@ -29,7 +29,7 @@ dependencies { runtimeOnly "com.h2database:h2" runtimeOnly "org.apache.tomcat:tomcat-jdbc" runtimeOnly "org.fusesource.jansi:jansi" - integrationTestImplementation testFixtures ("org.grails.plugins:geb") + integrationTestImplementation testFixtures("org.grails.plugins:geb") testImplementation "org.grails:grails-gorm-testing-support" testImplementation "org.grails:grails-web-testing-support" testImplementation "org.spockframework:spock-core" From e77a89f4d8b53cd75e61647fceeb0c9b70feaae7 Mon Sep 17 00:00:00 2001 From: James Fredley Date: Tue, 17 Dec 2024 12:06:18 -0500 Subject: [PATCH 9/9] Update Liberica JDK recommendation to link to Spring's recommendation --- src/en/guide/gettingStarted/requirements.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/en/guide/gettingStarted/requirements.adoc b/src/en/guide/gettingStarted/requirements.adoc index 04d3ad6ff9f..aa119b19e9a 100644 --- a/src/en/guide/gettingStarted/requirements.adoc +++ b/src/en/guide/gettingStarted/requirements.adoc @@ -1,6 +1,6 @@ Before installing Grails you will need a Java Development Kit (JDK) installed with the minimum version denoted in the table below. Download the appropriate JDK for your operating system, run the installer, and then set up an environment variable called `JAVA_HOME` pointing to the location of this installation. -We recommend Liberica JDK 17 LTS: https://bell-sw.com/pages/downloads/#jdk-17-lts +We recommend https://bell-sw.com/pages/downloads/#jdk-17-lts[Liberica JDK 17 LTS] based on https://spring.io/quickstart[Spring's JDK recommendation]. [cols="1,1"] |===