Skip to content

Commit e8701f1

Browse files
authored
Merge pull request #14908 from apache/update-doc-cleanup
Use version variables + minor copy and formatting adjustments
2 parents dd5ef36 + 498bcda commit e8701f1

File tree

1 file changed

+74
-46
lines changed

1 file changed

+74
-46
lines changed

grails-doc/src/en/guide/upgrading/upgrading60x.adoc

Lines changed: 74 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ under the License.
1919

2020
=== Upgrade Instructions for Grails and Related Dependencies
2121

22-
To ensure compatibility with Grails 7.0.0, please review the following upgrade instructions carefully.
22+
To ensure compatibility with Grails {version}, please review the following upgrade instructions carefully.
2323
This guide outlines the necessary steps & warnings to upgrade your Grails project.
2424

2525
==== 1. Java 17 as baseline:
2626

27-
Starting from Grails 7.0.0, Java 17 serves as the baseline requirement for the framework.
28-
When upgrading to Grails 7.0.0, ensure that your project is configured to use Java 17. Updating to Java 17 allows you to take advantage of the latest features, security enhancements, and performance improvements provided by Java 17.
27+
Starting from Grails 7, Java 17 serves as the baseline requirement for the framework, matching Spring Framework and Spring Boot's minimum Java version.
28+
When upgrading to Grails 7, ensure that your project is configured to use Java 17. Updating to Java 17 allows you to take advantage of the latest features, security enhancements, and performance improvements provided by Java 17.
2929

30-
Please make sure to update your project's Java version to 17 before proceeding with the Grails 7.0.0 upgrade.
30+
Please make sure to update your project's Java version to 17 before proceeding with the Grails 7 upgrade.
3131
Doing so will ensure a seamless transition to the latest version of Grails and enable you to enjoy all the benefits that Java 17 has to offer.
3232

33-
==== 2. Groovy 4.0.27 as a baseline:
33+
==== 2. Groovy {groovyVersion} as a baseline:
3434

35-
Grails 7.0.0 adopts Groovy 4.0.27 as it's baseline requirement.
35+
Grails {version} adopts Groovy {groovyVersion} as it's baseline requirement.
3636
Several changes in Groovy 4 can affect your application.
3737
Notable changes include:
3838

@@ -51,23 +51,23 @@ In your gradle file, you can force a dependency upgrade via this code:
5151
configurations.configureEach {
5252
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
5353
if (details.requested.group == 'org.codehaus.groovy') {
54-
details.useTarget(group: 'org.apache.groovy', name: details.requested.name, version: '4.0.27')
54+
details.useTarget(group: 'org.apache.groovy', name: details.requested.name, version: '{groovyVersion}')
5555
}
5656
}
5757
}
5858
----
5959

6060
==== 3. Unified Project Version
6161

62-
Grails 7.0.0 moved to a mono repository.
62+
Grails 7 moved to a mono repository.
6363
As part of this move, all projects that make up a grails release now have a common version.
6464
Setting `grailsVersion` in `gradle.properties` is the proper way to specify a set of dependencies that are compatible with each other for a given Grails release.
6565
Please remove older properties such as `gormVersion` & `grailsGradlePluginVersion` and exclusively use this property going forward.
6666

6767
.gradle.properties
6868
[,,subs="attributes"]
6969
----
70-
grailsVersion=7.0.0
70+
grailsVersion={version}
7171
----
7272

7373
==== 4. Unified Bill of Materials
@@ -77,7 +77,7 @@ Instead it had a `micronaut-bom` and a `spring-bom`.
7777
With the removal of Micronaut from the Grails, the `micronaut-bom` is no longer needed.
7878
Instead, we can have a single bom that inherits from the `spring-bom`.
7979

80-
Grails 7.0.0 introduces a BOM that includes all the dependencies required for a Grails application.
80+
Grails 7 introduces a BOM that includes all the dependencies required for a Grails application.
8181
This BOM is available in the `org.apache.grails:grails-bom` artifact.
8282
The BOM is automatically applied when a Grails Gradle plugin is applied via the Spring Dependency Management plugin.
8383
For projects that do not use a Grails Gradle plugin, you can apply the BOM via a https://docs.gradle.org/current/userguide/java_platform_plugin.html#sec:java_platform_consumption[Gradle Platform]:
@@ -100,7 +100,7 @@ Please see xref:../ref/Versions/Grails BOM.adoc[Grails BOM Dependencies] for a q
100100
Grails has transitioned to the Apache Software Foundation (ASF).
101101
As a result, the group ID for Grails artifacts has changed to `org.apache.grails`.
102102
This change applies to all Grails packages, including core plugins and core dependencies, maintained by the Grails team.
103-
When upgrading to Grails 7.0.0, ensure that you update your build configuration to use the new group ID.
103+
When upgrading to Grails 7, ensure that you update your build configuration to use the new group ID.
104104

105105
There is a https://github.com/apache/grails-core/blob/7.0.x/RENAME.md[RENAME.md] in the grails-core repository that maps previous coordinate names to new names.
106106
Additionally, there is a script to aid in the updating of Grails projects to the new coordinates.
@@ -114,7 +114,7 @@ This script will scan any gradle file and attempt to update both exclusions & de
114114

115115
==== 6. Gradle Changes:
116116

117-
One of the major changes in Grails 7.0.0 is the modernization of it's build system. As a side effect of this modernization, the Grails build is fully parallel & https://docs.gradle.org/current/userguide/task_configuration_avoidance.html[lazy]. Moreover, most tasks have been enhanced to be cacheable. When updating to Grails 7.0.0, there may be required updates to various tasks we distribute since the inputs of those tasks have changed to support lazy configuration.
117+
One of the major changes in Grails 7 is the modernization of it's build system. As a side effect of this modernization, the Grails build is fully parallel & https://docs.gradle.org/current/userguide/task_configuration_avoidance.html[lazy]. Moreover, most tasks have been enhanced to be cacheable. When updating to Grails {version}, there may be required updates to various tasks we distribute since the inputs of those tasks have changed to support lazy configuration.
118118

119119
===== 6.1. Gradle Plugin Changes
120120
As part of the cacheable task changes, some tasks have slightly new behaviors:
@@ -127,11 +127,11 @@ As part of the cacheable task changes, some tasks have slightly new behaviors:
127127

128128
===== 6.2. Upgrading Gradle:
129129

130-
It is recommended to set your gradle version to a version of 8.14 or higher:
130+
It is recommended to set your gradle version to a version of {gradleVersion} or higher:
131131

132132
[,console,subs="attributes"]
133133
----
134-
./gradlew wrapper --gradle-version 8.14
134+
./gradlew wrapper --gradle-version {gradleVersion}
135135
----
136136

137137
This command will download the specified Gradle version and update the Gradle wrapper settings in your project.
@@ -143,7 +143,7 @@ The `distributionUrl` in the file should now point to the specified Gradle versi
143143

144144
[,,subs="attributes"]
145145
----
146-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
146+
distributionUrl=https\://services.gradle.org/distributions/gradle-{gradleVersion}-bin.zip
147147
----
148148

149149
===== 6.4. Removed Gradle Plugins
@@ -166,15 +166,15 @@ The benefits of reproducible builds are well documented, but for Grails applicat
166166
To make your local build reproducible, you'll want to set the environment variable `SOURCE_DATE_EPOCH` to a fixed date.
167167
For Grails, we set this value to the last commit in git via the bash command: `SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)`
168168

169-
==== 8. Spring 6.2.6:
169+
==== 8. Spring {springVersion}:
170170

171-
Grails 7.0.0 is built on the Spring Framework, version 6.2.6. 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].
171+
Grails {version} is built on the Spring Framework, version {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].
172172

173173
This update introduces enhancements and fixes to the Spring Framework, providing you with the latest improvements in dependency injection, web frameworks, and other Spring-related functionalities.
174174

175-
==== 9. Spring Boot 3.5.0:
175+
==== 9. Spring Boot {springBootVersion}:
176176

177-
Grails 6 used Spring Boot 2.7. Grails 7.0.0 updates this to Spring Boot 3.5.0. For more information, consult the release notes for previous Spring Boot releases:
177+
Grails 6 used Spring Boot 2.7.x. Grails {version} updates this to Spring Boot {springBootVersion}. For more information, consult the release notes for previous Spring Boot releases:
178178
1. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.5-Release-Notes[Spring Boot 3.5 Release Notes]
179179
2. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.4-Release-Notes[Spring Boot 3.4 Release Notes]
180180
3. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.4-Release-Notes[Spring Boot 3.3 Release Notes]
@@ -205,7 +205,7 @@ Both the legacy `grails-shell-cli` and `grails-forge-cli` are now included with
205205

206206
==== 12. Breaking changes
207207

208-
Grails 7.0.0 introduces several breaking changes that may require updates to your application.
208+
Grails 7 introduces several breaking changes that may require updates to your application.
209209

210210
===== 12.1
211211

@@ -314,65 +314,93 @@ This new approach is now the recommended way to write functional tests in Grails
314314

315315
The previous method using WebDriver binaries remains supported for backward compatibility, although matching driver and browser versions can be challenging.
316316

317+
====== Key Features
318+
319+
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.
320+
321+
====== Requirements
322+
323+
To use `ContainerGebSpec`, ensure that you have a compatible container runtime installed. Supported options include:
324+
325+
- **Docker Desktop**
326+
- **OrbStack** (macOS only)
327+
- **Rancher Desktop**
328+
- **Podman Desktop**
329+
- **Colima** (macOS and Linux)
330+
331+
====== How It Works
332+
333+
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:
334+
335+
1. A container will be started automatically when you run your integration tests.
336+
2. The container will be configured to launch a browser capable of accessing your application under test.
337+
338+
With this setup, you gain the benefits of containerized testing, such as isolation, reproducibility, and reduced setup complexity.
339+
317340
===== 12.11 Asset Pipeline
318341

319342
The asset pipeline has a new https://github.com/wondrify/asset-pipeline[home]. Version 5.0.12 and forward is compatible with Grails 7.x.
320343

344+
Updated maven coordinates:
345+
346+
```console
347+
cloud.wondrify:asset-pipeline-gradle
348+
cloud.wondrify:asset-pipeline-grails
349+
```
350+
351+
Gradle plugin:
352+
```console
353+
plugins {
354+
id "cloud.wondrify.asset-pipeline"
355+
}
356+
357+
or
358+
359+
apply plugin: "cloud.wondrify.asset-pipeline"
360+
```
361+
321362
===== 12.12 API Changes
322363

323364
As part of any major release, APIs can change. For Grails 7.0, the list of renamed APIs follows:
324365

325366
* GrailsClassUtils#isMatchBetweenPrimativeAndWrapperTypes -> GrailsClassUtils#isMatchBetweenPrimitiveAndWrapperTypes
326367

327-
====== 12.13 Layout Plugins
368+
===== 12.13 Layout Plugins
328369

329370
Grails 7 has two different layout engines: Sitemesh 2.6.x & Sitemesh 3.x. The Sitemesh2 plugin is named `grails-layout` and the Sitemesh 3 plugin is `grails-sitemesh3`. The `grails-layout` plugin is what has traditionally shipped with Grails. The `grails-sitemesh3` plugin is functional, but has some known issues. Please see the thread https://lists.apache.org/thread/8lynrl0yd6ykn749md1g2wjb8jph3s5l[Grails 7 & Reverting Sitemesh 3] for the history of why we did not exclusively use `grails-sitemesh3` for Grails 7.
330371

331-
====== 12.14 grails-layout Configuration
372+
===== 12.14 grails-layout Configuration
332373

333374
If you decide to use the `grails-layout` plugin, several changes have occurred:
334375

376+
Add the following dependency to your project:
377+
378+
```console
379+
implementation "org.apache.grails:grails-layout"
380+
```
381+
335382
Package Changes:
383+
336384
* grails.web.sitemesh -> org.apache.grails.web.layout
337385
* org.grails.web.sitemesh -> org.apache.grails.views.gsp.layout
338386

339387
Notable Class Moves:
388+
340389
* org.grails.web.servlet.view.GrailsLayoutViewResolver -> org.apache.grails.web.layout.EmbeddedGrailsLayoutViewResolver
341390
* org.grails.web.servlet.view.SitemeshLayoutViewResolver -> org.apache.grails.web.layout.GrailsLayoutViewResolver
342391
* org.grails.web.sitemesh.GrailsLayoutView -> org.apache.grails.web.layout.EmbeddedGrailsLayoutView
343392
* org.grails.web.sitemesh.SitemeshLayoutView -> org.apache.grails.web.layout.GrailsLayoutView
344393

345394
Property Changes:
395+
346396
* grails.sitemesh.default.layout -> grails.views.layout.default
347397
* grails.sitemesh.enable.nongsp -> grails.views.layout.enable.nongsp
348398

349399
Tag namespace changes:
350-
* sitemesh -> grailsLayout
351-
352-
====== Key Features
353-
354-
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.
355-
356-
====== Requirements
357-
358-
To use `ContainerGebSpec`, ensure that you have a compatible container runtime installed. Supported options include:
359-
360-
- **Docker Desktop**
361-
- **OrbStack** (macOS only)
362-
- **Rancher Desktop**
363-
- **Podman Desktop**
364-
- **Colima** (macOS and Linux)
365-
366-
====== How It Works
367-
368-
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:
369-
370-
1. A container will be started automatically when you run your integration tests.
371-
2. The container will be configured to launch a browser capable of accessing your application under test.
372400

373-
With this setup, you gain the benefits of containerized testing, such as isolation, reproducibility, and reduced setup complexity.
401+
* sitemesh -> grailsLayout
374402

375-
===== 12.10 Tomcat 10.1.42 introduced limits for part count and header size in multipart/form-data requests
403+
===== 12.15 Tomcat 10.1.42 introduced limits for part count and header size in multipart/form-data requests
376404

377405
These limits can be customized using `server.tomcat.max-part-count` and `server.tomcat.max-part-header-size` respectively.
378406

0 commit comments

Comments
 (0)