jamesfredley commented on code in PR #15689:
URL: https://github.com/apache/grails-core/pull/15689#discussion_r3319988920
##########
grails-doc/src/en/guide/conf/micronaut.adoc:
##########
@@ -43,6 +43,23 @@ dependencies {
The `grails-micronaut-bom` layers Micronaut-specific dependency overrides on
top of `grails-bom` and pins the `io.micronaut.platform:micronaut-platform`
version it was built against. Applying it as `enforcedPlatform` makes all of
its constraints strictly versioned so that no transitive dependency (including
Micronaut's own platform) can override them — there is no need to set a
`micronautPlatformVersion` Gradle property. See
link:{versionsRef}Grails%20BOM%20Micronaut.html[Grails Micronaut BOM
Dependencies] for the full list of managed versions.
+==== Hibernate-Specific Micronaut BOMs
+
+If your project targets a specific Hibernate version, use the corresponding
Hibernate-specific Micronaut BOM instead of the generic `grails-micronaut-bom`:
+
+* `org.apache.grails:grails-hibernate5-micronaut-bom` -- Micronaut + Hibernate
5 (the default). See
link:{versionsRef}Grails%20BOM%20Hibernate5%20Micronaut.html[Grails Hibernate 5
Micronaut BOM Dependencies].
Review Comment:
Removed the broken `Grails BOM Hibernate5 Micronaut` reference link. That
page is not produced by `generateBomDocumentation` in this PR, so the bullet
now just describes the BOM without a 404 link.
##########
grails-doc/src/en/guide/conf/micronaut.adoc:
##########
@@ -43,6 +43,23 @@ dependencies {
The `grails-micronaut-bom` layers Micronaut-specific dependency overrides on
top of `grails-bom` and pins the `io.micronaut.platform:micronaut-platform`
version it was built against. Applying it as `enforcedPlatform` makes all of
its constraints strictly versioned so that no transitive dependency (including
Micronaut's own platform) can override them — there is no need to set a
`micronautPlatformVersion` Gradle property. See
link:{versionsRef}Grails%20BOM%20Micronaut.html[Grails Micronaut BOM
Dependencies] for the full list of managed versions.
+==== Hibernate-Specific Micronaut BOMs
+
+If your project targets a specific Hibernate version, use the corresponding
Hibernate-specific Micronaut BOM instead of the generic `grails-micronaut-bom`:
+
+* `org.apache.grails:grails-hibernate5-micronaut-bom` -- Micronaut + Hibernate
5 (the default). See
link:{versionsRef}Grails%20BOM%20Hibernate5%20Micronaut.html[Grails Hibernate 5
Micronaut BOM Dependencies].
+
+[source,groovy]
+.build.gradle - Hibernate 5 with Micronaut
+----
+dependencies {
+ implementation
enforcedPlatform("org.apache.grails:grails-hibernate5-micronaut-bom:$grailsVersion")
+ implementation 'org.apache.grails:grails-micronaut'
+}
+----
+
+The generic `grails-micronaut-bom` remains available and currently tracks the
Hibernate 5 default. If the framework changes its default Hibernate version in
the future, `grails-micronaut-bom` will follow the new default while the
Hibernate-specific BOMs remain pinned.
+
When the `grails-micronaut` plugin is present, the Grails Gradle plugin will
automatically apply the required annotation processors to your project and
validate that `grails-micronaut-bom` is applied as `enforcedPlatform`. The
validation fails the build at configuration time with an actionable error if
the BOM is missing or applied as plain `platform(...)`.
Review Comment:
Updated - the sentence now states that either `grails-micronaut-bom` or
`grails-hibernate5-micronaut-bom` applied as `enforcedPlatform` satisfies the
validation.
##########
grails-test-examples/micronaut-hibernate5/build.gradle:
##########
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+plugins {
+ id 'org.apache.grails.buildsrc.properties'
+ id 'org.apache.grails.buildsrc.compile'
+ id 'org.apache.grails.buildsrc.dependency-validator'
Review Comment:
Added `grails-hibernate5-micronaut-bom` to
`GrailsDependencyValidatorPlugin.BOM_PROJECT_NAMES` so the new sample now gets
BOM-version validation.
##########
grails-test-examples/micronaut-hibernate5/src/integration-test/groovy/micronaut/hibernate5/ApplicationStartupSpec.groovy:
##########
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package micronaut.hibernate5
+
+import grails.plugin.geb.ContainerGebSpec
+import grails.testing.mixin.integration.Integration
+
+@Integration
+class ApplicationStartupSpec extends ContainerGebSpec {
+
+ void "test the application starts and the home page renders"() {
+ when: 'The home page is visited'
+ go '/'
+
+ then: 'The page loads successfully'
+ title || true // Grails default index page has a title, but we just
need the server to respond
Review Comment:
Replaced the always-true expression with `title == 'Micronaut Hibernate 5
Test App'` so the assertion actually verifies the rendered page.
##########
gradle/test-config.gradle:
##########
@@ -63,6 +63,13 @@ tasks.withType(Test).configureEach {
useJUnitPlatform()
jvmArgs += java17moduleReflectionCompatibilityArguments
+// develocity {
+// testRetry {
+// maxRetries = configuredTestParallel == 1 ? 1 : 2
+// maxFailures = 20
+// failOnPassedAfterRetry = true
+// }
+// }
Review Comment:
Removed the commented-out Develocity `testRetry` block - it was an unrelated
ride-along and is not needed for the BOM split.
--
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]