This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch feature/rename-parameter-forceJavacCompilerUse in repository https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git
commit 0d9cd091e5d6d015a27d74ea85e9a83e4315195e Author: Konrad Windszus <k...@apache.org> AuthorDate: Mon Feb 26 11:39:48 2024 +0100 [MCOMPILER-577] Rename parameter "forceJavacCompilerUse" Clarify meaning in javadoc --- .../maven/plugin/compiler/AbstractCompilerMojo.java | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java index 1e039df..d8cbae2 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java +++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java @@ -567,16 +567,28 @@ public abstract class AbstractCompilerMojo extends AbstractMojo { @Parameter(defaultValue = "false", property = "maven.compiler.skipMultiThreadWarning") private boolean skipMultiThreadWarning; + /** + * Legacy parameter name of {@link #forceLegacyJavacApi}. Only considered if {@link #forceLegacyJavacApi} is + * not set or {@code false}. + * @since 3.0 + * @deprecated Use {@link #forceLegacyJavacApi} instead + */ + @Deprecated + @Parameter(defaultValue = "false", property = "maven.compiler.forceJavacCompilerUse") + private boolean forceJavacCompilerUse; + /** * The underlying compiler now uses <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.compiler/javax/tools/package-summary.html">{@code javax.tools} API</a> * if available in your current JDK. * Set this to {@code true} to always use the legacy <a href="https://docs.oracle.com/en/java/javase/17/docs/api/jdk.compiler/com/sun/tools/javac/package-summary.html"> * {@code com.sun.tools.javac} API</a> instead. + * <p> + * <em>This only has an effect for {@link #compilerId} being {@code javac} and {@link #fork} being {@code false}</em>. * - * @since 3.0 + * @since 3.13 */ - @Parameter(defaultValue = "false", property = "maven.compiler.forceJavacCompilerUse") - private boolean forceJavacCompilerUse; + @Parameter(defaultValue = "false", property = "maven.compiler.forceLegacyJavacApi") + private boolean forceLegacyJavacApi; /** * @since 3.0 needed for storing the status for the incremental build support. @@ -901,7 +913,7 @@ public abstract class AbstractCompilerMojo extends AbstractMojo { getLog().debug("CompilerReuseStrategy: " + compilerConfiguration.getCompilerReuseStrategy().getStrategy()); - compilerConfiguration.setForceJavacCompilerUse(forceJavacCompilerUse); + compilerConfiguration.setForceJavacCompilerUse(forceLegacyJavacApi||forceJavacCompilerUse); boolean canUpdateTarget;