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 0638d2991..8fc63c598 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java +++ b/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java @@ -109,6 +109,11 @@ public class CompilerMojo extends AbstractCompilerMojo { /** * A list 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 AbstractCompilerMojo#implicit */ @Parameter private Set excludes = new HashSet<>(); 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 1e0b76ea8..e4058f1f5 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java +++ b/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java @@ -96,6 +96,11 @@ public class TestCompilerMojo extends AbstractCompilerMojo { /** * A list 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 AbstractCompilerMojo#implicit */ @Parameter private Set testExcludes = new HashSet<>();