Skip to content

Commit e909999

Browse files
committed
[#2092] Add Hibernate ORM 7.2 integration and testing
1 parent 4994942 commit e909999

File tree

57 files changed

+2873
-87
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2873
-87
lines changed

.github/workflows/ci.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,13 @@ jobs:
603603
jdk: 17
604604
spring-data: spring-data-4.0.x
605605
################################################
606+
# hibernate-7.2
607+
################################################
608+
- rdbms: h2
609+
provider: hibernate-7.2
610+
jdk: 17
611+
spring-data: spring-data-4.0.x
612+
################################################
606613
# LTS JDKs
607614
################################################
608615
- rdbms: h2

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ Changes that happened in releases
66

77
### New features
88

9-
None yet
9+
* Add `blaze-persistence-integration-hibernate-7.2` for Hibernate ORM 7.2+ support
10+
* Add support for Spring Framework 7.0 and Spring Boot 4.0
1011

1112
### Bug fixes
1213

ci/build-github-latest.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ elif [ "$COMPONENT" == 'hibernate-7.1' ]; then
2424
export JPAPROVIDER="hibernate-7.1"
2525
export SPRING_DATA="spring-data-4.0.x"
2626
export PROPERTIES="-s $DIR/latest-settings.xml -Dversion.hibernate-7.1=[7.1,7.1.Alpha)"
27+
elif [ "$COMPONENT" == 'hibernate-7.2' ]; then
28+
export JPAPROVIDER="hibernate-7.2"
29+
export SPRING_DATA="spring-data-4.0.x"
30+
export PROPERTIES="-s $DIR/latest-settings.xml -Dversion.hibernate-7.2=[7.2,7.2.Alpha)"
2731
else
2832
export JPAPROVIDER="hibernate-6.2"
2933
export SPRING_DATA="spring-data-3.1.x"

core/testsuite-hibernate6/pom.xml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,5 +901,66 @@
901901
</dependency>
902902
</dependencies>
903903
</profile>
904+
<profile>
905+
<id>hibernate-7.2</id>
906+
<properties>
907+
<jpa.excludedGroups>com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate70</jpa.excludedGroups>
908+
</properties>
909+
<dependencies>
910+
<dependency>
911+
<groupId>org.hibernate</groupId>
912+
<artifactId>hibernate-core</artifactId>
913+
<version>${version.hibernate-7.2}</version>
914+
</dependency>
915+
<dependency>
916+
<groupId>org.hibernate</groupId>
917+
<artifactId>hibernate-envers</artifactId>
918+
<version>${version.hibernate-7.2}</version>
919+
</dependency>
920+
<dependency>
921+
<groupId>org.hibernate</groupId>
922+
<artifactId>hibernate-testing</artifactId>
923+
<version>${version.hibernate-7.2}</version>
924+
</dependency>
925+
<dependency>
926+
<groupId>jakarta.xml.bind</groupId>
927+
<artifactId>jakarta.xml.bind-api</artifactId>
928+
<version>${version.jakarta-jaxb-api}</version>
929+
</dependency>
930+
<dependency>
931+
<groupId>com.sun.xml.bind</groupId>
932+
<artifactId>jaxb-impl</artifactId>
933+
<version>${version.jakarta-jaxb}</version>
934+
</dependency>
935+
<dependency>
936+
<groupId>jakarta.persistence</groupId>
937+
<artifactId>jakarta.persistence-api</artifactId>
938+
<version>${version.jakarta-jpa-3.2-api}</version>
939+
<scope>provided</scope>
940+
</dependency>
941+
<dependency>
942+
<groupId>jakarta.transaction</groupId>
943+
<artifactId>jakarta.transaction-api</artifactId>
944+
<version>${version.jakarta-jta}</version>
945+
</dependency>
946+
<dependency>
947+
<groupId>jakarta.activation</groupId>
948+
<artifactId>jakarta.activation-api</artifactId>
949+
<version>${version.jakarta-activation}</version>
950+
</dependency>
951+
<dependency>
952+
<groupId>${project.groupId}</groupId>
953+
<artifactId>blaze-persistence-integration-hibernate-7.2</artifactId>
954+
<scope>test</scope>
955+
</dependency>
956+
<!-- IntelliJ apparently needs the annotation processor here -->
957+
<dependency>
958+
<groupId>org.hibernate</groupId>
959+
<artifactId>hibernate-jpamodelgen</artifactId>
960+
<version>${version.hibernate-7.2}</version>
961+
<scope>provided</scope>
962+
</dependency>
963+
</dependencies>
964+
</profile>
904965
</profiles>
905966
</project>

core/testsuite-jakarta-runner/pom.xml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,68 @@
839839
</dependency>
840840
</dependencies>
841841
</profile>
842+
<profile>
843+
<id>hibernate-7.2</id>
844+
<properties>
845+
<jpa-api-version>${version.jakarta-jpa-3.2-api}</jpa-api-version>
846+
<jpa.excludedGroups>com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate70</jpa.excludedGroups>
847+
</properties>
848+
<dependencies>
849+
<dependency>
850+
<groupId>org.hibernate.orm</groupId>
851+
<artifactId>hibernate-core</artifactId>
852+
<version>${version.hibernate-7.2}</version>
853+
</dependency>
854+
<dependency>
855+
<groupId>org.hibernate.orm</groupId>
856+
<artifactId>hibernate-envers</artifactId>
857+
<version>${version.hibernate-7.2}</version>
858+
</dependency>
859+
<dependency>
860+
<groupId>org.hibernate.orm</groupId>
861+
<artifactId>hibernate-testing</artifactId>
862+
<version>${version.hibernate-7.2}</version>
863+
</dependency>
864+
<dependency>
865+
<groupId>jakarta.xml.bind</groupId>
866+
<artifactId>jakarta.xml.bind-api</artifactId>
867+
<version>${version.jakarta-jaxb-api}</version>
868+
</dependency>
869+
<dependency>
870+
<groupId>com.sun.xml.bind</groupId>
871+
<artifactId>jaxb-impl</artifactId>
872+
<version>${version.jakarta-jaxb}</version>
873+
</dependency>
874+
<dependency>
875+
<groupId>jakarta.transaction</groupId>
876+
<artifactId>jakarta.transaction-api</artifactId>
877+
<version>${version.jakarta-jta}</version>
878+
</dependency>
879+
<dependency>
880+
<groupId>jakarta.activation</groupId>
881+
<artifactId>jakarta.activation-api</artifactId>
882+
<version>${version.jakarta-activation}</version>
883+
</dependency>
884+
<dependency>
885+
<groupId>${project.groupId}</groupId>
886+
<artifactId>blaze-persistence-integration-hibernate-7.2</artifactId>
887+
<scope>test</scope>
888+
</dependency>
889+
<dependency>
890+
<groupId>${project.groupId}</groupId>
891+
<artifactId>blaze-persistence-testsuite-base-hibernate7</artifactId>
892+
<version>${project.version}</version>
893+
<scope>compile</scope>
894+
</dependency>
895+
<!-- IntelliJ apparently needs the annotation processor here -->
896+
<dependency>
897+
<groupId>org.hibernate.orm</groupId>
898+
<artifactId>hibernate-jpamodelgen</artifactId>
899+
<version>${version.hibernate-7.2}</version>
900+
<scope>provided</scope>
901+
</dependency>
902+
</dependencies>
903+
</profile>
842904
</profiles>
843905

844906
</project>

core/testsuite/pom.xml

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2920,6 +2920,175 @@
29202920
</plugins>
29212921
</build>
29222922
</profile>
2923+
<profile>
2924+
<id>hibernate-7.2</id>
2925+
<!-- Note that we compile the test suite against Hibernate 5.6 because this testsuite will be jakarta-transformed -->
2926+
<properties>
2927+
<jpa.excludedGroups>com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate60,com.blazebit.persistence.testsuite.base.jpa.category.NoHibernate66</jpa.excludedGroups>
2928+
<additional.source.directory>src/main/hibernate</additional.source.directory>
2929+
</properties>
2930+
<dependencies>
2931+
<dependency>
2932+
<groupId>org.hibernate</groupId>
2933+
<artifactId>hibernate-core</artifactId>
2934+
<version>${version.hibernate-5.6}</version>
2935+
</dependency>
2936+
<dependency>
2937+
<groupId>org.hibernate</groupId>
2938+
<artifactId>hibernate-envers</artifactId>
2939+
<version>${version.hibernate-5.6}</version>
2940+
</dependency>
2941+
<dependency>
2942+
<groupId>org.hibernate</groupId>
2943+
<artifactId>hibernate-testing</artifactId>
2944+
<version>${version.hibernate-5.6}</version>
2945+
</dependency>
2946+
<dependency>
2947+
<groupId>com.vladmihalcea</groupId>
2948+
<artifactId>hibernate-types-52</artifactId>
2949+
<version>${version.hibernate-types}</version>
2950+
</dependency>
2951+
<dependency>
2952+
<groupId>jakarta.xml.bind</groupId>
2953+
<artifactId>jakarta.xml.bind-api</artifactId>
2954+
<version>${version.jakarta-jaxb-api}</version>
2955+
</dependency>
2956+
<dependency>
2957+
<groupId>com.sun.xml.bind</groupId>
2958+
<artifactId>jaxb-impl</artifactId>
2959+
<version>${version.jakarta-jaxb}</version>
2960+
</dependency>
2961+
<dependency>
2962+
<groupId>jakarta.transaction</groupId>
2963+
<artifactId>jakarta.transaction-api</artifactId>
2964+
<version>${version.jakarta-jta}</version>
2965+
</dependency>
2966+
<dependency>
2967+
<groupId>jakarta.activation</groupId>
2968+
<artifactId>jakarta.activation-api</artifactId>
2969+
<version>${version.jakarta-activation}</version>
2970+
</dependency>
2971+
<dependency>
2972+
<groupId>${project.groupId}</groupId>
2973+
<artifactId>blaze-persistence-integration-hibernate-6.2</artifactId>
2974+
<scope>test</scope>
2975+
</dependency>
2976+
<dependency>
2977+
<groupId>${project.groupId}</groupId>
2978+
<artifactId>blaze-persistence-testsuite-base-hibernate</artifactId>
2979+
<scope>compile</scope>
2980+
</dependency>
2981+
<!-- IntelliJ apparently needs the annotation processor here -->
2982+
<dependency>
2983+
<groupId>org.hibernate</groupId>
2984+
<artifactId>hibernate-jpamodelgen</artifactId>
2985+
<version>${version.hibernate-5.6}</version>
2986+
<scope>provided</scope>
2987+
</dependency>
2988+
</dependencies>
2989+
<build>
2990+
<plugins>
2991+
<plugin>
2992+
<artifactId>maven-surefire-plugin</artifactId>
2993+
<configuration>
2994+
<skip>true</skip>
2995+
</configuration>
2996+
</plugin>
2997+
<plugin>
2998+
<artifactId>maven-jar-plugin</artifactId>
2999+
<executions>
3000+
<execution>
3001+
<goals>
3002+
<goal>test-jar</goal>
3003+
</goals>
3004+
</execution>
3005+
</executions>
3006+
</plugin>
3007+
<plugin>
3008+
<groupId>org.codehaus.mojo</groupId>
3009+
<artifactId>build-helper-maven-plugin</artifactId>
3010+
<executions>
3011+
<execution>
3012+
<id>add-source</id>
3013+
<phase>generate-sources</phase>
3014+
<goals>
3015+
<goal>add-source</goal>
3016+
</goals>
3017+
<configuration>
3018+
<sources>
3019+
<source>${additional.source.directory}</source>
3020+
<source>${project.build.directory}/generated-sources/metamodel</source>
3021+
</sources>
3022+
</configuration>
3023+
</execution>
3024+
<execution>
3025+
<id>add-test-source-hibernate</id>
3026+
<phase>generate-test-sources</phase>
3027+
<goals>
3028+
<goal>add-test-source</goal>
3029+
</goals>
3030+
<configuration>
3031+
<sources>
3032+
<source>src/test/hibernate</source>
3033+
</sources>
3034+
</configuration>
3035+
</execution>
3036+
</executions>
3037+
</plugin>
3038+
<plugin>
3039+
<groupId>org.bsc.maven</groupId>
3040+
<artifactId>maven-processor-plugin</artifactId>
3041+
<executions>
3042+
<execution>
3043+
<id>process</id>
3044+
<goals>
3045+
<goal>process</goal>
3046+
</goals>
3047+
<phase>generate-sources</phase>
3048+
<configuration>
3049+
<additionalSourceDirectories>
3050+
<additionalSourceDirectory>${additional.source.directory}</additionalSourceDirectory>
3051+
</additionalSourceDirectories>
3052+
<!-- source output directory -->
3053+
<outputDirectory>${project.build.directory}/generated-sources/metamodel</outputDirectory>
3054+
<processors>
3055+
<processor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</processor>
3056+
</processors>
3057+
</configuration>
3058+
</execution>
3059+
</executions>
3060+
<dependencies>
3061+
<!-- Metamodel -->
3062+
<dependency>
3063+
<groupId>org.hibernate</groupId>
3064+
<artifactId>hibernate-jpamodelgen</artifactId>
3065+
<version>${version.hibernate-5.6}</version>
3066+
</dependency>
3067+
<dependency>
3068+
<groupId>jakarta.xml.bind</groupId>
3069+
<artifactId>jakarta.xml.bind-api</artifactId>
3070+
<version>${version.jakarta-jaxb-api}</version>
3071+
</dependency>
3072+
<dependency>
3073+
<groupId>com.sun.xml.bind</groupId>
3074+
<artifactId>jaxb-impl</artifactId>
3075+
<version>${version.jakarta-jaxb}</version>
3076+
</dependency>
3077+
<dependency>
3078+
<groupId>jakarta.transaction</groupId>
3079+
<artifactId>jakarta.transaction-api</artifactId>
3080+
<version>${version.jakarta-jta}</version>
3081+
</dependency>
3082+
<dependency>
3083+
<groupId>jakarta.activation</groupId>
3084+
<artifactId>jakarta.activation-api</artifactId>
3085+
<version>${version.jakarta-activation}</version>
3086+
</dependency>
3087+
</dependencies>
3088+
</plugin>
3089+
</plugins>
3090+
</build>
3091+
</profile>
29233092
<profile>
29243093
<id>eclipselink</id>
29253094
<properties>

dist/bom/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,12 @@
246246
<version>${project.version}</version>
247247
<scope>runtime</scope>
248248
</dependency>
249+
<dependency>
250+
<groupId>${project.groupId}</groupId>
251+
<artifactId>blaze-persistence-integration-hibernate-7.2</artifactId>
252+
<version>${project.version}</version>
253+
<scope>runtime</scope>
254+
</dependency>
249255
<dependency>
250256
<groupId>${project.groupId}</groupId>
251257
<artifactId>blaze-persistence-integration-datanucleus</artifactId>

dist/full/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@
126126
<groupId>${project.groupId}</groupId>
127127
<artifactId>blaze-persistence-integration-hibernate-7.1</artifactId>
128128
</dependency>
129+
<dependency>
130+
<groupId>${project.groupId}</groupId>
131+
<artifactId>blaze-persistence-integration-hibernate-7.2</artifactId>
132+
</dependency>
129133
<dependency>
130134
<groupId>${project.groupId}</groupId>
131135
<artifactId>blaze-persistence-integration-datanucleus</artifactId>

documentation/src/main/asciidoc/core/manual/en_US/getting_started.adoc

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,21 @@ or if you are using Jakarta JPA
7676

7777
Depending on the JPA provider that should be used, one of the following integrations is required
7878

79+
[[maven-setup-hibernate72]]
80+
===== Hibernate 7.2+
81+
82+
[source,xml]
83+
----
84+
<dependency>
85+
<groupId>com.blazebit</groupId>
86+
<artifactId>blaze-persistence-integration-hibernate-7.2</artifactId>
87+
<version>${blaze-persistence.version}</version>
88+
<scope>runtime</scope>
89+
</dependency>
90+
----
91+
7992
[[maven-setup-hibernate71]]
80-
===== [[maven-setup-hibernate70]]Hibernate 7.1+
93+
===== [[maven-setup-hibernate70]]Hibernate 7.1
8194

8295
[source,xml]
8396
----

0 commit comments

Comments
 (0)