Skip to content

Commit 42ee1b0

Browse files
committed
HV-2152 Add a "What's New" document for series / HV-2153 Create migration guide as part of the project sources
Signed-off-by: marko-bekhta <marko.prykladna@gmail.com>
1 parent f394975 commit 42ee1b0

File tree

25 files changed

+395
-26
lines changed

25 files changed

+395
-26
lines changed

distribution/pom.xml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -156,21 +156,21 @@
156156
<plugin>
157157
<groupId>org.apache.maven.plugins</groupId>
158158
<artifactId>maven-assembly-plugin</artifactId>
159-
<configuration>
160-
<descriptors>
161-
<descriptor>${basedir}/src/main/assembly/dist.xml</descriptor>
162-
</descriptors>
163-
<finalName>hibernate-validator-${project.version}</finalName>
164-
<tarLongFileMode>posix</tarLongFileMode>
165-
<outputDirectory>${project.build.directory}/dist/</outputDirectory>
166-
</configuration>
167159
<executions>
168160
<execution>
169161
<id>make-assembly</id>
170162
<phase>install</phase>
171163
<goals>
172164
<goal>single</goal>
173165
</goals>
166+
<configuration>
167+
<descriptors>
168+
<descriptor>${basedir}/src/main/assembly/dist.xml</descriptor>
169+
</descriptors>
170+
<finalName>hibernate-validator-${project.version}</finalName>
171+
<tarLongFileMode>posix</tarLongFileMode>
172+
<outputDirectory>${project.build.directory}/dist/</outputDirectory>
173+
</configuration>
174174
</execution>
175175
</executions>
176176
</plugin>
@@ -188,22 +188,22 @@
188188
<plugin>
189189
<groupId>org.apache.maven.plugins</groupId>
190190
<artifactId>maven-assembly-plugin</artifactId>
191-
<configuration>
192-
<descriptors>
193-
<descriptor>${basedir}/src/main/assembly/docs.xml</descriptor>
194-
</descriptors>
195-
<appendAssemblyId>false</appendAssemblyId>
196-
<finalName>documentation</finalName>
197-
<tarLongFileMode>posix</tarLongFileMode>
198-
<outputDirectory>${documentation.staging.dir}</outputDirectory>
199-
</configuration>
200191
<executions>
201192
<execution>
202193
<id>stage-documentation</id>
203194
<phase>install</phase>
204195
<goals>
205196
<goal>single</goal>
206197
</goals>
198+
<configuration>
199+
<descriptors>
200+
<descriptor>${basedir}/src/main/assembly/docs.xml</descriptor>
201+
</descriptors>
202+
<appendAssemblyId>false</appendAssemblyId>
203+
<finalName>documentation</finalName>
204+
<tarLongFileMode>posix</tarLongFileMode>
205+
<outputDirectory>${documentation.staging.dir}</outputDirectory>
206+
</configuration>
207207
</execution>
208208
</executions>
209209
</plugin>

distribution/src/main/assembly/dist.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
<exclude>jenkins/**</exclude>
116116
<exclude>.mvn/.develocity/**</exclude>
117117
<exclude>.github/**</exclude>
118+
<exclude>*.log</exclude>
118119
</excludes>
119120
</fileSet>
120121

@@ -125,7 +126,7 @@
125126
</fileSet>
126127
<fileSet>
127128
<directory>../documentation/target/dist</directory>
128-
<outputDirectory>docs/reference</outputDirectory>
129+
<outputDirectory>docs/</outputDirectory>
129130
</fileSet>
130131

131132
</fileSets>

distribution/src/main/assembly/docs.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</fileSet>
2121
<fileSet>
2222
<directory>../documentation/target/dist</directory>
23-
<outputDirectory>reference</outputDirectory>
23+
<outputDirectory>.</outputDirectory>
2424
</fileSet>
2525

2626
</fileSets>

documentation/pom.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,16 @@
214214
<artifactId>asciidoctor-maven-plugin</artifactId>
215215
<executions>
216216
<execution>
217-
<id>output-html</id>
217+
<id>output-html-reference</id>
218218
<phase>process-resources</phase>
219219
<goals>
220220
<goal>process-asciidoc</goal>
221221
</goals>
222222
<configuration>
223223
<backend>html5</backend>
224+
<sourceDirectory>src/main/asciidoc</sourceDirectory>
224225
<outputDirectory>${asciidoctor.base-output-dir}/html_single</outputDirectory>
226+
<preserveDirectories>true</preserveDirectories>
225227
<attributes>
226228
<imagesdir>images/</imagesdir>
227229
<stylesdir>css</stylesdir>
@@ -244,7 +246,7 @@
244246
<className>org.hibernate.infra.asciidoctor.extensions.sourcecodelanguage.SourcecodeLanguagePreprocessor</className>
245247
</extension>
246248
</extensions>
247-
<sourceDocumentName>index.adoc</sourceDocumentName>
249+
<relativeBaseDir>true</relativeBaseDir>
248250
<attributes>
249251
<docinfodir>${asciidoctor.aggregated-resources-dir}/docinfo/hibernate</docinfodir>
250252
<icons>font</icons>
@@ -256,6 +258,7 @@
256258

257259
<hvVersion>${project.version}</hvVersion>
258260
<hvVersionShort>${parsed-version.org.hibernate.validator.majorVersion}.${parsed-version.org.hibernate.validator.minorVersion}</hvVersionShort>
261+
<hvVersionPreviousShort>${parsed-version.org.hibernate.validator.previous-stable.majorVersion}.${parsed-version.org.hibernate.validator.previous-stable.minorVersion}</hvVersionPreviousShort>
259262
<bvVersion>${version.jakarta.validation-api}</bvVersion>
260263
<jbossLoggingVersion>${version.org.jboss.logging.jboss-logging}</jbossLoggingVersion>
261264
<classmateVersion>${version.com.fasterxml.classmate}</classmateVersion>
@@ -324,7 +327,10 @@
324327
</goals>
325328
<configuration>
326329
<backend>pdf</backend>
330+
<sourceDirectory>src/main/asciidoc</sourceDirectory>
327331
<outputDirectory>${asciidoctor.base-output-dir}/pdf</outputDirectory>
332+
<preserveDirectories>true</preserveDirectories>
333+
<relativeBaseDir>true</relativeBaseDir>
328334
<requires>${asciidoctor.aggregated-resources-dir}/theme/hibernate.rb</requires>
329335
<attributes>
330336
<imagesdir>${asciidoctor.aggregated-resources-dir}/images/</imagesdir>
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
// Copyright Red Hat Inc. and Hibernate Authors
3+
= Hibernate Validator {hvVersion} - Jakarta Validation Reference Implementation: Migration Guide from {hvVersionPreviousShort}
4+
:doctype: book
5+
:revdate: {docdate}
6+
:sectanchors:
7+
:xrefstyle: full
8+
:anchor:
9+
:toc: left
10+
:toclevels: 4
11+
:sectnumlevels: 5
12+
:docinfodir: {docinfodir}
13+
:docinfo: shared,private
14+
:title-logo-image: image:hibernate_logo_a.png[align=left,pdfwidth=33%]
15+
:html-meta-description: Hibernate Validator, Annotation based constraints for your domain model - Migration Documentation
16+
:html-meta-keywords: hibernate, validator, hibernate validator, validation, jakarta bean validation, jakarta validation, bean validation
17+
:html-meta-canonical-link: https://docs.jboss.org/hibernate/stable/validator/migration/en-US/html_single/
18+
:html-meta-version-family: {hvVersionShort}
19+
:version-selector-enabled: true
20+
21+
[[introduction]]
22+
== [[_introduction]] Introduction
23+
24+
The aim of this guide is to assist you migrating an existing application using any version `{hvVersionPreviousShort}.x`
25+
of Hibernate Validator to the latest of the `{hvVersionShort}.x` series.
26+
27+
NOTE: If you think something is missing or something does not work, please link:https://hibernate.org/community[contact us].
28+
29+
If you're looking to migrate from an earlier version, you should migrate step-by-step, from one minor version to the next,
30+
following the migration guide of link:https://hibernate.org/validator/documentation/migrate/[each version].
31+
32+
[WARNING]
33+
====
34+
As this release includes significant changes to the processed bean tracking, path implementation and related areas,
35+
we encourage users to give it a try and report any findings, especially if there are non-trivial validation scenarios.
36+
====
37+
38+
[[requirements]]
39+
== Requirements
40+
41+
The requirements of Hibernate Validator {hvVersionShort}
42+
are the same as those of Hibernate Validator {hvVersionPreviousShort}.
43+
44+
[[artifact-changes]]
45+
== Artifacts
46+
47+
The coordinates of Maven artifacts in Hibernate Validator {hvVersionShort}
48+
are the same as in Hibernate Validator {hvVersionPreviousShort}.
49+
50+
[[configuration]]
51+
== Configuration
52+
53+
The configuration properties in Hibernate Validator {hvVersionShort},
54+
in general, are backward-compatible with Hibernate Validator {hvVersionPreviousShort}.
55+
56+
[[api]]
57+
== API
58+
59+
The https://hibernate.org/community/compatibility-policy/#code-categorization[API]
60+
in Hibernate Validator {hvVersionShort}
61+
is, in general, backward-compatible with Hibernate Validator {hvVersionPreviousShort}.
62+
63+
[[spi]]
64+
== SPI
65+
66+
The https://hibernate.org/community/compatibility-policy/#code-categorization[SPI]
67+
in Hibernate Validator {hvVersionShort}
68+
is, in general, backward-compatible with Hibernate Validator {hvVersionPreviousShort}.
69+
70+
[[behavior]]
71+
== Behavior
72+
73+
The behavior of Hibernate Validator {hvVersionShort}
74+
is, in general, backward-compatible with Hibernate Validator {hvVersionPreviousShort}.
75+
76+
Keep in mind that the internal representation of the `Path` and `Node` became mutable during validation process,
77+
so do not rely on these being immutable in your traversable resolvers.
78+
The `Path` and `Node` representations within the `ConstraintViolation` remains immutable.
79+

documentation/src/main/asciidoc/_ch01.adoc renamed to documentation/src/main/asciidoc/reference/_ch01.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
// Copyright Red Hat Inc. and Hibernate Authors
13
[[validator-gettingstarted]]
24
== Getting started
35

documentation/src/main/asciidoc/_ch02.adoc renamed to documentation/src/main/asciidoc/reference/_ch02.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
// Copyright Red Hat Inc. and Hibernate Authors
13
[[chapter-bean-constraints]]
24
== Declaring and validating bean constraints
35

documentation/src/main/asciidoc/_ch03.adoc renamed to documentation/src/main/asciidoc/reference/_ch03.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
// Copyright Red Hat Inc. and Hibernate Authors
13
[[chapter-method-constraints]]
24
== Declaring and validating method constraints
35

documentation/src/main/asciidoc/_ch04.adoc renamed to documentation/src/main/asciidoc/reference/_ch04.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
// Copyright Red Hat Inc. and Hibernate Authors
13
[[chapter-message-interpolation]]
24
== Interpolating constraint error messages
35

documentation/src/main/asciidoc/_ch05.adoc renamed to documentation/src/main/asciidoc/reference/_ch05.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
// Copyright Red Hat Inc. and Hibernate Authors
13
[[chapter-groups]]
24
== Grouping constraints
35

0 commit comments

Comments
 (0)