jamesfredley commented on PR #15467:
URL: https://github.com/apache/grails-core/pull/15467#issuecomment-4622701466

   @jdaugherty I've pushed changes addressing all four blocking items from your 
review. Commits:
   
   | Commit | Item |
   |---|---|
   | `bc933fa` | **4** - parse BOM POMs with `maven-model` |
   | `6ef4ec2` | **1** - apply exactly one Grails BOM (+ docs) |
   | `59dcb7e` | **2 & 3** - example apps for the Spring DM plugin |
   | `8cba523` | follow-up hardening (platform-only BOM detection + 
sibling-config test) |
   
   **1. Only one Grails BOM is ever applied.** `GrailsExtension.autoApplyBom` 
(boolean) is replaced by `Property<String> bom` - the BOM artifact name within 
`org.apache.grails`, default `grails-bom`, `null` to opt out (per your 
suggestion to "change the boolean to the bom name and default it; if null, 
don't apply"). `applyGrailsBom` now:
   - applies a single BOM - a `platform()`, or an `enforcedPlatform()` for the 
Micronaut variants (`grails-micronaut-bom`, `grails-hibernate5-micronaut-bom`);
   - if the build already declares a Grails BOM by hand (a Micronaut app, or a 
Forge/profile-generated app), it does **not** layer a second one - it fills the 
remaining declarable configurations with that same BOM;
   - **fails fast** if more than one distinct Grails BOM is declared.
   
   `GrailsDependencyValidatorPlugin.detectBomPath` now expects exactly one 
Grails BOM (no more "prefer enforced among multiple"). Deprecated 
`springDependencyManagement = false` maps to `bom = null`. This also covers the 
split hibernate5/7 and Micronaut BOMs - the variant is selected via `grails { 
bom = '...' }` rather than assuming `grails-bom`.
   
   **2. Legacy Spring Dependency Management plugin coverage (Grails app).** New 
`grails-test-examples/spring-dependency-management`: a Grails app that opts out 
of the native platform (`grails { bom = null }`) and manages versions with 
`io.spring.dependency-management` importing `grails-bom`. Its `@Integration` 
test boots the app and serves a request.
   
   **3. Spring Boot apps keep using the Spring plugin.** Re-enabled 
`grails-test-examples/gsp-spring-boot` - a non-Grails Spring Boot app that 
renders Grails GSP and manages versions with `io.spring.dependency-management` 
importing `grails-bom`. (Its runtime test is `@Disabled` for a pre-existing 
GSP-on-Spring-Boot-4 auto-config bean cycle, unrelated to dependency management 
- the same reason the example was previously disabled; the build-level interop 
is exercised by compiling it.)
   
   **4. `maven-model` everywhere.** `BomManagedVersions` now parses POMs with 
`org.apache.maven:maven-model` (`MavenXpp3Reader` -> `Model`), with parent-POM 
inheritance and per-BOM property scoping, matching `ExtractDependenciesTask`. 
This also resolves your earlier concern that properties defined on parent BOMs 
would not be picked up.
   
   Verified locally: `:grails-gradle-plugins` BOM/extension specs, 
`validateDependencyVersions` on `app1` + `micronaut`, and `codenarcMain` all 
pass.
   
   One small remaining nit from your review I did **not** touch: 
`dependencies.gradle:41` ("Remove the comment") - happy to fold that in if 
you'd still like it removed.
   


-- 
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