Skip to content

Remove deprecated setCompilerVersion() call - #1088

Open
elharo wants to merge 1 commit into
apache:maven-compiler-plugin-3.xfrom
elharo:remove-deprecated-compilerVersion-call
Open

Remove deprecated setCompilerVersion() call#1088
elharo wants to merge 1 commit into
apache:maven-compiler-plugin-3.xfrom
elharo:remove-deprecated-compilerVersion-call

Conversation

@elharo

@elharo elharo commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

CompilerConfiguration.setCompilerVersion() is deprecated and no longer evaluated by the underlying compilers. The compilerVersion field in AbstractCompilerMojo is already @Deprecated with this Javadoc:

This parameter is no longer evaluated by the underlying compilers, instead the actual version of the javac binary is automatically retrieved.

This removes the no-op call to eliminate the deprecation warning while keeping the @Deprecated field for backward compatibility — users who still set maven.compiler.compilerVersion will get a deprecation warning but not a build error."

CompilerConfiguration.setCompilerVersion() is deprecated and no longer
evaluated by the underlying compilers. The compilerVersion field is
already @deprecated; remove the no-op call to eliminate the deprecation
warning while keeping the field for backward compatibility.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes a deprecated, no-op call to CompilerConfiguration.setCompilerVersion() from AbstractCompilerMojo.executeReal(), eliminating a deprecation warning while keeping the deprecated compilerVersion parameter for backward compatibility with existing user configurations.

Changes:

  • Removed the compilerConfiguration.setCompilerVersion(compilerVersion); call during compiler configuration setup.
  • Kept the deprecated compilerVersion Maven parameter intact so users still receive a deprecation warning (without breaking builds).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants