Copilot commented on code in PR #16350:
URL: https://github.com/apache/grails-core/pull/16350#discussion_r4040251846


##########
grails-data-graphql/core/build.gradle:
##########
@@ -40,6 +40,7 @@ ext {
 dependencies {
 
     implementation platform(project(':grails-bom'))
+    testImplementation platform(project(':grails-hibernate7-bom'))

Review Comment:
   This adds `grails-hibernate7-bom` to `testImplementation` while the module 
still declares `grails-bom` on `implementation` (and 
`testFixturesImplementation`). The dependency validator explicitly fails when 
distinct Grails BOMs occur on real configurations, so this module's validation 
will fail; align it to one BOM strategy.



##########
grails-fields/build.gradle:
##########
@@ -41,6 +41,7 @@ ext {
 
 dependencies {
     implementation platform(project(':grails-bom'))
+    testImplementation platform(project(':grails-hibernate7-bom'))

Review Comment:
   This adds `grails-hibernate7-bom` to `testImplementation` while the project 
still declares `grails-bom` on `implementation`. 
`GrailsDependencyValidatorPlugin.detectBomPath` scans all real configurations 
and fails when two distinct Grails BOMs are present, so 
`:grails-fields:validateDependencyVersions` will fail; align the configurations 
to one BOM instead of layering these platforms.



##########
grails-test-examples/geb-context-path/build.gradle:
##########
@@ -47,15 +47,15 @@ dependencies {
     } else {
         implementation 'org.apache.grails:grails-sitemesh3'
     }
-    implementation 'org.apache.grails:grails-data-hibernate5'
+    implementation 'org.apache.grails:grails-data-hibernate7'

Review Comment:
   The checked-in `grails-cli.yml` for this app still sets `gormImpl: 
gorm-hibernate5` and includes `gorm-hibernate5` in `features` (lines 21 and 
23). Forge now rejects both values, so regenerating this fixture from its 
metadata fails despite the H7 dependency change here; update the metadata to H7.



##########
grails-forge/grails-forge-core/src/main/java/org/grails/forge/options/GormImpl.java:
##########
@@ -23,14 +23,15 @@
 
 public enum GormImpl {
 
-    HIBERNATE5("gorm-hibernate5", "Hibernate 5"),
     HIBERNATE7("gorm-hibernate7", "Hibernate 7"),

Review Comment:
   Removing the HIBERNATE5 option makes `gorm-hibernate5` unavailable, but 
current command-line docs still advertise it and the checked-in Forge CLI 
fixtures for `geb`, `geb-context-path`, `gsp-layout`, and `gsp-sitemesh3` still 
set `gormImpl: gorm-hibernate5` and include that feature. Those fixtures will 
now fail feature resolution (and the docs direct users to a removed feature); 
update these current references to `hibernate7`, while retaining only 
explicitly historical upgrade references.



##########
grails-test-examples/graphql/grails-multi-datastore-app/build.gradle:
##########
@@ -47,7 +47,7 @@ dependencies {
     implementation 'org.apache.grails:grails-logging'
     implementation 'org.apache.grails:grails-cache'
     implementation 'org.apache.grails:grails-async'
-    implementation 'org.apache.grails:grails-data-hibernate5'
+    implementation 'org.apache.grails:grails-data-hibernate7'

Review Comment:
   This dependency block now selects Hibernate 7, but it still declares 
`org.hibernate:hibernate-core-jakarta`, the Hibernate 5-era artifact. The 
Hibernate 7 BOM manages `org.hibernate.orm:hibernate-core`; leaving this old 
coordinate either makes the unversioned dependency unresolved or reintroduces 
Hibernate 5/LGPL onto the example's classpath. Replace it with the Hibernate 7 
coordinate (or remove it if the GORM transitive is sufficient).



##########
grails-test-examples/graphql/grails-test-app/build.gradle:
##########
@@ -48,7 +48,7 @@ dependencies {
     implementation 'org.apache.grails:grails-cache'
     implementation 'org.apache.grails:grails-async'
     implementation 'org.apache.grails:grails-events'
-    implementation 'org.apache.grails:grails-data-hibernate5'
+    implementation 'org.apache.grails:grails-data-hibernate7'

Review Comment:
   This dependency block now selects Hibernate 7, but it still declares 
`org.hibernate:hibernate-core-jakarta`, the Hibernate 5-era artifact. The 
Hibernate 7 BOM manages `org.hibernate.orm:hibernate-core`; leaving this old 
coordinate either makes the unversioned dependency unresolved or reintroduces 
Hibernate 5/LGPL onto the example's classpath. Replace it with the Hibernate 7 
coordinate (or remove it if the GORM transitive is sufficient).



##########
grails-views-gson/build.gradle:
##########
@@ -39,6 +39,7 @@ ext {
 
 dependencies {
     implementation platform(project(':grails-bom'))
+    testImplementation platform(project(':grails-hibernate7-bom'))

Review Comment:
   This adds `grails-hibernate7-bom` to `testImplementation` while `grails-bom` 
remains on `implementation`. The shared dependency validator rejects projects 
that declare two distinct Grails BOMs across real configurations, so 
`:grails-views-gson:validateDependencyVersions` will fail during validation; 
use a single BOM strategy for this project.



##########
grails-test-suite-uber/build.gradle:
##########
@@ -31,6 +31,7 @@ group = 'org.apache.grails.testing'
 
 dependencies {
     implementation platform(project(':grails-bom'))
+    testImplementation platform(project(':grails-hibernate7-bom'))

Review Comment:
   This adds the Hibernate 7 BOM to `testImplementation` while `grails-bom` 
remains on `implementation`. The shared validator scans all real configurations 
and fails on two distinct Grails BOMs, so 
`:grails-test-suite-uber:validateDependencyVersions` will fail; consolidate the 
BOM declarations.



##########
grails-doc/src/en/guide/upgrading/upgrading40x.adoc:
##########
@@ -84,7 +84,7 @@ Grails 4.0 is built on Spring 5 and Spring Boot 2.1. See the 
https://github.com/
 
 Grails 4.x supports a minimum version of Hibernate 5.4 and GORM 7.x. Several 
changes have been made to GORM to support the newer version of Hibernate and 
simplify GORM itself.
 
-The details of these changes are covered in the  
link:{hibernate5Guide}index.html#upgradeNotes[GORM upgrade documentation].
+The details of these changes are covered in the  
link:{hibernate7Guide}index.html#upgradeNotes[GORM upgrade documentation].

Review Comment:
   This section documents Grails 4's Hibernate 5.4/GORM 7 upgrade, so switching 
its link to the Hibernate 7 guide points readers at a migration guide for a 
version they are not upgrading to. Keep this version-scoped reference on 
`hibernate5Guide`, consistent with the PR's stated treatment of historical 
upgrade guides.



##########
grails-doc/src/en/guide/profiles/webProfile.adoc:
##########
@@ -83,7 +83,7 @@ Provided Features:
 * events - Adds support for the Grails EventBus abstraction
 * geb2 - Adds Geb dependencies to run functional tests
 * gsp - Adds support for GSP to the project
-* hibernate5 - Adds GORM for Hibernate 5 to the project
+* hibernate7 - Adds GORM for Hibernate 7 to the project

Review Comment:
   The feature list now correctly advertises H7, but current command-line 
documentation still tells users to select `hibernate5`/`gorm-hibernate5` and 
says the `hibernate` alias selects H5 
(`grails-doc/src/en/guide/commandLine/creatingProject.adoc:162-178`, 
`grails-doc/src/en/guide/introduction/whatsNew.adoc:46-49`). These are not 
historical upgrade sections; following them now produces the Forge error 
introduced by this PR. Update the current command examples and option tables as 
part of the removal.



##########
grails-test-examples/graphql/grails-docs-app/build.gradle:
##########
@@ -48,7 +48,7 @@ dependencies {
     implementation 'org.apache.grails:grails-cache'
     implementation 'org.apache.grails:grails-async'
     implementation 'org.apache.grails:grails-events'
-    implementation 'org.apache.grails:grails-data-hibernate5'
+    implementation 'org.apache.grails:grails-data-hibernate7'

Review Comment:
   This dependency block now selects Hibernate 7, but it still declares 
`org.hibernate:hibernate-core-jakarta`, the Hibernate 5-era artifact. The 
Hibernate 7 BOM manages `org.hibernate.orm:hibernate-core`; leaving this old 
coordinate either makes the unversioned dependency unresolved or reintroduces 
Hibernate 5/LGPL onto the example's classpath. Replace it with the Hibernate 7 
coordinate (or remove it if the GORM transitive is sufficient).



##########
grails-test-suite-persistence/build.gradle:
##########
@@ -33,6 +33,7 @@ group = 'org.apache.grails.testing'
 dependencies {
     implementation platform(project(':grails-bom'))
     testImplementation platform(project(':grails-bom'))
+    testImplementation platform(project(':grails-hibernate7-bom'))

Review Comment:
   This adds the Hibernate 7 BOM to the test configuration while both 
`implementation` and `testImplementation` already declare `grails-bom`. The 
shared validator scans these real configurations and rejects more than one 
distinct Grails BOM, so 
`:grails-test-suite-persistence:validateDependencyVersions` will fail; 
consolidate the BOM declarations.



##########
grails-test-examples/geb/build.gradle:
##########
@@ -48,7 +48,7 @@ dependencies {
     } else {
         implementation 'org.apache.grails:grails-sitemesh3'
     }
-    implementation 'org.apache.grails:grails-data-hibernate5'
+    implementation 'org.apache.grails:grails-data-hibernate7'

Review Comment:
   The checked-in `grails-cli.yml` for this app still sets `gormImpl: 
gorm-hibernate5` and includes `gorm-hibernate5` in `features` (lines 21 and 
23). Forge now rejects both values, so regenerating the fixture from this 
metadata fails even though its Gradle dependencies were moved to H7; update 
this file and the equivalent CLI metadata files in the other generated examples.



##########
grails-test-examples/graphql/grails-tenant-app/build.gradle:
##########
@@ -48,7 +48,7 @@ dependencies {
     implementation 'org.apache.grails:grails-cache'
     implementation 'org.apache.grails:grails-async'
     implementation 'org.apache.grails:grails-events'
-    implementation 'org.apache.grails:grails-data-hibernate5'
+    implementation 'org.apache.grails:grails-data-hibernate7'

Review Comment:
   This dependency block now selects Hibernate 7, but it still declares 
`org.hibernate:hibernate-core-jakarta`, the Hibernate 5-era artifact. The 
Hibernate 7 BOM manages `org.hibernate.orm:hibernate-core`; leaving this old 
coordinate either makes the unversioned dependency unresolved or reintroduces 
Hibernate 5/LGPL onto the example's classpath. Replace it with the Hibernate 7 
coordinate (or remove it if the GORM transitive is sufficient).



##########
grails-test-examples/graphql/spring-boot-app/build.gradle:
##########
@@ -32,15 +32,15 @@ group = 'examples'
 
 dependencies {
 
-    implementation platform(project(':grails-bom'))
+    implementation platform(project(':grails-hibernate7-bom'))
 
     implementation 'org.springframework.boot:spring-boot-starter'
     implementation 'org.springframework.boot:spring-boot-starter-web'
 
     implementation 'org.springframework.boot:spring-boot-hibernate'
 
-    implementation 'org.apache.grails:grails-data-hibernate5-spring-boot'
-    implementation 'org.apache.grails.data:grails-data-hibernate5-core'
+    implementation 'org.apache.grails:grails-data-hibernate7-spring-boot'
+    implementation 'org.apache.grails.data:grails-data-hibernate7-core'
     implementation 'org.apache.grails.data:grails-datamapping-core'
     implementation 'org.hibernate:hibernate-core-jakarta'

Review Comment:
   This dependency block now selects Hibernate 7, but it still declares 
`org.hibernate:hibernate-core-jakarta`, the Hibernate 5-era artifact. The 
Hibernate 7 BOM manages `org.hibernate.orm:hibernate-core`; leaving this old 
coordinate either makes the unversioned dependency unresolved or reintroduces 
Hibernate 5/LGPL onto the example's classpath. Replace it with the Hibernate 7 
coordinate (or remove it if the GORM transitive is sufficient).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to