Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 22 additions & 17 deletions distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
<groupId>${project.groupId}</groupId>
<artifactId>hibernate-validator-annotation-processor</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>hibernate-validator-test-utils</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>hibernate-validator-bom</artifactId>
Expand Down Expand Up @@ -156,21 +161,21 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>${basedir}/src/main/assembly/dist.xml</descriptor>
</descriptors>
<finalName>hibernate-validator-${project.version}</finalName>
<tarLongFileMode>posix</tarLongFileMode>
<outputDirectory>${project.build.directory}/dist/</outputDirectory>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>install</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${basedir}/src/main/assembly/dist.xml</descriptor>
</descriptors>
<finalName>hibernate-validator-${project.version}</finalName>
<tarLongFileMode>posix</tarLongFileMode>
<outputDirectory>${project.build.directory}/dist/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
Expand All @@ -188,22 +193,22 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>${basedir}/src/main/assembly/docs.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
<finalName>documentation</finalName>
<tarLongFileMode>posix</tarLongFileMode>
<outputDirectory>${documentation.staging.dir}</outputDirectory>
</configuration>
<executions>
<execution>
<id>stage-documentation</id>
<phase>install</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${basedir}/src/main/assembly/docs.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
<finalName>documentation</finalName>
<tarLongFileMode>posix</tarLongFileMode>
<outputDirectory>${documentation.staging.dir}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
Expand Down
4 changes: 3 additions & 1 deletion distribution/src/main/assembly/dist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<include>org.hibernate.validator:hibernate-validator</include>
<include>org.hibernate.validator:hibernate-validator-cdi</include>
<include>org.hibernate.validator:hibernate-validator-annotation-processor</include>
<include>org.hibernate.validator:hibernate-validator-test-utils</include>
</includes>
</dependencySet>

Expand Down Expand Up @@ -115,6 +116,7 @@
<exclude>jenkins/**</exclude>
<exclude>.mvn/.develocity/**</exclude>
<exclude>.github/**</exclude>
<exclude>*.log</exclude>
</excludes>
</fileSet>

Expand All @@ -125,7 +127,7 @@
</fileSet>
<fileSet>
<directory>../documentation/target/dist</directory>
<outputDirectory>docs/reference</outputDirectory>
<outputDirectory>docs/</outputDirectory>
</fileSet>

</fileSets>
Expand Down
2 changes: 1 addition & 1 deletion distribution/src/main/assembly/docs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</fileSet>
<fileSet>
<directory>../documentation/target/dist</directory>
<outputDirectory>reference</outputDirectory>
<outputDirectory>.</outputDirectory>
</fileSet>

</fileSets>
Expand Down
10 changes: 8 additions & 2 deletions documentation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,16 @@
<artifactId>asciidoctor-maven-plugin</artifactId>
<executions>
<execution>
<id>output-html</id>
<id>output-html-reference</id>
<phase>process-resources</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<backend>html5</backend>
<sourceDirectory>src/main/asciidoc</sourceDirectory>
<outputDirectory>${asciidoctor.base-output-dir}/html_single</outputDirectory>
<preserveDirectories>true</preserveDirectories>
<attributes>
<imagesdir>images/</imagesdir>
<stylesdir>css</stylesdir>
Expand All @@ -244,7 +246,7 @@
<className>org.hibernate.infra.asciidoctor.extensions.sourcecodelanguage.SourcecodeLanguagePreprocessor</className>
</extension>
</extensions>
<sourceDocumentName>index.adoc</sourceDocumentName>
<relativeBaseDir>true</relativeBaseDir>
<attributes>
<docinfodir>${asciidoctor.aggregated-resources-dir}/docinfo/hibernate</docinfodir>
<icons>font</icons>
Expand All @@ -256,6 +258,7 @@

<hvVersion>${project.version}</hvVersion>
<hvVersionShort>${parsed-version.org.hibernate.validator.majorVersion}.${parsed-version.org.hibernate.validator.minorVersion}</hvVersionShort>
<hvVersionPreviousShort>${parsed-version.org.hibernate.validator.previous-stable.majorVersion}.${parsed-version.org.hibernate.validator.previous-stable.minorVersion}</hvVersionPreviousShort>
<bvVersion>${version.jakarta.validation-api}</bvVersion>
<jbossLoggingVersion>${version.org.jboss.logging.jboss-logging}</jbossLoggingVersion>
<classmateVersion>${version.com.fasterxml.classmate}</classmateVersion>
Expand Down Expand Up @@ -324,7 +327,10 @@
</goals>
<configuration>
<backend>pdf</backend>
<sourceDirectory>src/main/asciidoc</sourceDirectory>
<outputDirectory>${asciidoctor.base-output-dir}/pdf</outputDirectory>
<preserveDirectories>true</preserveDirectories>
<relativeBaseDir>true</relativeBaseDir>
<requires>${asciidoctor.aggregated-resources-dir}/theme/hibernate.rb</requires>
<attributes>
<imagesdir>${asciidoctor.aggregated-resources-dir}/images/</imagesdir>
Expand Down
79 changes: 79 additions & 0 deletions documentation/src/main/asciidoc/migration/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
= Hibernate Validator {hvVersion} - Jakarta Validation Reference Implementation: Migration Guide from {hvVersionPreviousShort}
:doctype: book
:revdate: {docdate}
:sectanchors:
:xrefstyle: full
:anchor:
:toc: left
:toclevels: 4
:sectnumlevels: 5
:docinfodir: {docinfodir}
:docinfo: shared,private
:title-logo-image: image:hibernate_logo_a.png[align=left,pdfwidth=33%]
:html-meta-description: Hibernate Validator, Annotation based constraints for your domain model - Migration Documentation
:html-meta-keywords: hibernate, validator, hibernate validator, validation, jakarta bean validation, jakarta validation, bean validation
:html-meta-canonical-link: https://docs.jboss.org/hibernate/stable/validator/migration/en-US/html_single/
:html-meta-version-family: {hvVersionShort}
:version-selector-enabled: true

[[introduction]]
== [[_introduction]] Introduction

The aim of this guide is to assist you migrating an existing application using any version `{hvVersionPreviousShort}.x`
of Hibernate Validator to the latest of the `{hvVersionShort}.x` series.

NOTE: If you think something is missing or something does not work, please link:https://hibernate.org/community[contact us].

If you're looking to migrate from an earlier version, you should migrate step-by-step, from one minor version to the next,
following the migration guide of link:https://hibernate.org/validator/documentation/migrate/[each version].

[WARNING]
====
As this release includes significant changes to the processed bean tracking, path implementation and related areas,
we encourage users to give it a try and report any findings, especially if there are non-trivial validation scenarios.
====

[[requirements]]
== Requirements

The requirements of Hibernate Validator {hvVersionShort}
are the same as those of Hibernate Validator {hvVersionPreviousShort}.

[[artifact-changes]]
== Artifacts

The coordinates of Maven artifacts in Hibernate Validator {hvVersionShort}
are the same as in Hibernate Validator {hvVersionPreviousShort}.

[[configuration]]
== Configuration

The configuration properties in Hibernate Validator {hvVersionShort},
in general, are backward-compatible with Hibernate Validator {hvVersionPreviousShort}.

[[api]]
== API

The https://hibernate.org/community/compatibility-policy/#code-categorization[API]
in Hibernate Validator {hvVersionShort}
is, in general, backward-compatible with Hibernate Validator {hvVersionPreviousShort}.

[[spi]]
== SPI

The https://hibernate.org/community/compatibility-policy/#code-categorization[SPI]
in Hibernate Validator {hvVersionShort}
is, in general, backward-compatible with Hibernate Validator {hvVersionPreviousShort}.

[[behavior]]
== Behavior

The behavior of Hibernate Validator {hvVersionShort}
is, in general, backward-compatible with Hibernate Validator {hvVersionPreviousShort}.

Keep in mind that the internal representation of the `Path` and `Node` became mutable during validation process,
so do not rely on these being immutable in your traversable resolvers.
The `Path` and `Node` representations within the `ConstraintViolation` remains immutable.

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[validator-gettingstarted]]
== Getting started

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[chapter-bean-constraints]]
== Declaring and validating bean constraints

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[chapter-method-constraints]]
== Declaring and validating method constraints

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[chapter-message-interpolation]]
== Interpolating constraint error messages

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[chapter-groups]]
== Grouping constraints

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[validator-customconstraints]]
== Creating custom constraints

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[chapter-valueextraction]]
== Value extraction

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[chapter-xml-configuration]]
== Configuring via XML

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[chapter-bootstrapping]]
== Bootstrapping

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[validator-metadata-api]]
== Using constraint metadata

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[validator-integration]]
== Integrating with other frameworks

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[validator-specifics]]
== Hibernate Validator Specifics

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[validator-annotation-processor]]
== Annotation Processor

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[validator-further-reading]]
== Further reading

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[preface]]

[preface]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
= Hibernate Validator {hvVersion} - Jakarta Validation Reference Implementation: Reference Guide
Hardy Ferentschik; Gunnar Morling; Guillaume Smet
Hardy Ferentschik; Gunnar Morling; Guillaume Smet; Marko Bekhta
:doctype: book
:revdate: {docdate}
:sectanchors:
Expand Down
Loading