Do not rely on expressly for Hibernate Validator message interpolation

This commit is contained in:
marko-bekhta 2024-12-11 14:56:04 +01:00 committed by Christian Beikov
parent 4b52bff090
commit 58d2239d85
7 changed files with 45 additions and 5 deletions

View File

@ -16,6 +16,5 @@ dependencies {
testImplementation project( ':hibernate-testing' )
testImplementation jakartaLibs.validation
testImplementation testLibs.validator
testRuntimeOnly testLibs.expressly
}

View File

@ -0,0 +1,15 @@
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
~ License: GNU Lesser General Public License (LGPL), version 2.1 or later.
~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
-->
<validation-config
xmlns="https://jakarta.ee/xml/ns/validation/configuration"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/validation/configuration
https://jakarta.ee/xml/ns/validation/validation-configuration-3.0.xsd"
version="3.0">
<message-interpolator>org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator</message-interpolator>
</validation-config>

View File

@ -56,7 +56,6 @@ dependencies {
testImplementation jakartaLibs.cdi
testImplementation jakartaLibs.jacc
testImplementation jakartaLibs.validation
testImplementation testLibs.expressly
testImplementation( testLibs.validator ) {
// for test runtime
transitive = true

View File

@ -0,0 +1,15 @@
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
~ License: GNU Lesser General Public License (LGPL), version 2.1 or later.
~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
-->
<validation-config
xmlns="https://jakarta.ee/xml/ns/validation/configuration"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/validation/configuration
https://jakarta.ee/xml/ns/validation/validation-configuration-3.0.xsd"
version="3.0">
<message-interpolator>org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator</message-interpolator>
</validation-config>

View File

@ -29,7 +29,6 @@ dependencies {
testImplementation jdbcLibs.postgresql
testImplementation jdbcLibs.h2gis
testRuntimeOnly testLibs.expressly
testRuntimeOnly 'jaxen:jaxen:1.1'
testRuntimeOnly libs.byteBuddy
}

View File

@ -0,0 +1,15 @@
<!--
~ Hibernate, Relational Persistence for Idiomatic Java
~
~ License: GNU Lesser General Public License (LGPL), version 2.1 or later.
~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
-->
<validation-config
xmlns="https://jakarta.ee/xml/ns/validation/configuration"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/validation/configuration
https://jakarta.ee/xml/ns/validation/validation-configuration-3.0.xsd"
version="3.0">
<message-interpolator>org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator</message-interpolator>
</validation-config>

View File

@ -186,10 +186,8 @@ dependencyResolutionManagement {
def jfrUnitVersion = version "jfrUnit", "1.0.0.Alpha2"
def hibernateValidatorVersion = version "hibernateValidator", "9.0.0.Beta3"
def expresslyVersion = version "expressly", "6.0.0-M1"
library( "validator", "org.hibernate.validator", "hibernate-validator" ).versionRef( hibernateValidatorVersion )
library( "expressly", "org.glassfish.expressly", "expressly" ).versionRef( expresslyVersion )
library( "junit5Api", "org.junit.jupiter", "junit-jupiter-api" ).versionRef( junit5Version )
library( "junit5Engine", "org.junit.jupiter", "junit-jupiter-engine" ).versionRef( junit5Version )