From c52c231c792ce4621ca9c9290595874e6390f9bc Mon Sep 17 00:00:00 2001
From: aniketbhatnagar <aniket.bhatnagar@gmail.com>
Date: Wed, 1 Oct 2014 18:31:18 -0700
Subject: [PATCH] SPARK-3638 | Forced a compatible version of http client in
 kinesis-asl profile

This patch forces use of commons http client 4.2 in Kinesis-asl profile so that the AWS SDK does not run into dependency conflicts

Author: aniketbhatnagar <aniket.bhatnagar@gmail.com>

Closes #2535 from aniketbhatnagar/Kinesis-HttpClient-Dep-Fix and squashes the following commits:

aa2079f [aniketbhatnagar] Merge branch 'Kinesis-HttpClient-Dep-Fix' of https://github.com/aniketbhatnagar/spark into Kinesis-HttpClient-Dep-Fix
73f55f6 [aniketbhatnagar] SPARK-3638 | Forced a compatible version of http client in kinesis-asl profile
70cc75b [aniketbhatnagar] deleted merge files
725dbc9 [aniketbhatnagar] Merge remote-tracking branch 'origin/Kinesis-HttpClient-Dep-Fix' into Kinesis-HttpClient-Dep-Fix
4ed61d8 [aniketbhatnagar] SPARK-3638 | Forced a compatible version of http client in kinesis-asl profile
9cd6103 [aniketbhatnagar] SPARK-3638 | Forced a compatible version of http client in kinesis-asl profile

(cherry picked from commit 93861a5e876fa57f509cce82768656ddf8d4ef00)
Signed-off-by: Josh Rosen <joshrosen@apache.org>
---
 assembly/pom.xml | 10 ++++++++++
 examples/pom.xml |  5 +++++
 pom.xml          |  1 +
 3 files changed, 16 insertions(+)

diff --git a/assembly/pom.xml b/assembly/pom.xml
index 4709b7dbdd..0531fb7b37 100644
--- a/assembly/pom.xml
+++ b/assembly/pom.xml
@@ -315,5 +315,15 @@
         </plugins>
       </build>
     </profile>
+    <profile>
+      <id>kinesis-asl</id>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.httpcomponents</groupId>
+          <artifactId>httpclient</artifactId>
+          <version>${commons.httpclient.version}</version>
+        </dependency>
+      </dependencies>
+    </profile>
   </profiles>
 </project>
diff --git a/examples/pom.xml b/examples/pom.xml
index f35d3d6a78..6124cf8552 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -43,6 +43,11 @@
           <artifactId>spark-streaming-kinesis-asl_${scala.binary.version}</artifactId>
           <version>${project.version}</version>
         </dependency>
+        <dependency>
+          <groupId>org.apache.httpcomponents</groupId>
+          <artifactId>httpclient</artifactId>
+          <version>${commons.httpclient.version}</version>
+        </dependency>
       </dependencies>
     </profile>
   </profiles>
diff --git a/pom.xml b/pom.xml
index 4a911a490f..e7ed8837b6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -137,6 +137,7 @@
     <jets3t.version>0.7.1</jets3t.version>
     <aws.java.sdk.version>1.8.3</aws.java.sdk.version>
     <aws.kinesis.client.version>1.1.0</aws.kinesis.client.version>
+    <commons.httpclient.version>4.2.6</commons.httpclient.version>
 
     <PermGen>64m</PermGen>
     <MaxPermGen>512m</MaxPermGen>
-- 
GitLab