Eric Zheng
Eric Zheng

Reputation: 1144

How can I ignore scala library while sbt assembly

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?

Upvotes: 6

Views: 2429

Answers (1)

mohit
mohit

Reputation: 4999

From docs, this might help

assemblyOption in assembly := (assemblyOption in assembly).value.copy(includeScala = false)

Upvotes: 10

Related Questions