Created
August 23, 2013 06:20
-
-
Save blmarket/6316088 to your computer and use it in GitHub Desktop.
Include only scala library in assembly.
in this example, hadoop and hbase are already deployed, so I only need scala, not others.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AssemblyKeys._ | |
assemblySettings | |
name := "HelloWorld" | |
version := "0.0.1" | |
scalaVersion := "2.9.2" | |
scalacOptions ++= Seq("-Ydependent-method-types", "-deprecation") | |
libraryDependencies ++= Seq( | |
"org.apache.hbase" % "hbase" % "0.94.6-cdh4.3.0", | |
"org.apache.hadoop" % "hadoop-common" % "2.0.0-cdh4.3.0", | |
"org.apache.hadoop" % "hadoop-client" % "2.0.0-cdh4.3.0" | |
) | |
resolvers ++= Seq( | |
"Hadoop Releases" at "https://repository.cloudera.com/content/repositories/releases/", | |
"Cloudera" at "https://repository.cloudera.com/artifactory/public/" | |
) | |
// adding some conf directories for hadoop/hbase conf. | |
// unmanagedJars in Compile <++= baseDirectory map { base => | |
// val baseJars = (base ** "*.jar") | |
// (baseJars +++ file("/etc/hbase/conf") +++ file("/etc/hadoop/conf")).classpath | |
// } | |
// include only scala language jars | |
excludedJars in assembly <<= (fullClasspath in assembly) map { | |
cp => cp filter { | |
jar => !jar.data.getName.startsWith("scala-") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment