title: spark + sbt-assembly: "deduplicate: different file contents found in the following"
body: <p>I ran spark application and wanna pack the test classes into the fat jar. What is weird is I ran "sbt assembly" successfully, but failed when I ran "sbt test:assembly". </p>
  
  <p>I tried <a href="https://stackoverflow.com/questions/20488329/sbt-assembly-including-test-classes">sbt-assembly : including test classes</a>, it didn't work for my case. </p>
  
  <p>SBT version : 0.13.8</p>
  
  <p>build.sbt:</p>
  
  <pre><code>import sbtassembly.AssemblyPlugin._
  
  name := "assembly-test"
  
  version := "1.0"
  
  scalaVersion := "2.10.5"
  
  libraryDependencies ++= Seq(
    ("org.apache.spark" % "spark-core_2.10" % "1.3.1" % Provided)
      .exclude("org.mortbay.jetty", "servlet-api").
      exclude("commons-beanutils", "commons-beanutils-core").
      exclude("commons-collections", "commons-collections").
      exclude("commons-logging", "commons-logging").
      exclude("com.esotericsoftware.minlog", "minlog").exclude("com.codahale.metrics", "metrics-core"),
    "org.json4s" % "json4s-jackson_2.10" % "3.2.10" % Provided,
    "com.google.inject" % "guice" % "4.0"
  )
  
  Project.inConfig(Test)(assemblySettings)
  </code></pre>