HADOOP-19084. Prune hadoop-common transitive dependencies (#6574) (#6582)

Exclude more artifacts which are dependencies of hadoop-* modules,
with the goal of keeping conflict out of downstream applications.
    
In particular we have pruned the dependencies of of:
-zookeeper
-other libraries referencing logging

This keeps slf4j-log4j12 and log4j12 off the classpath
of applications importing hadoop-common.

Somehow logback references do still surface; applications
pulling in hadoop-common directly or indirectly should
review their imports carefully.

Contributed by Steve Loughran
This commit is contained in:
Steve Loughran 2024-03-01 12:51:13 +00:00 committed by GitHub
parent 34bb28649c
commit a0ce2170db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 29 additions and 36 deletions

View File

@ -126,7 +126,7 @@
<commons-csv.version>1.9.0</commons-csv.version> <commons-csv.version>1.9.0</commons-csv.version>
<commons-io.version>2.14.0</commons-io.version> <commons-io.version>2.14.0</commons-io.version>
<commons-lang3.version>3.12.0</commons-lang3.version> <commons-lang3.version>3.12.0</commons-lang3.version>
<commons-logging.version>1.1.3</commons-logging.version> <commons-logging.version>1.2</commons-logging.version>
<commons-math3.version>3.6.1</commons-math3.version> <commons-math3.version>3.6.1</commons-math3.version>
<commons-net.version>3.9.0</commons-net.version> <commons-net.version>3.9.0</commons-net.version>
<commons-text.version>1.10.0</commons-text.version> <commons-text.version>1.10.0</commons-text.version>
@ -1435,15 +1435,11 @@
</exclusion> </exclusion>
<exclusion> <exclusion>
<groupId>io.netty</groupId> <groupId>io.netty</groupId>
<artifactId>netty-all</artifactId> <artifactId>*</artifactId>
</exclusion> </exclusion>
<exclusion> <exclusion>
<groupId>io.netty</groupId> <groupId>commons-io</groupId>
<artifactId>netty-handler</artifactId> <artifactId>commons-io</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
</exclusion> </exclusion>
<exclusion> <exclusion>
<groupId>commons-collections</groupId> <groupId>commons-collections</groupId>
@ -1507,15 +1503,7 @@
</exclusion> </exclusion>
<exclusion> <exclusion>
<groupId>io.netty</groupId> <groupId>io.netty</groupId>
<artifactId>netty-all</artifactId> <artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
</exclusion> </exclusion>
<exclusion> <exclusion>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
@ -1596,6 +1584,12 @@
<groupId>${leveldbjni.group}</groupId> <groupId>${leveldbjni.group}</groupId>
<artifactId>leveldbjni-all</artifactId> <artifactId>leveldbjni-all</artifactId>
<version>1.8</version> <version>1.8</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.fusesource.hawtjni</groupId> <groupId>org.fusesource.hawtjni</groupId>
@ -1958,11 +1952,23 @@
<groupId>org.ehcache</groupId> <groupId>org.ehcache</groupId>
<artifactId>ehcache</artifactId> <artifactId>ehcache</artifactId>
<version>${ehcache.version}</version> <version>${ehcache.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.zaxxer</groupId> <groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId> <artifactId>HikariCP</artifactId>
<version>${hikari.version}</version> <version>${hikari.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.derby</groupId> <groupId>org.apache.derby</groupId>
@ -2024,6 +2030,12 @@
<groupId>org.jsonschema2pojo</groupId> <groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-core</artifactId> <artifactId>jsonschema2pojo-core</artifactId>
<version>${jsonschema2pojo.version}</version> <version>${jsonschema2pojo.version}</version>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.xerial.snappy</groupId> <groupId>org.xerial.snappy</groupId>

View File

@ -93,25 +93,6 @@
<dependency> <dependency>
<groupId>org.apache.zookeeper</groupId> <groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId> <artifactId>zookeeper</artifactId>
<exclusions>
<exclusion>
<!-- otherwise seems to drag in junit 3.8.1 via jline -->
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>