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
4
votes
1 answer

SBT assembly : Can you create an assembly jar of just one sub project in Multi project build?

I want to create a fat assembly jar for a sub project without having to generate jars for other projects or the whole global Project. How can I do that? From https://github.com/sbt/sbt-assembly I see that I can add Main Class or name of the jars for…
amateur-coder
  • 113
  • 1
  • 9
4
votes
0 answers

SBT Assembly publish fat jar to Nexus

I'm trying to push a fat jar generated by sbt-publish to a private Nexus repository. So, in my Nexus, I've created two repositories, one hosting snapshots version and one hosting releases artifacts. Here is the important code in my…
Mael Razavet
  • 202
  • 2
  • 11
4
votes
2 answers

Multiple main classes with SBT assembly

I'm looking to create jars for AWS Lambda to run job tasks. Currently my build.sbt file looks something like this: lazy val commonSettings = Seq(...) lazy val core = project .settings(commonSettings: _*) lazy val job = project …
Andreas Jarbol
  • 745
  • 2
  • 11
  • 27
4
votes
1 answer

Not found : Type Build (Unresolved 'Build')

I'm getting the following set of errors, which I belive is caused by the sbt-assembly plugin that I is used. In fact the object declaration of ; object Build extends **Build** { (here Build is unresolved). The error is as follows, Error:Error…
TheShark
  • 420
  • 3
  • 6
  • 17
4
votes
1 answer

sbt-assembly shading error with shapeless in ubuntu

I’m having a weird issue with sbt-assembly if anyone could help When trying to create fat jar to deploy to Spark with shading applied to shapeless libraries, I am seeing some classes not being renamed when ran in an Ubuntu machine while everything…
kaychaks
  • 1,715
  • 3
  • 21
  • 28
4
votes
1 answer

SBT: How to Dockerize a fat jar?

I'm building a Docker image with a fat jar. I use the sbt-assembly plugin to build the jar, and the sbt-native-packager to build the Docker image. I'm not very familiar with SBT and am running into the following issues. I'd like to declare a…
Abhijit Sarkar
  • 21,927
  • 20
  • 110
  • 219
4
votes
0 answers

Spring-boot plugin for sbt

My goal is to package an executable spring-boot jar - a web app with tomcat embedded. I would like to use sbt but I don't find a straight forward way to do this. There are maven and gradle spring-boot plugins, but I don't see anything even close in…
4
votes
1 answer

SBT Assembly Plugin on signed jar files

We had a scala application which was being built by command sbt dist this uses the native packager to create a zip file and dumps all the jar files imported by SBT into the zip file. This worked for us but after some some we realized that some jar…
Knows Not Much
  • 30,395
  • 60
  • 197
  • 373
4
votes
2 answers

sbt-assembly: Generate a minimal JAR file

I've been using sbt-assembly to generate standalone JAR file for my scala project. However, I would like to reduce the size of my JAR file (its currently around 150MB and there's defintely room for improvement there). I used the following command to…
jithinpt
  • 1,204
  • 2
  • 16
  • 33
4
votes
1 answer

How do I use the sbt-native-packager with multiple projects

I am in the process of merging several large scala projects into one. Currently they share code using cut and paste (not very much code) and I am making it so that there is a common utilities jar. Most of these projects are deployed on the amazon…
Stave Escura
  • 2,058
  • 1
  • 19
  • 24
4
votes
0 answers

How to make two build SBT-ASSEMBLY, using two different config file, within the same project

I'm working on a scala project and i'm trying to make two kind of build (test and prod). I have two application.conf files ( test and prod) and I wonder how two different SBT assembly tasks that use these files. This is my application.conf file…
Flake
  • 83
  • 7
4
votes
1 answer

Running multiple applications with sbt

I have my directory structure set up as such. src/main/scala/main/Main.scala src/main/scala/scripts/MainScript.scala The script is a background job that will be running. I've used sbt-assembly before to package up the main file into a jar to be…
Petesta
  • 1,623
  • 3
  • 19
  • 29
4
votes
1 answer

Java OutOfMemoryError on sbt assembly

I tried to launch sbt assembly with some library dependencies. When I tried to add "edu.stanford.nlp" % "stanford-corenlp" % "3.5.1", "edu.stanford.nlp" % "stanford-corenlp" % "3.5.1" classifier "models", It closes with an error…
Aurora
  • 41
  • 1
  • 3
4
votes
2 answers

sbt-assembly: How do I exclude the configuration files in src/main/resources

I am using sbtassembly from https://github.com/sbt/sbt-assembly to package my project. I'm wondering is there anyway to exclude the resource files?
Fihop
  • 3,127
  • 9
  • 42
  • 65
4
votes
1 answer

Spark job SBT Assembly merge conflict when including Spark Streaming Kinesis ASL library

I started making a spark streaming job and got a producer up for kinesis endpoint. After getting that working I started making a consumer but I ran into problems with building it. I am using the assembly plugin to create a single jar that contains…
Adam Ritter
  • 989
  • 1
  • 9
  • 19