You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: grails-doc/src/en/guide/upgrading/upgrading60x.adoc
+74-46Lines changed: 74 additions & 46 deletions
Original file line number
Diff line number
Diff line change
@@ -19,20 +19,20 @@ under the License.
19
19
20
20
=== Upgrade Instructions for Grails and Related Dependencies
21
21
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.
23
23
This guide outlines the necessary steps & warnings to upgrade your Grails project.
24
24
25
25
==== 1. Java 17 as baseline:
26
26
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.
29
29
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.
31
31
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.
32
32
33
-
==== 2. Groovy 4.0.27 as a baseline:
33
+
==== 2. Groovy {groovyVersion} as a baseline:
34
34
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.
36
36
Several changes in Groovy 4 can affect your application.
37
37
Notable changes include:
38
38
@@ -51,23 +51,23 @@ In your gradle file, you can force a dependency upgrade via this code:
As part of this move, all projects that make up a grails release now have a common version.
64
64
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.
65
65
Please remove older properties such as `gormVersion` & `grailsGradlePluginVersion` and exclusively use this property going forward.
66
66
67
67
.gradle.properties
68
68
[,,subs="attributes"]
69
69
----
70
-
grailsVersion=7.0.0
70
+
grailsVersion={version}
71
71
----
72
72
73
73
==== 4. Unified Bill of Materials
@@ -77,7 +77,7 @@ Instead it had a `micronaut-bom` and a `spring-bom`.
77
77
With the removal of Micronaut from the Grails, the `micronaut-bom` is no longer needed.
78
78
Instead, we can have a single bom that inherits from the `spring-bom`.
79
79
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.
81
81
This BOM is available in the `org.apache.grails:grails-bom` artifact.
82
82
The BOM is automatically applied when a Grails Gradle plugin is applied via the Spring Dependency Management plugin.
83
83
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
100
100
Grails has transitioned to the Apache Software Foundation (ASF).
101
101
As a result, the group ID for Grails artifacts has changed to `org.apache.grails`.
102
102
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.
104
104
105
105
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.
106
106
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
114
114
115
115
==== 6. Gradle Changes:
116
116
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.
118
118
119
119
===== 6.1. Gradle Plugin Changes
120
120
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:
127
127
128
128
===== 6.2. Upgrading Gradle:
129
129
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:
@@ -166,15 +166,15 @@ The benefits of reproducible builds are well documented, but for Grails applicat
166
166
To make your local build reproducible, you'll want to set the environment variable `SOURCE_DATE_EPOCH` to a fixed date.
167
167
For Grails, we set this value to the last commit in git via the bash command: `SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)`
168
168
169
-
==== 8. Spring 6.2.6:
169
+
==== 8. Spring {springVersion}:
170
170
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].
172
172
173
173
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.
174
174
175
-
==== 9. Spring Boot 3.5.0:
175
+
==== 9. Spring Boot {springBootVersion}:
176
176
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:
@@ -205,7 +205,7 @@ Both the legacy `grails-shell-cli` and `grails-forge-cli` are now included with
205
205
206
206
==== 12. Breaking changes
207
207
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.
209
209
210
210
===== 12.1
211
211
@@ -314,65 +314,93 @@ This new approach is now the recommended way to write functional tests in Grails
314
314
315
315
The previous method using WebDriver binaries remains supported for backward compatibility, although matching driver and browser versions can be challenging.
316
316
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
+
317
340
===== 12.11 Asset Pipeline
318
341
319
342
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.
320
343
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
+
321
362
===== 12.12 API Changes
322
363
323
364
As part of any major release, APIs can change. For Grails 7.0, the list of renamed APIs follows:
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.
330
371
331
-
====== 12.14 grails-layout Configuration
372
+
===== 12.14 grails-layout Configuration
332
373
333
374
If you decide to use the `grails-layout` plugin, several changes have occurred:
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.
372
400
373
-
With this setup, you gain the benefits of containerized testing, such as isolation, reproducibility, and reduced setup complexity.
401
+
* sitemesh -> grailsLayout
374
402
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
376
404
377
405
These limits can be customized using `server.tomcat.max-part-count` and `server.tomcat.max-part-header-size` respectively.
0 commit comments