Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MCOMPILER-577] Rename parameter "forceJavacCompilerUse" #225

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -901,7 +913,7 @@ public void execute() throws MojoExecutionException, CompilationFailureException
getLog().debug("CompilerReuseStrategy: "
+ compilerConfiguration.getCompilerReuseStrategy().getStrategy());

compilerConfiguration.setForceJavacCompilerUse(forceJavacCompilerUse);
compilerConfiguration.setForceJavacCompilerUse(forceLegacyJavacApi || forceJavacCompilerUse);

boolean canUpdateTarget;

Expand Down