From 01b6894e8d74d77696f7fec1652a05523438e10b Mon Sep 17 00:00:00 2001
From: Dave DeMaagd <ddemaagd@linkedin.com>
Date: Thu, 24 Jan 2013 12:34:52 -0800
Subject: [PATCH 1/2] KAFKA-733 add fat jar/assembly

---
 core/build.sbt      |   14 ++++++++++++++
 project/plugins.sbt |    2 ++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/core/build.sbt b/core/build.sbt
index 211aaf9..448c0c0 100644
--- a/core/build.sbt
+++ b/core/build.sbt
@@ -1,5 +1,6 @@
 import sbt._
 import Keys._
+import AssemblyKeys._
 
 name := "kafka"
 
@@ -24,4 +25,17 @@ libraryDependencies <<= (scalaVersion, libraryDependencies) { (sv, deps) =>
   })
 }
 
+assemblySettings
+
+test in assembly := {}
+
+mergeStrategy in assembly <<= (mergeStrategy in assembly) { (old) =>
+  {
+    case PathList("META-INF", xs @ _*) => (xs map {_.toLowerCase}) match {
+      case ("manifest.mf" :: Nil) | ("index.list" :: Nil) | ("dependencies" :: Nil) => MergeStrategy.discard
+      case _ => MergeStrategy.deduplicate
+    }
+    case _ => MergeStrategy.last
+  }
+}
 
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 48d44c8..aaf02ed 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -3,3 +3,5 @@ resolvers += Resolver.url("artifactory", url("http://scalasbt.artifactoryonline.
 addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.8.5")
 
 addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.2.0")
+
+addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.8.5")
-- 
1.7.1


From e3084e1c7ef30a27e87312e613a30146869c3a50 Mon Sep 17 00:00:00 2001
From: Dave DeMaagd <ddemaagd@linkedin.com>
Date: Mon, 25 Feb 2013 10:21:59 -0800
Subject: [PATCH 2/2] remove extra com.eed3si9n/sbt-assembly

---
 project/plugins.sbt |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/project/plugins.sbt b/project/plugins.sbt
index aaf02ed..48d44c8 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -3,5 +3,3 @@ resolvers += Resolver.url("artifactory", url("http://scalasbt.artifactoryonline.
 addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.8.5")
 
 addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.2.0")
-
-addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.8.5")
-- 
1.7.1

