Questions tagged [sbt-assembly]

sbt-assembly is an sbt plugin for building a single JAR file of a project.

sbt-assembly is open-source and is available under the MIT licence.

528 questions
3
votes
1 answer

sbt deduplicate: different file contents found in the following:

I'm aware this question has been asked (and answered) numerous times, but the existing answers do not address my case. I am trying to build the DataStax spark-cassandra-connector (tag v1.5.0-M3) as per this tutorial ./sbt/sbt assembly but I get…
Philip O'Brien
  • 4,146
  • 10
  • 46
  • 96
3
votes
1 answer

Not able to use assembly plugin

I am using scala version 2.11.7 I want to build a jar file from sbt which can be executed on a machine where scala is not installed. I guess i have to package the scala-library.jar in my jar file. Based on some googling, I think I will have to use…
Knows Not Much
  • 30,395
  • 60
  • 197
  • 373
3
votes
0 answers

how to make sbt-assembly case sensitive

my project uses an un-managed fat jar file. on this file there are some classes that differ only by the case for instance it might have ABC.class and Abc.class when I use sbt-assembly it outputs only one of the classes. is there any way letting…
guysha
  • 31
  • 1
3
votes
2 answers

How should we address local dependencies in sbt files for Spark

I have this sbt file: offline := true name := "hello" version := "1.0" scalaVersion := "2.11.7-local" scalaHome := Some(file("/home/ubuntu/software/scala-2.11.7")) libraryDependencies += "org.apache.spark" %% "spark-core" % "1.5.0" % "provided" How…
Mona Jalal
  • 34,860
  • 64
  • 239
  • 408
3
votes
1 answer

Cannot find main class to run .jar, from Sbt-Assembly

MyProject/build.sbt mainClass in assembly := Some("Boot") MyProject/Boot.scala package src.main.myproject object Boot extends App { ... } Other Project Files: MyProject/src/main/scala/myproject/someFile.scala Running the jar…
user2827214
  • 1,191
  • 1
  • 13
  • 32
3
votes
1 answer

Trigger SBT assembly from other subproject

I have a root project containing 3 subprojects plus sbt config files and nothing else. 2 main subprojects are called server and backend, the other is called common and is dependency of both main projects. server is PlayFramework project. backed…
Magik6k
  • 115
  • 2
  • 8
3
votes
4 answers

sbt-assembly: Merge Errors - Deduplicate

I am getting these errors using sbt assembly. I am using Spark which seems to be at the root of this problem. val Spark = Seq( "org.apache.spark" %% "spark-core" % sparkVersion, "org.apache.spark" %% "spark-sql" % sparkVersion, …
BAR
  • 15,909
  • 27
  • 97
  • 185
3
votes
1 answer

Server access error while running sbt assembly

sparkuser@spark:~$ sbt assembly/ Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar Getting org.scala-sbt sbt 0.13.9 ... :: problems summary :: :::: WARNINGS module not found: org.scala-sbt#sbt;0.13.9 ==== local:…
Premraj
  • 7,802
  • 8
  • 45
  • 66
3
votes
4 answers

Increase memory in sbt-assembly

Is there a way to increase the memory during assembly (the plugin)? I notice that adding more memory to sbt through SBT_OPTS does't really help. I suspect that assembly is forking a separate JVM that doesn't inherit the JVM configurations from sbt. …
marios
  • 8,874
  • 3
  • 38
  • 62
3
votes
1 answer

SBT not adding unmanaged JARs

Hey I am trying to sbt compile a Scala project with 2 external .jar libraries as dependencies. I've added them in the /lib folder and I can see they are recognized by sbt when I run "show unmanagedClasspath" I see the 2 jars. However when I run "sbt…
Todor Markov
  • 151
  • 9
3
votes
1 answer

Performance penalty of sbt run

Is there any performance penalty when running a scala program with sbt run instead of using sbt assembly and creating an executable jar?
Ömer Faruk Gül
  • 965
  • 1
  • 10
  • 22
3
votes
1 answer

Spark RDD Class not Found

I am new to Spark and need help with the error: java.lang.NoClassDefFoundError: org/apache/spark/rdd/RDD$ I am creating a standalone Spark example in Scala. I ran sbt clean package and sbt assembly to package the scala spark code. Both completed…
vikrame
  • 485
  • 2
  • 12
3
votes
2 answers

parboiled2 and Spray cause conflicting cross-version suffixes

I'm trying to add parboiled2 as a dependency to my project, and follow the Calculator example but it conflicts with spray. My current build.sbt file includes: "io.spray" %% "spray-json" % "1.3.1" withSources() withJavadoc(), "io.spray" %%…
samthebest
  • 30,803
  • 25
  • 102
  • 142
3
votes
1 answer

How to "package" some modules to jars and others to wars in multi-module build with single task?

I use package task (from xsbt-web-plugin) to package a project to a war, and assembly task (from sbt-assembly) to package the project to a jar. I have a multi-module build and some modules are packaged into wars and some into jars. I'd like to set…
Cherry
  • 31,309
  • 66
  • 224
  • 364
3
votes
3 answers

Why is there no Main-Class attribute in generated manifest?

I have a build.sbt file that includes the assembly plugin. Up until the most recent build, the Main-Class attribute was being included in the assembled far jar, but all of a sudden, this is no longer the case. When I attempt to run the jar, I get…
PlexQ
  • 3,154
  • 2
  • 21
  • 26