Skip to content

Commit 92b766f

Browse files
committed
[MCOMPILER-550] make outputDirectory writeable
- add more documentation when and how to use it (and when to not use it) - fixes MCOMPILER-550
1 parent 30767d7 commit 92b766f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,17 @@ public class CompilerMojo extends AbstractCompilerMojo {
7070

7171
/**
7272
* The directory for compiled classes.
73+
* <p>
74+
* This parameter should only be modified in special cases. One example is creating
75+
* a multi-release jar with a lower bytecode level (i.e. setting it to
76+
* {@code ${project.build.outputDirectory}/META-INF/versions/21} or similar) in an additional
77+
* execution.
78+
* <p>
79+
* When the required bytecode level is available though an installed JDK or toolchain,
80+
* it is recommended to use the {@code <release>} property
81+
* in conjunction with the ${multiReleaseOutput} parameter instead.
7382
*/
74-
@Parameter(defaultValue = "${project.build.outputDirectory}", required = true, readonly = true)
83+
@Parameter(defaultValue = "${project.build.outputDirectory}", required = true, readonly = false)
7584
private File outputDirectory;
7685

7786
/**

0 commit comments

Comments
 (0)