From f9decf2538de12a06cf44e5e41eb405b63c5d70b Mon Sep 17 00:00:00 2001 From: Benjamin Marwell Date: Sat, 21 Oct 2023 13:39:28 +0200 Subject: [PATCH] [MCOMPILER-550] make outputDirectory writeable - add more documentation when and how to use it (and when to not use it) - fixes MCOMPILER-550 --- .../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 023cec4d..41d61903 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. + *

+ * 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. + *

+ * When the required bytecode level is available though an installed JDK or toolchain, + * it is recommended to use the {@code } 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; /**