feat: import confluent-common-bom for dependency version management#977
feat: import confluent-common-bom for dependency version management#977Na Lou (nlou9) wants to merge 3 commits intomasterfrom
Conversation
Replace individual dependencyManagement entries with a single confluent-common-bom import for third-party dependencies. This delegates version management to the BOM while keeping all properties for downstream repo backward compatibility. Deps removed (now managed by BOM): avro, classgraph, commons-io, commons-lang3, commons-beanutils, commons-codec, commons-compress, commons-validator, grpc-bom, okio-jvm, protobuf-java, snakeyaml, jetty-bom, snappy-java, jose4j, guava, httpclient5, slf4j-api, jaxb-api, spotbugs-annotations, bcpkix-jdk18on, bcprov-jdk18on, bc-fips, bctls-fips, bcpkix-fips, bcutil-fips, gson, netty-bom, slf4j-reload4j, logback-core, reload4j, logredactor, junit, easymock, powermock-*. Deps kept (not in BOM): jackson-bom, aws-java-sdk-bom, aws-sdk-v2, azure-*, scala-*, kafka-*, confluent internal modules, junit-bom, mockito-bom, mockito-all, hamcrest-all, log4j-slf4j-impl (runtime scope). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Imports the io.confluent:confluent-common-bom into common-parent to centralize third‑party dependency version management and reduce the amount of explicit dependencyManagement entries maintained directly in this repo.
Changes:
- Import
io.confluent:confluent-common-bom:0.0.1-SNAPSHOTindependencyManagement. - Remove a large set of explicitly version-pinned third‑party dependencies now expected to be managed by the BOM.
- Keep select BOMs/dependencies (Jackson/AWS/Azure/Scala/Kafka/test BOMs) explicitly managed in
common-parent.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <dependency> | ||
| <groupId>org.apache.avro</groupId> | ||
| <artifactId>avro</artifactId> | ||
| <version>${avro.version}</version> | ||
| </dependency> | ||
| <!-- Pin the classgraph version to match version used in ce-kafka. | ||
| The outadated version is brought by schema-registry transitive | ||
| dependency mbknor-jackson --> | ||
| <dependency> | ||
| <groupId>io.github.classgraph</groupId> | ||
| <artifactId>classgraph</artifactId> | ||
| <version>${classgraph.version}</version> | ||
| </dependency> | ||
| <!-- Unify version of commons-io with ce-kafka, allow downstream repos to unpin --> | ||
| <dependency> | ||
| <groupId>commons-io</groupId> | ||
| <artifactId>commons-io</artifactId> | ||
| <version>${commons-io.version}</version> | ||
| </dependency> | ||
| <!-- Unify version of commons-lang3 with ce-kafka, allow downstream repos to unpin --> | ||
| <dependency> | ||
| <groupId>org.apache.commons</groupId> | ||
| <artifactId>commons-lang3</artifactId> | ||
| <version>${commons-lang3.version}</version> | ||
| </dependency> | ||
| <!-- Pin version of commons-beanutils as it is used transitively not only by commons-validator --> | ||
| <dependency> | ||
| <groupId>commons-beanutils</groupId> | ||
| <artifactId>commons-beanutils</artifactId> | ||
| <version>${commons-beanutils.version}</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>commons-codec</groupId> | ||
| <artifactId>commons-codec</artifactId> | ||
| <version>${commons-codec.version}</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.commons</groupId> | ||
| <artifactId>commons-compress</artifactId> | ||
| <version>${commons-compress.version}</version> | ||
| </dependency> | ||
| <!-- Unify version of commons-validator with ce-kafka, allow downstream repos to unpin --> | ||
| <dependency> | ||
| <groupId>commons-validator</groupId> | ||
| <artifactId>commons-validator</artifactId> | ||
| <version>${commons-validator.version}</version> | ||
| </dependency> | ||
| <!-- Unify version of grpc-version with ce-kafka, allow downstream repos to unpin --> | ||
| <dependency> | ||
| <groupId>io.grpc</groupId> | ||
| <artifactId>grpc-bom</artifactId> | ||
| <version>1.75.0</version> | ||
| <type>pom</type> | ||
| <scope>import</scope> | ||
| </dependency> | ||
| <!-- This is to match to okio version used in ce-flink / ce-kafka 7.8 --> | ||
| <dependency> | ||
| <groupId>com.squareup.okio</groupId> | ||
| <artifactId>okio-jvm</artifactId> | ||
| <version>${okio.version}</version> | ||
| </dependency> | ||
| <!-- This is to unify the version of Protocol Buffers across CP --> | ||
| <dependency> | ||
| <groupId>com.google.protobuf</groupId> | ||
| <artifactId>protobuf-java</artifactId> | ||
| <version>${protobuf.version}</version> | ||
| </dependency> | ||
| <!-- snakeyaml is brought in by several confluent libraries | ||
| as "provided" dependency, thus leading to usage of | ||
| outdated versions. This instructs projects using this pom | ||
| to use this snakeyaml version, unless otherwise overriden. | ||
| After this change, we should remove all the snakeyaml re-definitions | ||
| in other Confluent repositories. --> | ||
| <dependency> | ||
| <groupId>org.yaml</groupId> | ||
| <artifactId>snakeyaml</artifactId> | ||
| <version>${snakeyaml.version}</version> | ||
| </dependency> | ||
| <!-- Unify jetty across CP, remove jetty definition from | ||
| rest-utils after this goes through --> | ||
| <dependency> | ||
| <groupId>org.eclipse.jetty</groupId> | ||
| <artifactId>jetty-bom</artifactId> | ||
| <version>${jetty.version}</version> | ||
| <groupId>io.confluent</groupId> | ||
| <artifactId>confluent-common-bom</artifactId> | ||
| <version>0.0.1-SNAPSHOT</version> | ||
| <type>pom</type> | ||
| <scope>import</scope> | ||
| </dependency> |
There was a problem hiding this comment.
The BOM is imported with a -SNAPSHOT version, but the only configured Maven repository does not explicitly enable snapshots. By default, snapshots are disabled for repositories, so this is likely to fail dependency resolution when building this parent POM. Prefer switching to a released BOM version, or explicitly enable snapshots for the confluent repository if using a snapshot is required.
| <groupId>io.confluent</groupId> | ||
| <artifactId>confluent-common-bom</artifactId> | ||
| <version>0.0.1-SNAPSHOT</version> | ||
| <type>pom</type> |
There was a problem hiding this comment.
The BOM version is hard-coded here (0.0.1-SNAPSHOT) while other BOMs in this file use properties. Consider introducing a dedicated property (e.g., confluent-common-bom.version) so updates are centralized and downstream builds can override it consistently if needed.
| <groupId>com.fasterxml.jackson</groupId> | ||
| <artifactId>jackson-bom</artifactId> | ||
| <version>${jackson.version}</version> | ||
| <scope>import</scope> | ||
| <type>pom</type> |
There was a problem hiding this comment.
Indentation for this jackson-bom dependency block is inconsistent with the surrounding <dependency> entries (the inner tags are less indented). Please align the indentation to match the rest of dependencyManagement for readability and to reduce noisy diffs in future edits.
| <groupId>com.fasterxml.jackson</groupId> | |
| <artifactId>jackson-bom</artifactId> | |
| <version>${jackson.version}</version> | |
| <scope>import</scope> | |
| <type>pom</type> | |
| <groupId>com.fasterxml.jackson</groupId> | |
| <artifactId>jackson-bom</artifactId> | |
| <version>${jackson.version}</version> | |
| <scope>import</scope> | |
| <type>pom</type> |
Add CodeArtifact repository entry so Maven can resolve confluent-common-bom:0.0.1-SNAPSHOT during CI builds. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The BOM resolution needs to be handled via CI Maven settings, not in the public pom.xml. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
confluent-common-bom:0.0.1-SNAPSHOTintocommon-parent'sdependencyManagementsectiondependencyManagementthat are now managed by the BOM (avro, classgraph, commons-, grpc-bom, okio, protobuf, snakeyaml, jetty-bom, snappy-java, jose4j, guava, httpclient5, slf4j-api, jaxb-api, spotbugs, bouncycastle-, gson, netty-bom, slf4j-reload4j, logback-core, reload4j, logredactor, junit, easymock, powermock-*)<parent>chainWhat stays in common-parent
<properties>— downstream repos rely on inherited properties likejackson.version,jetty.version,netty.version, etc.Phase 2 (follow-up)
Downstream repos need to be migrated to stop using inherited properties before they can be removed from common-parent. Tracked separately.
Test plan
mvn help:effective-pomresolves all dependency versions correctlydependencyManagemententries🤖 Generated with Claude Code