Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions kafka-plugins-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,22 @@
</exclusion>
</exclusions>
</dependency>
<!--
commons-compress 1.26.x (via avro) needs commons-io 2.12+ (e.g. CloseShieldInputStream.wrap in the
bzip2 codec). Without a direct dependency Maven mediates to the commons-io 2.4 of the provided
hadoop-common, which is not packaged in the plugin jar.
-->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.16.1</version>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Use the parent POM property ${commons-io.version} instead of hardcoding the version here to ensure consistent version management across modules.

Suggested change
<version>2.16.1</version>
<version>${commons-io.version}</version>

</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.12</artifactId>
<version>${kafka.version}</version>
<!-- Embedded Kafka broker for unit tests only; plugin code uses kafka-clients. -->
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
Expand Down Expand Up @@ -203,11 +215,13 @@
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>${netty.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cdap.http</groupId>
<artifactId>netty-http</artifactId>
<version>${netty-http.version}</version>
<scope>test</scope>
</dependency>
Comment on lines 215 to 225

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The dependencies netty-all and netty-http are already declared in the parent POM's <dependencies> section (lines 292-303) with <scope>test</scope>. Since they are automatically inherited by all submodules, these declarations in kafka-plugins-client/pom.xml are completely redundant and can be safely removed.

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
Expand Down
25 changes: 22 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,32 @@
<hadoop.version>2.6.0</hadoop.version>
<netty.version>4.1.75.Final</netty.version>
<netty-http.version>1.3.0</netty-http.version>
<avro.version>1.8.2</avro.version>
<avro.version>1.11.4</avro.version>
<main.basedir>${project.basedir}</main.basedir>
<logback.version>1.0.9</logback.version>
<slf4j.version>1.7.25</slf4j.version>
<jackson.version>2.10.5.1</jackson.version>
<jackson.version>2.18.12</jackson.version>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To maintain consistency and centralize version management, define the commons-io version as a property in the parent POM's <properties> section rather than hardcoding it in the child module.

    <jackson.version>2.18.12</jackson.version>
    <commons-io.version>2.16.1</commons-io.version>

</properties>

<dependencyManagement>
<dependencies>
<!-- Align every Jackson 2 module (core, databind, annotations, dataformats, modules). -->
<dependency>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>${jackson.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- avro 1.11.4 brings commons-compress 1.22; 1.26.2 fixes CVE-2024-25710 / CVE-2024-26308. -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.26.2</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>io.cdap.cdap</groupId>
Expand Down Expand Up @@ -262,7 +281,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.9</version>
<version>3.18.0</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
Expand Down
Loading