jamesfredley commented on PR #16073:
URL: https://github.com/apache/grails-core/pull/16073#issuecomment-5141184870
## Option 2 implemented and verified - ready to replace the current approach
Following the analysis above, option 2 has been built and passes every
check, including the BOM-integrity check that the current branch fails. It is
**not yet pushed to this branch** - recording it here so the result is not lost.
**Change shape:** 4 files, +28 / -73. It is a net *simplification* - the
local-repo staging and the `exclusiveContent` repository are deleted outright.
- `build.gradle` and `GrailsRepoSettingsPlugin.groovy` reverted to their
`8.0.x` state (no pom staging, no local repository, no configuration-time
`doGenerate()`).
- The example's `mavenBom` import is replaced by **16 explicit managed
dependencies** sourced from `dependencies.gradle` and `grails-bom`'s existing
`customBomVersions`. `grails { bom = null }` and
`io.spring.dependency-management` are retained, so the regression coverage this
example exists for - a migrated Grails 7 application where Spring DM, not the
platform, manages versions - is preserved.
- The example stays unconditionally included; the `settings.gradle` comment
was rewritten and no longer refers to a "local Maven repository".
- The `BomPropertyOverridesPlugin` coordinate fix is untouched and still in
place.
### Verification
| Check | Result |
|---|---|
| Cold + clean at never-published `9.9.9-SNAPSHOT` | BUILD SUCCESSFUL (2m
2s) |
| Same, `--offline` | BUILD SUCCESSFUL (1m 52s) |
| Default version | BUILD SUCCESSFUL (2m 8s) |
| **BOM integrity** - `grails-bom` pom | **111 `<artifactId>` entries, all 9
`grails-*-cli` constraints** |
| `:grails-test-examples-spring-dependency-management:integrationTest` |
PASSED - `HelloControllerSpec ... serves a request` |
| `BomPropertyOverridesPluginSpec` | PASSED |
| `dependencies.gradle` | unmodified |
The BOM row is the important one: it matches the published `8.0.0-SNAPSHOT`
artifact exactly, where the current branch produces 102 entries and zero CLI
constraints. I verified that count independently of the run that produced it.
### Trade-off, stated plainly
The example no longer imports a real Maven BOM artifact, so it no longer
exercises that specific path. That path has never worked correctly here - it
always resolved the last *published* BOM rather than the commit under test -
and Grails 8 applications use the platform BOM, so the coverage being given up
is coverage of a scenario that was already misreporting. What is gained: the
example finally validates the versions in the commit, and it cannot be broken
by a version bump again.
### Remaining
This needs a review pass and a push before the PR leaves draft. The unpushed
`settings.gradle` comment commit (`6fd5248a7c`) is superseded by the rewrite in
this change and can be dropped.
--
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]