This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-site.git
commit 589f700b1afc077d3ccefc64c90731d30b3ebde9 Author: Sylwester Lachiewicz <[email protected]> AuthorDate: Mon Nov 2 08:42:24 2026 +0000 Treat Maven 3.9.0 as the minimum in the guides The plugin guides' sample POMs declare the 3.9.0 prerequisite and target Java 8: Maven 3.9.0's default compiler plugin targets Java 7, which current JDKs no longer compile for. --- content/markdown/guides/getting-started/maven-in-five-minutes.md | 2 +- content/markdown/guides/plugin/guide-java-plugin-development.md.vm | 5 +++++ .../guides/plugin/guide-java-report-plugin-development.md.vm | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/content/markdown/guides/getting-started/maven-in-five-minutes.md b/content/markdown/guides/getting-started/maven-in-five-minutes.md index eb4b7de0..d749203e 100644 --- a/content/markdown/guides/getting-started/maven-in-five-minutes.md +++ b/content/markdown/guides/getting-started/maven-in-five-minutes.md @@ -186,7 +186,7 @@ Hello World! ## Java 9 or later -Recent Maven versions use a recent `maven-compiler-plugin` by default (3.15.0 with Maven 3.9.16, 3.16.0 with Maven 3.10.0). With an older Maven, you need at least version 3.6.0 of the `maven-compiler-plugin` to target Java 9 or later. Either way, set the `maven.compiler.release` property to the Java release you are targeting (e.g. 17, 21 or 25), and pin the plugin version so that your build does not change with the Maven version that runs it. +Maven 3.9.0 and later use a `maven-compiler-plugin` that can target Java 9 or later by default (3.10.1 with Maven 3.9.0, 3.16.0 with Maven 3.10.0). Set the `maven.compiler.release` property to the Java release you are targeting (e.g. 17, 21 or 25), and pin the plugin version so that your build does not change with the Maven version that runs it. In the following example, we have configured our Maven project to use version 3.16.0 of `maven-compiler-plugin` and target Java 17: diff --git a/content/markdown/guides/plugin/guide-java-plugin-development.md.vm b/content/markdown/guides/plugin/guide-java-plugin-development.md.vm index 5fdd91e2..97d0a029 100644 --- a/content/markdown/guides/plugin/guide-java-plugin-development.md.vm +++ b/content/markdown/guides/plugin/guide-java-plugin-development.md.vm @@ -110,7 +110,12 @@ Listed below is an illustration of the sample mojo project's pom with the parame <name>Sample Parameter-less Maven Plugin</name> + <prerequisites> + <maven>3.9.0</maven> + </prerequisites> + <properties> + <maven.compiler.release>8</maven.compiler.release> <maven-plugin-tools.version>$context.get("version.maven-plugin-tools")</maven-plugin-tools.version> </properties> diff --git a/content/markdown/guides/plugin/guide-java-report-plugin-development.md.vm b/content/markdown/guides/plugin/guide-java-report-plugin-development.md.vm index 9e46ab0b..f92f03ed 100644 --- a/content/markdown/guides/plugin/guide-java-report-plugin-development.md.vm +++ b/content/markdown/guides/plugin/guide-java-report-plugin-development.md.vm @@ -114,8 +114,13 @@ The below examples can be copied and pasted as a template. <name>Simple Plugin</name> + <prerequisites> + <maven>3.9.0</maven> + </prerequisites> + <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <maven.compiler.release>8</maven.compiler.release> <doxiaVersion>2.1.0</doxiaVersion> <doxiaSitetoolsVersion>2.1.0</doxiaSitetoolsVersion> </properties>
