Skip to content

Instantly share code, notes, and snippets.

@fanatoly
Created July 24, 2013 15:34
Show Gist options
  • Save fanatoly/6071680 to your computer and use it in GitHub Desktop.
Save fanatoly/6071680 to your computer and use it in GitHub Desktop.
building a scalding megajar
import AssemblyKeys._
name := "traffic-jobs"
scalaVersion := "2.9.2"
description := "Traffic Analysis workflow"
libraryDependencies += "com.twitter" %% "scalding-core" % "0.8.6"
libraryDependencies += "com.twitter" %% "scalding-args" % "0.8.6"
libraryDependencies += "com.twitter" %% "scalding-date" % "0.8.6"
libraryDependencies += "com.twitter" %% "scalding-commons" % "0.2.0"
assemblySettings
// Janino includes a broken signature, and is not needed:
excludedJars in assembly <<= (fullClasspath in assembly) map { cp =>
val excludes = Set("jsp-api-2.1-6.1.14.jar", "jsp-2.1-6.1.14.jar",
"jasper-compiler-5.5.12.jar", "janino-2.5.16.jar")
cp filter { jar => excludes(jar.data.getName)}
}
// Some of these files have duplicates, let's ignore:
mergeStrategy in assembly <<= (mergeStrategy in assembly) { (old) =>
{
case s if s.endsWith(".class") => MergeStrategy.last
case s if s.endsWith("project.clj") => MergeStrategy.concat
case s if s.endsWith(".html") => MergeStrategy.last
case s if s.endsWith(".dtd") => MergeStrategy.last
case s if s.endsWith(".xsd") => MergeStrategy.last
case x => old(x)
}
}
jarName in assembly := "traffic-jobs-deploy.jar"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment