Skip to content

Commit

Permalink
Merge pull request #202 from apache/MCOMPILER-550_writeable_outputDir…
Browse files Browse the repository at this point in the history
…ectory

[MCOMPILER-550] make outputDirectory writable
  • Loading branch information
bmarwell committed Oct 23, 2023
2 parents f77150b + 627c04e commit c459d1d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
11 changes: 10 additions & 1 deletion src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,13 @@ public class TestCompilerMojo extends AbstractCompilerMojo {

/**
* The directory where compiled test classes go.
* <p>
* This parameter should only be modified in special cases.
* See the {@link CompilerMojo#outputDirectory} for more information.
*
* @see CompilerMojo#outputDirectory
*/
@Parameter(defaultValue = "${project.build.testOutputDirectory}", required = true, readonly = true)
@Parameter(defaultValue = "${project.build.testOutputDirectory}", required = true, readonly = false)
private File outputDirectory;

/**
Expand Down

0 comments on commit c459d1d

Please sign in to comment.