Skip to content

[v0.11.0] Fix duplicate POM declarations rejected by Maven 3.10 - #3236

Closed
ccoltx wants to merge 2 commits into
v0.11.0from
fix/v0.11.0-duplicate-jar-plugin
Closed

ccoltx wants to merge 2 commits into
v0.11.0from
fix/v0.11.0-duplicate-jar-plugin

Conversation

@ccoltx

@ccoltx ccoltx commented Oct 20, 2026 •

Copy link
Copy Markdown

Summary

CI on every PR into v0.11.0 fails while reading the POMs. The runners now use Maven 3.10, which rejects a plugin or dependency declared twice in one POM (Maven 3.9 only logged a warning). This PR backports the two fixes from main for the two duplicates on the branch:

  1. packages/clickhouse-jdbc-all/pom.xml: maven-jar-plugin declared twice. This breaks "Build and install libraries". The fix takes only the clickhouse-jdbc-all part of 91017eb (from [repo] Cluster Tests #3187), which merges the two declarations. The plugin version now comes from pluginManagement (jar-plugin.version = 3.4.2), the same as on main; the second declaration had pinned 3.3.0. The root pom.xml part of 91017eb is left out, because it moves the default-jar manifest configuration out of the release profiles and would change jar manifests of builds that don't use those profiles.
  2. examples/client-v2/pom.xml: jackson-databind declared twice (test and compile scope). This breaks "Compile examples". Backport of 2b635d1 ("fixed example build"), which keeps one dependency with the default compile scope. Conflict: main has version 2.18.11, and the branch value 2.18.10 is kept, because that bump is part of [v0.11.0] Version upgrades (backport #3183, #3184, #3182, #3196, #3195, #3223) #3233.

A scan of every pom.xml on the branch, covering all <dependencies> and <plugins> blocks including profiles and management sections, found no other duplicates.

Unblocks #3233, #3234 and #3235: after this PR merges, merge v0.11.0 into each of them. #3233 changes the jackson-databind version line in examples/client-v2/pom.xml, so that merge needs a small conflict resolution. The diagnosis is in #3233 (comment).

Test

  • Not run locally (Maven isn't installed on this machine). The CI on this PR is the check. On the first push, "Build and install libraries" passed with Maven 3.10.0, and "Compile examples" then failed on the jackson-databind duplicate, which the second commit fixes.

🤖 Generated with Claude Code


Note

Low Risk
Build/POM-only changes with no runtime library logic; the example module’s Jackson scope widens from test to compile, which is intentional for sample code.

Overview
Fixes Maven 3.10 CI failures caused by duplicate maven-jar-plugin entries in clickhouse-jdbc-all: the two blocks are merged into one plugin with the existing archive settings and the javadoc-jar execution, and the extra pinned 3.3.0 declaration is removed so the version comes from parent pluginManagement (as on main).

In examples/client-v2, duplicate jackson-databind dependencies are collapsed to a single 2.18.10 entry and the test scope is dropped so examples compile against Jackson at runtime, not only in tests.

Reviewed by Cursor Bugbot for commit 4dd0353. Bugbot is set up for automated code reviews on this repo. Configure here.

Maven 3.10 rejects a plugin declared twice in one POM (3.9 only warned),
so every build of v0.11.0 now fails while reading the POMs. Merge the two
maven-jar-plugin declarations into one; the version now comes from
pluginManagement (3.4.2), as on main.

Only the packages/clickhouse-jdbc-all/pom.xml part of the original commit
is taken. The root pom.xml part moves the default-jar manifest
configuration out of the profiles, which is not needed for this fix.

(cherry picked from commit 91017eb)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Maven 3.10 rejects a dependency declared twice in one POM, so the
"Compile examples" CI step fails on v0.11.0. Keep one jackson-databind
dependency with the default (compile) scope, as on main.

Conflict: the version is 2.18.11 on main and 2.18.10 on v0.11.0. Kept
the branch value; the bump is part of the #3233 backport.

(cherry picked from commit 2b635d1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ccoltx ccoltx changed the title [v0.11.0] Fix duplicate maven-jar-plugin declaration in clickhouse-jdbc-all [v0.11.0] Fix duplicate POM declarations rejected by Maven 3.10 Oct 20, 2026
@github-actions

Copy link
Copy Markdown

Triage

Category: infra • Risk: low

Summary
Backports two POM fixes from main to the v0.11.0 release branch to unblock CI, which now runs Maven 3.10 and rejects duplicate declarations that Maven 3.9 only warned about. In packages/clickhouse-jdbc-all/pom.xml the twice-declared maven-jar-plugin is merged into one declaration (version now inherited from pluginManagement as on main, dropping the pinned 3.3.0), and in examples/client-v2/pom.xml the twice-declared jackson-databind is collapsed to a single compile-scope entry at 2.18.10. The diff is 12 deleted lines across two POMs, no source code changes; the PR explicitly unblocks #3233, #3234 and #3235.

What this impacts

  • Build configuration only: clickhouse-jdbc-all shaded-jar packaging POM and the examples/client-v2 example module POM on the v0.11.0 branch.
  • No library source, public API, or runtime behavior changes.

Concerns

  • Targets the v0.11.0 release branch, and merging the maven-jar-plugin declarations implicitly moves its version from pinned 3.3.0 to 3.4.2 via pluginManagement — matches main, but a reviewer should confirm the release-artifact jar output is unaffected.
  • No linked issue; however, the body documents the diagnosis and the author verified via CI behavior (not run locally). Required checks were still in progress at triage time.

Required reviewer action

  • AI review with no comments → eligible for auto-merge per repo policy.

@chernser

Copy link
Copy Markdown
Contributor

@ccoltx
Thanks for reminding this fix but there is more correct way to make it https://github.com/ClickHouse/clickhouse-java/pull/3187/changes#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8

I will do propagation myself - besides this PR also changes some dependency version.

@chernser chernser closed this Oct 21, 2026
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