diff --git a/documentation/src/main/asciidoc/chapter-2-set-up.asciidoc b/documentation/src/main/asciidoc/chapter-2-set-up.asciidoc index 76626f44c..fd27b25e4 100644 --- a/documentation/src/main/asciidoc/chapter-2-set-up.asciidoc +++ b/documentation/src/main/asciidoc/chapter-2-set-up.asciidoc @@ -248,20 +248,8 @@ If a policy is given for a specific mapper via `@Mapper#unmappedTargetPolicy()`, |`WARN` |=== -=== Using MapStruct on Java 9 +=== Using MapStruct with the Java Module System -MapStruct can be used with Java 9 (JPMS), support for it is experimental. +MapStruct can be used with Java 9 and higher versions. -A core theme of Java 9 is the modularization of the JDK. One effect of this is that a specific module needs to be enabled for a project in order to use the `javax.annotation.Generated` annotation. `@Generated` is added by MapStruct to generated mapper classes to tag them as generated code, stating the date of generation, the generator version etc. - -To allow usage of the `@Generated` annotation the module _java.xml.ws.annotation_ must be enabled. When using Maven, this can be done like this: - - export MAVEN_OPTS="--add-modules java.xml.ws.annotation" - -If the `@Generated` annotation is not available, MapStruct will detect this situation and not add it to generated mappers. - -[NOTE] -===== -In Java 9 `java.annotation.processing.Generated` was added (part of the `java.compiler` module), -if this annotation is available then it will be used. -===== +To allow usage of the `@Generated` annotation `java.annotation.processing.Generated` (part of the `java.compiler` module) can be enabled.