소스 검색

HADOOP-16765. Fix curator dependencies for gradle projects using hadoop-minicluster. (#1763)

Gradle behaves differently than Maven when processing exclude rules through transitive
dependencies. This causes gradle projects (e.g. in Kudu) that are using Hadoop MiniCluster
to fail because different Guava version come to the classpath through Curator. In this
fix we make sure that ZooKeeper, SLF4J and Gradle gets always excluded from Curator Client
even if they would come through other Curator dependencies transitively.
Mate Szalay-Beko 5 년 전
부모
커밋
578bd101a6
1개의 변경된 파일28개의 추가작업 그리고 0개의 파일을 삭제
  1. 28 0
      hadoop-project/pom.xml

+ 28 - 0
hadoop-project/pom.xml

@@ -1387,6 +1387,20 @@
        <groupId>org.apache.curator</groupId>
        <artifactId>curator-recipes</artifactId>
        <version>${curator.version}</version>
+       <exclusions>
+         <exclusion>
+           <groupId>org.apache.zookeeper</groupId>
+           <artifactId>zookeeper</artifactId>
+         </exclusion>
+         <exclusion>
+           <groupId>com.google.guava</groupId>
+           <artifactId>guava</artifactId>
+         </exclusion>
+         <exclusion>
+           <groupId>org.slf4j</groupId>
+           <artifactId>slf4j-api</artifactId>
+         </exclusion>
+       </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.curator</groupId>
@@ -1411,6 +1425,20 @@
        <groupId>org.apache.curator</groupId>
        <artifactId>curator-framework</artifactId>
        <version>${curator.version}</version>
+       <exclusions>
+         <exclusion>
+           <groupId>org.apache.zookeeper</groupId>
+           <artifactId>zookeeper</artifactId>
+         </exclusion>
+         <exclusion>
+           <groupId>com.google.guava</groupId>
+           <artifactId>guava</artifactId>
+         </exclusion>
+         <exclusion>
+           <groupId>org.slf4j</groupId>
+           <artifactId>slf4j-api</artifactId>
+         </exclusion>
+       </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.curator</groupId>