From 8bb2228adfd04534d054d4fe761ed9dde7ec4d0d Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Fri, 27 Oct 2023 09:50:12 +0200 Subject: [PATCH] Document how to unset maven.compiler.release Closes gh-37993 --- .../src/docs/asciidoc/index.adoc | 2 +- .../src/docs/asciidoc/using.adoc | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/index.adoc b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/index.adoc index aa65458eaaa..4880c710d34 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/index.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/index.adoc @@ -1,6 +1,6 @@ [[spring-boot-maven-plugin-documentation]] = Spring Boot Maven Plugin Documentation -Stephane Nicoll; Andy Wilkinson; Scott Frederick +Stephane Nicoll; Andy Wilkinson; Scott Frederick; Moritz Halbritter v{gradle-project-version} :!version-label: :doctype: book diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/using.adoc b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/using.adoc index a391a755b11..5f1df127488 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/using.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/docs/asciidoc/using.adoc @@ -17,7 +17,24 @@ This dependency management lets you omit `` tags for those dependencies NOTE: Since the `application.properties` and `application.yml` files accept Spring style placeholders (`${...}`), the Maven filtering is changed to use `@..@` placeholders. (You can override that by setting a Maven property called `resource.delimiter`.) +[NOTE] +==== +The `spring-boot-starter-parent` sets the `maven.compiler.release` property, which restricts the `--add-exports`, `--add-reads`, and `--patch-module` options https://openjdk.org/jeps/247[if they modify system modules]. +In case you need to use those options, unset `maven.compiler.release`: +[source,xml,indent=0,subs="verbatim,quotes,attributes"] +---- + +---- + +and then configure the source and the target options instead: + +[source,xml,indent=0,subs="verbatim,quotes,attributes"] +---- +${java.version} +${java.version} +---- +==== [[using.parent-pom]] == Inheriting the Starter Parent POM