From e5fed737313c910043223e1f8ba7825780580a23 Mon Sep 17 00:00:00 2001 From: marko-bekhta Date: Thu, 20 Jun 2024 12:29:50 +0200 Subject: [PATCH] HV-1989 Update documentation examples to use Java 11 where applicable --- documentation/pom.xml | 3 +++ documentation/src/main/asciidoc/ch01.asciidoc | 4 ++-- documentation/src/main/asciidoc/ch13.asciidoc | 8 ++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/documentation/pom.xml b/documentation/pom.xml index 8930f4eafc..bd3fd78690 100644 --- a/documentation/pom.xml +++ b/documentation/pom.xml @@ -294,6 +294,9 @@ ${version.wildfly} ${version.wildfly.secondary} + ${java-version.main.release} + ${version.compiler.plugin} + ${java.api-docs.base-url}/ ${bv.api-docs.base-url}/ diff --git a/documentation/src/main/asciidoc/ch01.asciidoc b/documentation/src/main/asciidoc/ch01.asciidoc index 5bc827c8b8..4a3c2b1e6a 100644 --- a/documentation/src/main/asciidoc/ch01.asciidoc +++ b/documentation/src/main/asciidoc/ch01.asciidoc @@ -192,9 +192,9 @@ $JBOSS_HOME/bin/jboss-cli.sh patch rollback --reset-configuration=true You can learn more about the WildFly patching infrastructure in general https://developer.jboss.org/wiki/SingleInstallationPatching/[here] and http://www.mastertheboss.com/jboss-server/jboss-configuration/managing-wildfly-and-eap-patches[here]. [[validator-gettingstarted-java9]] -==== Running on Java 11+ +==== Running on Java {jdkVersion}+ -Support for Java 11 and the Java Platform Module System (JPMS) is present in a preliminary form. +Support for the Java Platform Module System (JPMS) is present in a preliminary form. There are no JPMS module descriptors provided, but Hibernate Validator is usable as automatic modules. These are the module names as declared using the `Automatic-Module-Name` header: diff --git a/documentation/src/main/asciidoc/ch13.asciidoc b/documentation/src/main/asciidoc/ch13.asciidoc index 34901b6eb7..1fe51835fb 100644 --- a/documentation/src/main/asciidoc/ch13.asciidoc +++ b/documentation/src/main/asciidoc/ch13.asciidoc @@ -94,10 +94,10 @@ For using the Hibernate Validator annotation processor with Maven, set it up via org.apache.maven.plugins maven-compiler-plugin - 3.6.1 + {compilerPluginVersion} - 1.8 - 1.8 + {jdkVersion} + {jdkVersion} org.hibernate.validator @@ -185,7 +185,7 @@ provided you have the https://www.eclipse.org/m2e/[M2E Eclipse plug-in] installe For plain Eclipse projects follow these steps to set up the annotation processor: * Right-click your project, choose "Properties" -* Go to "Java Compiler" and make sure, that "Compiler compliance level" is set to "1.8". +* Go to "Java Compiler" and make sure, that "Compiler compliance level" is set to "{jdkVersion}". Otherwise the processor won't be activated * Go to "Java Compiler - Annotation Processing" and choose "Enable annotation processing" * Go to "Java Compiler - Annotation Processing - Factory Path" and add the JAR