From b9a24f458c6e9c5331b2362f58eb36e5c244de5e Mon Sep 17 00:00:00 2001 From: Sanne Grinovero Date: Thu, 26 Mar 2020 13:17:57 +0000 Subject: [PATCH] HHH-13950 Update to Bean Validation 3 preview: Hibernate Validator 7.0.0.Alpha1 We apply the update int two steps: - some hand-rolled changes, such as switching the dependency to the new Hibernate Validator preview build - running a replace-all scripts This individual commit represents the first set of changes. When porting this change to a different branch, this one should be cherry picked while the second change is better ported by running the same script once again. --- gradle/libraries.gradle | 10 +++++----- .../hibernate/cfg/beanvalidation/ValidationMode.java | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gradle/libraries.gradle b/gradle/libraries.gradle index aac04d3f91..a15375fa36 100644 --- a/gradle/libraries.gradle +++ b/gradle/libraries.gradle @@ -15,9 +15,9 @@ ext { jnpVersion = '5.0.6.CR1' hibernateCommonsVersion = '5.1.0.Final' - hibernateValidatorVersion = '6.0.13.Final' - validationApiVersion = '2.0.1.Final' - elVersion = '3.0.1-b09' + hibernateValidatorVersion = '7.0.0.Alpha1' // Preview of Jakarta EE 9 (Validation 3.0) + validationApiVersion = '3.0.0-M1' // Preview of Jakarta EE 9 (Validation 3.0) + elVersion = '4.0.0-RC1' // Preview of Jakarta EE 9 : dependency of Validation 3.0 cdiVersion = '2.0' weldVersion = '3.0.0.Final' @@ -70,7 +70,7 @@ ext { // javax jpa: "javax.persistence:javax.persistence-api:${project.jpaVersion}", jta: 'org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final', - validation: "javax.validation:validation-api:${validationApiVersion}", + validation: "jakarta.validation:jakarta.validation-api:${validationApiVersion}", jacc: 'org.jboss.spec.javax.security.jacc:jboss-jacc-api_1.4_spec:1.0.2.Final', interceptor: 'javax.interceptor:javax.interceptor-api:1.2', // required by JAXB from JDK 9 as it is not available anymore in JDK 9 @@ -132,7 +132,7 @@ ext { validator: "org.hibernate.validator:hibernate-validator:${hibernateValidatorVersion}", // EL required by Hibernate Validator at test runtime - expression_language: "org.glassfish:javax.el:${elVersion}", + expression_language: "org.glassfish:jakarta.el:${elVersion}", c3p0: "com.mchange:c3p0:0.9.5.3", ehcache: "net.sf.ehcache:ehcache:2.10.6", diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/ValidationMode.java b/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/ValidationMode.java index 8f7628c73f..1aa1568ec0 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/ValidationMode.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/ValidationMode.java @@ -13,7 +13,7 @@ import java.util.Set; import org.hibernate.HibernateException; /** - * Duplicates the javax.validation enum (because javax validation might not be on the runtime classpath) + * Duplicates the jakarta.validation enum (because jakarta validation might not be on the runtime classpath) * * @author Steve Ebersole */