Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I ignore scala library while sbt assembly

Tags:

scala

sbt

I am using sbt to build my scala project.

This is my build.sbt:

name := "My Spark App"
version := "1.0"
libraryDependencies += "org.apache.spark" %% "spark-core" % "1.2.0" % "provided"
libraryDependencies += "org.apache.spark" %% "spark-sql" % "1.2.0" % "provided"

I am running sbt assembly to create an assembly jar, but I found a scala directory containing scala library class codes.

Is it possible to take scala library as a provided dependency, since the run-time environment already contains scala?

like image 360
Eric Zheng Avatar asked Jan 29 '15 06:01

Eric Zheng


1 Answers

From docs, this might help

assemblyOption in assembly := (assemblyOption in assembly).value.copy(includeScala = false)
like image 163
mohit Avatar answered Sep 23 '22 12:09

mohit