gnodet-bot commented on code in PR #30490:
URL: https://github.com/apache/camel/pull/30490#discussion_r4641659704
##########
components/camel-debezium/camel-debezium-common/camel-debezium-common-component/pom.xml:
##########
@@ -54,6 +54,32 @@
<artifactId>lz4-java</artifactId>
<version>${lz4-java-version}</version>
</dependency>
+ <!-- Kafka Connect of the same version as kafka-clients (Kafka moves
internal classes between minor versions) -->
+ <dependency>
+ <groupId>org.apache.kafka</groupId>
+ <artifactId>connect-api</artifactId>
+ <version>${kafka-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.kafka</groupId>
+ <artifactId>connect-json</artifactId>
+ <version>${kafka-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.kafka</groupId>
+ <artifactId>connect-runtime</artifactId>
+ <version>${kafka-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.kafka</groupId>
+ <artifactId>connect-transforms</artifactId>
Review Comment:
💡 **`connect-transforms` is redundant** — it's already a compile-scope
transitive dependency of `connect-runtime` 4.4.0 (verified in the published
POM). Maven will already resolve it to 4.4.0 without this explicit declaration.
If kept for documentation purposes, add a comment explaining why it's listed
explicitly. Otherwise, consider removing it to keep the dependency list minimal.
##########
components/camel-debezium/camel-debezium-common/camel-debezium-common-component/pom.xml:
##########
@@ -54,6 +54,32 @@
<artifactId>lz4-java</artifactId>
<version>${lz4-java-version}</version>
</dependency>
+ <!-- Kafka Connect of the same version as kafka-clients (Kafka moves
internal classes between minor versions) -->
+ <dependency>
+ <groupId>org.apache.kafka</groupId>
+ <artifactId>connect-api</artifactId>
+ <version>${kafka-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.kafka</groupId>
+ <artifactId>connect-json</artifactId>
+ <version>${kafka-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.kafka</groupId>
+ <artifactId>connect-runtime</artifactId>
Review Comment:
⚠️ **`connect-runtime` should be `<scope>runtime</scope>`**
No Camel Debezium source file imports any class from `connect-runtime` at
compile time — it's needed at runtime because Debezium's embedded engine loads
`MemoryOffsetBackingStore`, which now references
`org.apache.kafka.common.utils.internals.ThreadUtils`.
`connect-runtime` is also a heavyweight artifact that transitively pulls
Jetty, Jackson, SwaggerUI, and other libraries. Declaring it at compile scope
exposes all these transitives to downstream consumers of
`camel-debezium-common`.
```suggestion
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>connect-runtime</artifactId>
<version>${kafka-version}</version>
<scope>runtime</scope>
</dependency>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]