Skip to content

Step 1 (PR-F): Add grails-hibernate5-micronaut BOM (Micronaut BOM split)#15689

Open
jamesfredley wants to merge 4 commits into
8.0.xfrom
refactor/micronaut-bom-hibernate-split
Open

Step 1 (PR-F): Add grails-hibernate5-micronaut BOM (Micronaut BOM split)#15689
jamesfredley wants to merge 4 commits into
8.0.xfrom
refactor/micronaut-bom-hibernate-split

Conversation

@jamesfredley
Copy link
Copy Markdown
Contributor

Summary

Carves the Micronaut BOM split out of the Hibernate 7 Step 1 PR (#15654) so it can be reviewed as a single, focused topic (per @matrei's review request).

This introduces a Hibernate-version-specific Micronaut BOM so Micronaut projects can target a pinned Hibernate version, rather than relying solely on the generic grails-micronaut-bom.

Changes

  • Add grails-hibernate5-micronaut-bom (and a micronaut-hibernate5 sample app) alongside the generic grails-micronaut-bom.
  • Publish grails-micronaut-bom / grails-micronaut only when the Micronaut island is not skipped (-PskipMicronautProjects).
  • validateMicronautBom now accepts grails-micronaut-bom and grails-hibernate5-micronaut-bom as valid enforcedPlatform BOMs.
  • Document the Hibernate-specific Micronaut BOM usage in the Micronaut config guide and the 8.0.x upgrade notes.

Scope note

The Hibernate 7 variant (grails-hibernate7-micronaut-bom) is intentionally excluded here because 8.0.x does not yet contain Hibernate 7. The h7 BOM, its sample app, and the h7 platform BOM remain part of the Step 2 (8.0.x-hibernate7) branch.

Verification

./gradlew help configures successfully; grails-hibernate5-micronaut-bom and the micronaut-hibernate5 sample app evaluate cleanly with no missing-project or BOM-resolution errors.

Part of the Step 1 (#15654) carve-out stack.

Introduces a Hibernate-version-specific Micronaut BOM so Micronaut
projects can target a pinned Hibernate version:

- Add grails-hibernate5-micronaut-bom (and its sample app) alongside the
  generic grails-micronaut-bom
- Publish grails-micronaut-bom / grails-micronaut only when the Micronaut
  island is not skipped (skipMicronautProjects)
- validateMicronautBom now accepts grails-micronaut-bom and
  grails-hibernate5-micronaut-bom as valid enforcedPlatform BOMs
- Document the Hibernate-specific Micronaut BOM usage in the Micronaut
  config guide and the 8.0.x upgrade notes

Carved out of the Hibernate 7 Step 1 PR (#15654) so the Micronaut BOM
split can be reviewed as a single topic. The Hibernate 7 variant
(grails-hibernate7-micronaut-bom) is intentionally excluded here because
8.0.x does not yet contain Hibernate 7; it remains in the Step 2 branch.

Assisted-by: claude-code:claude-4.7-opus
Copilot AI review requested due to automatic review settings May 28, 2026 18:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Carves the Micronaut BOM split from the Hibernate 7 stack into a focused change that introduces a Hibernate-version-specific Micronaut BOM (grails-hibernate5-micronaut-bom) alongside the generic grails-micronaut-bom, plus a matching sample app, validator/publishing wiring, and docs.

Changes:

  • Add grails-hibernate5-micronaut-bom platform project and a micronaut-hibernate5 sample app, both gated by -PskipMicronautProjects.
  • Extend validateMicronautBom and the Micronaut override block in dependencies.gradle to cover both the generic and Hibernate-specific BOMs, with Hibernate 5 / Liquibase constraints added to the Micronaut override set.
  • Document the new BOM in the Micronaut config guide and the 8.0.x upgrade notes; minor refactors in CompilePlugin and PropertyNameCalculator, plus commented test-retry block in shared test config.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
settings.gradle Includes new BOM and sample app in the Micronaut island
gradle/publish-root-config.gradle Publishes Micronaut artifacts only when the island is enabled
dependencies.gradle Extends Micronaut override block to cover the new BOM and adds Hibernate 5 / Liquibase entries
grails-bom/hibernate5-micronaut/build.gradle New Hibernate 5 Micronaut BOM mirroring the generic one
grails-bom/micronaut/build.gradle Comment reflow only
grails-gradle/plugins/.../GrailsGradlePlugin.groovy validateMicronautBom accepts both BOMs and updates the error message
grails-test-examples/micronaut-hibernate5/** New sample app consuming the Hibernate-specific BOM as enforcedPlatform
grails-doc/src/en/guide/conf/micronaut.adoc Documents Hibernate-specific Micronaut BOM usage
grails-doc/src/en/guide/upgrading/upgrading80x.adoc 8.0.x upgrade note for the new BOM
build-logic/.../CompilePlugin.groovy Hoists javaVersion lookup out of per-task configuration
build-logic/.../PropertyNameCalculator.groovy Adds prefix-based fallback to align with Spring Boot property names
gradle/test-config.gradle Adds commented-out Develocity testRetry block

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread grails-doc/src/en/guide/conf/micronaut.adoc Outdated
Comment thread grails-doc/src/en/guide/conf/micronaut.adoc Outdated
Comment thread grails-test-examples/micronaut-hibernate5/build.gradle
Comment thread gradle/test-config.gradle Outdated
- Remove the broken doc link to the not-yet-generated
  "Grails BOM Hibernate5 Micronaut" reference page
- Clarify that validateMicronautBom accepts grails-micronaut-bom or
  grails-hibernate5-micronaut-bom as the enforcedPlatform BOM
- Register grails-hibernate5-micronaut-bom in
  GrailsDependencyValidatorPlugin.BOM_PROJECT_NAMES so the new sample's
  dependency versions are actually validated
- Make the micronaut-hibernate5 startup spec assert the rendered page
  title instead of the always-true title || true expression
- Drop the commented-out Develocity testRetry block from test-config

Assisted-by: claude-code:claude-4.7-opus
@jamesfredley jamesfredley force-pushed the refactor/micronaut-bom-hibernate-split branch from 43122f1 to 35527d8 Compare May 28, 2026 18:44
jamesfredley added a commit that referenced this pull request May 28, 2026
…R-F #15689)

Continues shrinking the PR-A review surface, matching the established
B/C/D/E revert pattern. Once these land on 8.0.x and 8.0.x is merged
back into this branch, the reverted changes return through the merge, so
the final state of stage-hibernate7 is unchanged - only the diff visible
on PR-A is reduced.

Reverted content:

  grails.gorm.tests -> grails.gorm.specs package rename (PR #15688, PR-I)
    Renames the test package back to grails.gorm.tests (the 8.0.x
    convention) across the three affected test trees: hibernate5 core
    (90 files), hibernate7 core (90 files), and grails-datamapping-core-test
    (18 files). The mongo portion was already reverted in the prior
    B/C/D/E revert.

  Hibernate 5 Micronaut BOM split (PR #15689, PR-F)
    Removes grails-hibernate5-micronaut-bom, its sample app
    (micronaut-hibernate5), and all h5-micronaut references in
    settings.gradle, dependencies.gradle, publish-root-config.gradle,
    validateMicronautBom, the doc-generation task, and the Micronaut
    config/upgrade guides. The generic grails-micronaut-bom is retained.

NOT reverted (intentionally kept - the actual PR-A work):
  - The hibernate5 -> hibernate7 baseline clone
  - grails-hibernate7-micronaut-bom, its sample app, and all h7
    references (settings/dependencies/publish/plugin/doc-gen/guides)

Verified: ./gradlew help configures cleanly; compileTestGroovy passes for
grails-datamapping-core-test, grails-data-hibernate5-core, and
grails-data-hibernate7-core (the three renamed trees); grails-hibernate7
-micronaut-bom still publishes.

Assisted-by: claude-code:claude-4.7-opus
…om-hibernate-split

Resolve conflict in grails-bom/micronaut/build.gradle: take the fuller 8.0.x
comment block documenting the Groovy, Spock and Jackson 3 (tools.jackson)
platform exclusions, which matches the merged exclude list in the code.

Assisted-by: claude-code:claude-4.8-opus
…platform

The new grails-hibernate5-micronaut-bom re-exported the Micronaut platform
without excluding Jackson 3 (tools.jackson), unlike grails-micronaut-bom. As a
result micronaut-platform's jackson-bom 3.1.0 leaked into the BOM's managed
versions while spring-boot-dependencies (SB 4.0.6) ships 3.1.2, causing
validateDependencyVersions to fail for grails-test-examples-micronaut-hibernate5
(resolved 3.1.2, expected 3.1.0).

Mirror the grails-micronaut-bom exclusion so Spring Boot manages the Jackson 3
version consistently. Verified locally:
:grails-test-examples-micronaut-hibernate5:validateDependencyVersions passes.

Assisted-by: claude-code:claude-4.8-opus
@jamesfredley
Copy link
Copy Markdown
Contributor Author

I think this one is ready to go

Copy link
Copy Markdown
Contributor

@jdaugherty jdaugherty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has to be merged prior to #15654 being merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants