From 68828f4a162a0d24b1dad1a079d31c24cf8ed81b Mon Sep 17 00:00:00 2001 From: Martin Desruisseaux Date: Wed, 29 Jul 2026 16:12:02 +0200 Subject: [PATCH] Document implicitly compiled excluded sources. This is a port of 8d3d6acb09c5a73272c165c6e8a9c53099707296 from 3.x. --- .../java/org/apache/maven/plugin/compiler/CompilerMojo.java | 5 +++++ .../org/apache/maven/plugin/compiler/TestCompilerMojo.java | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java index 306ac5933..31c5a86fa 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java +++ b/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java @@ -83,6 +83,11 @@ public class CompilerMojo extends AbstractCompilerMojo { /** * A set of exclusion filters for the compiler. + * Excluding a source file only prevents the plugin from passing it explicitly to the compiler. + * The compiler may still find it on the source path and generate a class file for it. + * This can happen with {@code module-info.java}. + * + * @see #implicit */ @Parameter protected Set excludes; diff --git a/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java index 1cdc33633..b983b67a4 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java +++ b/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java @@ -80,8 +80,12 @@ public class TestCompilerMojo extends AbstractCompilerMojo { /** * A set of exclusion filters for the compiler. + * Excluding a source file only prevents the plugin from passing it explicitly to the compiler. + * The compiler may still find it on the source path and generate a class file for it. + * This can happen with {@code module-info.java}. * * @see CompilerMojo#excludes + * @see #implicit */ @Parameter protected Set testExcludes;