Skip to content

Remove duplicate maven-compiler-plugin declaration from pom.xml - #3204

Open
terryozaki-wq wants to merge 1 commit into
devfrom
fix-duplicate-maven-compiler-plugin
Open

terryozaki-wq wants to merge 1 commit into
devfrom
fix-duplicate-maven-compiler-plugin

Conversation

@terryozaki-wq

Copy link
Copy Markdown

Summary

  • Two <plugin> blocks for org.apache.maven.plugins:maven-compiler-plugin exist in the base (non-profile) <build><plugins> section: a plain one, and a more complete one adding forceLegacyJavacApi, -proc:full, and a default-compile execution configuring the log4j2 annotation processor required since JDK 23. The complete block is a strict superset of the plain one.
  • Removes the plain duplicate, keeping the complete one as the sole declaration.
  • Maven 3.9.x only warns about duplicate plugin declarations and builds anyway, which is why this went unnoticed; Maven 3.10+ rejects it outright with build.plugins.plugin.(groupId:artifactId) must be unique, breaking a clean local build for any contributor on a current Maven.

Test plan

  • mvn validate (JDK 25) — BUILD SUCCESS, no warning or error.

🤖 Generated with Claude Code

…om.xml

Two <plugin> blocks for org.apache.maven.plugins:maven-compiler-plugin
exist in the base (non-profile) <build><plugins> section: a plain one,
and a more complete one adding forceLegacyJavacApi, -proc:full, and a
default-compile execution configuring the log4j2 annotation processor
required since JDK 23. The complete block is a strict superset of the
plain one, so this removes the plain duplicate and keeps the complete
one as the sole declaration.

Maven 3.9.x only warns about duplicate plugin declarations and builds
anyway, which is why this went unnoticed; Maven 3.10+ rejects it
outright with 'build.plugins.plugin.(groupId:artifactId) must be
unique', breaking any contributor on a current Maven for a clean local
build.

Verified with a real `mvn validate` run (JDK 25) - BUILD SUCCESS, no
warning or error.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@terryozaki-wq
terryozaki-wq requested a review from a team as a code owner October 26, 2026 16:43
@snyk-io

snyk-io Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant