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
0
votes
0 answers

SBT package sources and binaries in a single jar

I have found this nowhere on SO or in the documentation, but I would like to create a single jar containing both the binaries and the source code. My project is a mix of Scala and Java, if it adds anything to the question. I've found this Github…
Dici
  • 25,226
  • 7
  • 41
  • 82
0
votes
2 answers

Unable to build Spark+cassandra using sbt-assembly

I am trying to build a simple project with Spark+Cassandra for a SQL-analytics demo. I need to use Cassandra v2.0.14 (can't upgrade it for now). I am unable to find the correct version of Spark and Spark-cassandra-connector. I referred to Datastax's…
0
votes
2 answers

Conflicting files in uber-jar creation in SBT using sbt-assembly

I am trying to compile and package a fat jar using SBT and I keep running into the following error. I have tried everything from using library dependency exclude and merging. [trace] Stack trace suppressed: run last *:assembly for the full…
Ego
  • 585
  • 1
  • 8
  • 18
0
votes
1 answer

Translate ant script that creates a jar file into sbt

I have an ant file called jarPLCExample.xml that takes some class files and produces a jar file. What would the tag section of this file look like in sbt?
Chris Murphy
  • 6,411
  • 1
  • 24
  • 42
0
votes
3 answers

How do I publish the artifact generated from assemblyPackageDependency

So I use sbt-assembly and I use the assembly assemblyPackageDependency task with my build which generates a project-assembly-1.0.0-deps.jar and no matter what I do I cannot get it to publish this jar file. How do I do this please? I've added this in…
Josh
  • 145
  • 1
  • 10
0
votes
0 answers

sbt assembly can't find type in the same package

I have the code shown here http://scastie.org/10156 report the error when running sbt 0.13.8 plugin assembly I get [error] /home/xx/workspace/sync-hsae-middleware/src/test/scala/com/example/MyServiceSpec.scala:8: not found: type MyService [error]…
Andy
  • 55
  • 1
  • 12
0
votes
2 answers

updateStateByKey, noClassDefFoundError

I have problem with using updateStateByKey() function. I have following, simple code (written base on book: "Learning Spark - Lighting Fast Data Analysis"): object hello { def updateStateFunction(newValues: Seq[Int], runningCount: Option[Int]):…
awenclaw
  • 373
  • 5
  • 20
0
votes
1 answer

How to add the Breeze which is build by myself to Apache Spark?

I added some methods to the Breeze library and I can see those methods through IDE. And I was trying to add the Breeze library which is build by myself to my project which is based on Apache Spark. However, when I package my project by command "sbt…
Mark
  • 369
  • 1
  • 3
  • 5
0
votes
1 answer

Scoping unmanaged dependencies library sbt-assembly

I'm trying to scope an unmanaged dependencies libararies from my main project. Here is the scenario I have an unamanaged dependency in my lib folder called coinprism-api-assembly-1.2.jar which has the following Build.scala file: 1 import sbt._ 2…
Chris Stewart
  • 1,641
  • 2
  • 28
  • 60
0
votes
1 answer

Sbt assembly is not including all library dependencies

I am not able to produce fat jar with all dependant libraries but without scala libs. I have next config of build.sbt file: import AssemblyKeys._ assemblySettings jarName in assembly := "test-project.jar" assemblyOption in assembly ~= {…
baju
  • 511
  • 5
  • 19
0
votes
1 answer

sbt assembly failing due to conflicting file

I am trying to make a fat jar by running sbt assembly for my project. I am getting the following error : [error] (root/*:assembly) deduplicate: different file contents found in the following: [error]…
joanOfArc
  • 467
  • 1
  • 6
  • 16
0
votes
1 answer

Automatically add source files in a scala jar

I am trying to add source files to a scala jar. The jar is generated nightly with Jenkins, using sbt to compile and sbt-assembly to make the jar. Any idea how I could make Jenkins automatically add the source files in the jar ?
JayBe
  • 1
  • 1
0
votes
0 answers

How to set the Main class to run using sbt-assembly plugin for SBT multi-projects

Here's my project structure on the filesystem: rootProj +- masterProj +- proj1 ... +- projN I'm trying to use sbt-assembly plugin to create a fat jar. I want to set the main class as masterProj/core/Main.scala in order to get a runnable…
Max
  • 2,508
  • 3
  • 26
  • 44
0
votes
2 answers

How to access config files when running sbt-assembly'ed application?

I am currently using sbt-assembly to make my Scala project into a jar. In this program I have multiple config files: \root aws.properties \src \resource application.conf There is no problem when program running…
Chris Kong
  • 389
  • 1
  • 4
  • 18
0
votes
1 answer

sbt for web app with command line code

I'd like sbt to generate two packages: A WAR file, for the web app A JAR file, which has command line and batch code The two packages share a lot of similar code (the business logic) and dependencies, but of course the Servlet aspects are only in…
SRobertJames
  • 8,210
  • 14
  • 60
  • 107
1 2 3
35
36