This is an automated email from the ASF dual-hosted git repository. bmarwell pushed a commit to branch MCOMPILER-550_writeable_outputDirectory in repository https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git
commit f9decf2538de12a06cf44e5e41eb405b63c5d70b Author: Benjamin Marwell <bmarw...@apache.org> AuthorDate: Sat Oct 21 13:39:28 2023 +0200 [MCOMPILER-550] make outputDirectory writeable - add more documentation when and how to use it (and when to not use it) - fixes MCOMPILER-550 --- .../java/org/apache/maven/plugin/compiler/CompilerMojo.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 023cec4..41d6190 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java +++ b/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java @@ -70,8 +70,17 @@ public class CompilerMojo extends AbstractCompilerMojo { /** * The directory for compiled classes. + * <p> + * This parameter should only be modified in special cases. One example is creating + * a multi-release jar with a lower bytecode level (i.e. setting it to + * {@code ${project.build.outputDirectory}/META-INF/versions/21} or similar) in an additional + * execution. + * <p> + * When the required bytecode level is available though an installed JDK or toolchain, + * it is recommended to use the {@code <release>} property + * in conjunction with the ${multiReleaseOutput} parameter instead. */ - @Parameter(defaultValue = "${project.build.outputDirectory}", required = true, readonly = true) + @Parameter(defaultValue = "${project.build.outputDirectory}", required = true, readonly = false) private File outputDirectory; /**