This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new c2326c6  [MCOMPILER-577] Rename parameter "forceJavacCompilerUse" 
(#225)
c2326c6 is described below

commit c2326c63de37fcb655ae51a857023c2d2a40c73b
Author: Konrad Windszus <k...@apache.org>
AuthorDate: Mon Feb 26 15:05:42 2024 +0100

    [MCOMPILER-577] Rename parameter "forceJavacCompilerUse" (#225)
    
    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..3f4278a 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;
 

Reply via email to