From 3fcdadf408287c9966726eb10df76c5614a44c55 Mon Sep 17 00:00:00 2001 From: marko-bekhta Date: Tue, 25 Nov 2025 16:24:05 +0100 Subject: [PATCH 1/3] [#2836] Point to docs.hibernate.org instead of docs.jboss.org/hibernate in various docs --- documentation/build.gradle | 4 ++-- .../main/asciidoc/reference/introduction.adoc | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/documentation/build.gradle b/documentation/build.gradle index 8a159e32b..4cdd720d3 100644 --- a/documentation/build.gradle +++ b/documentation/build.gradle @@ -86,9 +86,9 @@ def aggregateJavadocsTask = tasks.register( 'aggregateJavadocs', Javadoc ) { links = [ 'https://docs.oracle.com/en/java/javase/11/docs/api/', - 'http://docs.jboss.org/hibernate/beanvalidation/spec/2.0/api/', + 'http://docs.hibernate.org/beanvalidation/spec/2.0/api/', 'https://jakarta.ee/specifications/platform/8/apidocs/', - "https://docs.jboss.org/hibernate/orm/" + ormMinorVersion + "/javadocs/" + "https://docs.hibernate.org/orm/" + ormMinorVersion + "/javadocs/" ] options.addStringOption( 'Xdoclint:none', '-quiet' ) diff --git a/documentation/src/main/asciidoc/reference/introduction.adoc b/documentation/src/main/asciidoc/reference/introduction.adoc index b7187d6ee..275d3cff0 100644 --- a/documentation/src/main/asciidoc/reference/introduction.adoc +++ b/documentation/src/main/asciidoc/reference/introduction.adoc @@ -77,7 +77,7 @@ You don't need to depend on the JDBC driver for your database. === Optional dependencies :slf4j: http://www.slf4j.org/ -:enhancer: https://docs.jboss.org/hibernate/orm/5.4/topical/html_single/bytecode/BytecodeEnhancement.html +:enhancer: https://docs.hibernate.org/orm/5.4/topical/html_single/bytecode/BytecodeEnhancement.html Optionally, you might also add any of the following additional features: @@ -103,7 +103,7 @@ There's an example {build}[Gradle build] included in the example program. === Basic configuration :xml: https://github.com/hibernate/hibernate-reactive/blob/main/examples/session-example/src/main/resources/META-INF/persistence.xml -:configuration-properties: https://docs.jboss.org/hibernate/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#configurations +:configuration-properties: https://docs.hibernate.org/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#configurations Hibernate Reactive is configured via the standard JPA `persistence.xml` @@ -333,8 +333,8 @@ of framework code. === Mapping entity classes -:mapping-annotations: https://docs.jboss.org/hibernate/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#annotations -:bean-validation: https://docs.jboss.org/hibernate/stable/validator/reference/en-US/html_single/#chapter-bean-constraints +:mapping-annotations: https://docs.hibernate.org/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#annotations +:bean-validation: https://docs.hibernate.org/stable/validator/reference/en-US/html_single/#chapter-bean-constraints We won't have much to say about the entity classes here, simply because the principles behind mapping entity classes in Hibernate Reactive, @@ -578,8 +578,8 @@ custom reactive identifier generator. === JSON Mapping -:orm-json-basic-mapping: https://docs.jboss.org/hibernate/orm/7.0/userguide/html_single/Hibernate_User_Guide.html#basic-mapping-json -:orm-json-embeddable-mapping: https://docs.jboss.org/hibernate/orm/7.0/userguide/html_single/Hibernate_User_Guide.html#_jsonxml_aggregate_embeddable_mapping +:orm-json-basic-mapping: https://docs.hibernate.org/orm/7.0/userguide/html_single/Hibernate_User_Guide.html#basic-mapping-json +:orm-json-embeddable-mapping: https://docs.hibernate.org/orm/7.0/userguide/html_single/Hibernate_User_Guide.html#_jsonxml_aggregate_embeddable_mapping :string-to-json-converter: https://github.com/hibernate/hibernate-reactive/blob/main/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/StringToJsonConverter.java Like in Hibernate ORM, it's possible to map a JSON field using the {orm-json-basic-mapping}[SqlTypes.JSON] @@ -1306,7 +1306,7 @@ or `delete` queries, or even native SQL that calls a stored procedure! === Association fetching -:association-fetching: https://docs.jboss.org/hibernate/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#fetching +:association-fetching: https://docs.hibernate.org/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#fetching Achieving high performance in ORM means minimizing the number of round trips to the database. This goal should be uppermost in your mind @@ -1368,7 +1368,7 @@ You can find much more information about association fetching in the === Enabling the second-level cache -:second-level-cache: https://docs.jboss.org/hibernate/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#caching +:second-level-cache: https://docs.hibernate.org/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#caching A classic way to reduce the number of accesses to the database is to use a second-level cache, allowing cached data to be shared between From 2db68162c030cbb3dc768b919fe10ea64ab3f9b4 Mon Sep 17 00:00:00 2001 From: marko-bekhta Date: Tue, 25 Nov 2025 16:28:34 +0100 Subject: [PATCH 2/3] [#2836] Update Javadoc links to external libraries/JDK --- documentation/build.gradle | 6 +++--- settings.gradle | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/documentation/build.gradle b/documentation/build.gradle index 4cdd720d3..fd33501c3 100644 --- a/documentation/build.gradle +++ b/documentation/build.gradle @@ -85,9 +85,9 @@ def aggregateJavadocsTask = tasks.register( 'aggregateJavadocs', Javadoc ) { def ormMinorVersion = matcher.find() ? matcher.group() : "5.6"; links = [ - 'https://docs.oracle.com/en/java/javase/11/docs/api/', - 'http://docs.hibernate.org/beanvalidation/spec/2.0/api/', - 'https://jakarta.ee/specifications/platform/8/apidocs/', + 'https://docs.oracle.com/en/java/javase/17/docs/api/', + 'https://jakarta.ee/specifications/bean-validation/3.1/apidocs/', + 'https://jakarta.ee/specifications/platform/11/apidocs/', "https://docs.hibernate.org/orm/" + ormMinorVersion + "/javadocs/" ] diff --git a/settings.gradle b/settings.gradle index 67eb3f2b1..1c2dd03dd 100644 --- a/settings.gradle +++ b/settings.gradle @@ -13,6 +13,7 @@ pluginManagement { rootProject.name = 'hibernate-reactive' +// When updating the baseline, make sure to update the JDK version in the javadoc link gradle.ext.baselineJavaVersion = JavaLanguageVersion.of( 17 ) // Gradle does bytecode transformation on tests. From aecd66a1f0948d70623772651d9e6c1f2363ef11 Mon Sep 17 00:00:00 2001 From: marko-bekhta Date: Tue, 25 Nov 2025 17:59:10 +0100 Subject: [PATCH 3/3] [#2836] Use ORM version variable in the doc --- documentation/build.gradle | 10 ++++++++++ .../main/asciidoc/reference/introduction.adoc | 18 +++++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/documentation/build.gradle b/documentation/build.gradle index fd33501c3..e165d8d8e 100644 --- a/documentation/build.gradle +++ b/documentation/build.gradle @@ -1,6 +1,7 @@ import org.asciidoctor.gradle.jvm.AsciidoctorTask import java.time.Year +import java.util.regex.Matcher plugins { id "org.asciidoctor.jvm.convert" @@ -141,6 +142,14 @@ def renderReferenceDocumentationTask = tasks.register( "renderReferenceDocumenta def asciidocReference = layout.projectDirectory.dir("src/main/asciidoc/reference") def unpackedThemeAsciidoc = rootProject.layout.buildDirectory.dir("unpacked-theme/hibernate-asciidoctor-theme/asciidoc") def docInfoHibernate = rootProject.layout.buildDirectory.dir("unpacked-theme/hibernate-asciidoctor-theme/asciidoc/docinfo/hibernate") + def ormMinorVersion = libs.versions.hibernateOrmVersion.map { v -> + def matcher = v =~ /\d+\.\d+/ + if (matcher.find()) { + return matcher.group() + } else { + throw new IllegalArgumentException("Cannot parse the version of Hibernate ORM from '" + v + "' string.") + } + } asciidoctorj { version = "3.0.0" @@ -170,6 +179,7 @@ def renderReferenceDocumentationTask = tasks.register( "renderReferenceDocumenta "source-highlighter": "rouge", majorMinorVersion: versionFamily.get(), fullVersion: fullVersion.get(), + ormMinorVersion: ormMinorVersion.get(), stylesdir: "css", "iconfont-remote": false, "iconfont-name": "font-awesome/css/solid", diff --git a/documentation/src/main/asciidoc/reference/introduction.adoc b/documentation/src/main/asciidoc/reference/introduction.adoc index 275d3cff0..e75676ed3 100644 --- a/documentation/src/main/asciidoc/reference/introduction.adoc +++ b/documentation/src/main/asciidoc/reference/introduction.adoc @@ -24,8 +24,8 @@ implementation of JPA. If you've never used JPA before, that's OK, but you might need to refer to the following sources of information at some points in this text: -- the http://hibernate.org/orm/documentation/5.6/[documentation for Hibernate ORM], -- the https://jcp.org/aboutJava/communityprocess/mrel/jsr338/index.html[JPA 2.2 specification], or +- the http://hibernate.org/orm/documentation/{ormMinorVersion}/[documentation for Hibernate ORM], +- the https://jakarta.ee/specifications/persistence/3.2/jakarta-persistence-spec-3.2[Jakarta Persistence 3.2 specification], or - https://www.manning.com/books/java-persistence-with-hibernate-second-edition[Java Persistence with Hibernate], the latest edition of the book originally titled _Hibernate in Action_. @@ -77,7 +77,7 @@ You don't need to depend on the JDBC driver for your database. === Optional dependencies :slf4j: http://www.slf4j.org/ -:enhancer: https://docs.hibernate.org/orm/5.4/topical/html_single/bytecode/BytecodeEnhancement.html +:enhancer: https://docs.hibernate.org/orm/{ormMinorVersion}/topical/html_single/bytecode/ Optionally, you might also add any of the following additional features: @@ -103,7 +103,7 @@ There's an example {build}[Gradle build] included in the example program. === Basic configuration :xml: https://github.com/hibernate/hibernate-reactive/blob/main/examples/session-example/src/main/resources/META-INF/persistence.xml -:configuration-properties: https://docs.hibernate.org/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#configurations +:configuration-properties: https://docs.hibernate.org/orm/{ormMinorVersion}/userguide/html_single/#configurations Hibernate Reactive is configured via the standard JPA `persistence.xml` @@ -333,7 +333,7 @@ of framework code. === Mapping entity classes -:mapping-annotations: https://docs.hibernate.org/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#annotations +:mapping-annotations: https://docs.hibernate.org/orm/{ormMinorVersion}/userguide/html_single/#annotations :bean-validation: https://docs.hibernate.org/stable/validator/reference/en-US/html_single/#chapter-bean-constraints We won't have much to say about the entity classes here, simply because @@ -578,8 +578,8 @@ custom reactive identifier generator. === JSON Mapping -:orm-json-basic-mapping: https://docs.hibernate.org/orm/7.0/userguide/html_single/Hibernate_User_Guide.html#basic-mapping-json -:orm-json-embeddable-mapping: https://docs.hibernate.org/orm/7.0/userguide/html_single/Hibernate_User_Guide.html#_jsonxml_aggregate_embeddable_mapping +:orm-json-basic-mapping: https://docs.hibernate.org/orm/{ormMinorVersion}/userguide/html_single/#basic-mapping-json +:orm-json-embeddable-mapping: https://docs.hibernate.org/orm/{ormMinorVersion}/userguide/html_single/#_jsonxml_aggregate_embeddable_mapping :string-to-json-converter: https://github.com/hibernate/hibernate-reactive/blob/main/hibernate-reactive-core/src/test/java/org/hibernate/reactive/types/StringToJsonConverter.java Like in Hibernate ORM, it's possible to map a JSON field using the {orm-json-basic-mapping}[SqlTypes.JSON] @@ -1306,7 +1306,7 @@ or `delete` queries, or even native SQL that calls a stored procedure! === Association fetching -:association-fetching: https://docs.hibernate.org/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#fetching +:association-fetching: https://docs.hibernate.org/orm/{ormMinorVersion}/userguide/html_single/#fetching Achieving high performance in ORM means minimizing the number of round trips to the database. This goal should be uppermost in your mind @@ -1368,7 +1368,7 @@ You can find much more information about association fetching in the === Enabling the second-level cache -:second-level-cache: https://docs.hibernate.org/orm/5.4/userguide/html_single/Hibernate_User_Guide.html#caching +:second-level-cache: https://docs.hibernate.org/orm/{ormMinorVersion}/userguide/html_single/#caching A classic way to reduce the number of accesses to the database is to use a second-level cache, allowing cached data to be shared between