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 assembly - Multiple jars with different Main classes from single project

I have a project with this structure: --resources --src | |-- mypackage.main | |-- MainClassOne.scala |-- MainClassTwo.scala |-- mypackage.utils | …
irrelevantUser
  • 1,172
  • 18
  • 35
3
votes
1 answer

Add git commit id in fat jar manifest using sbt

I am using sbt-assembly plugin to build a fat Jar for my scala project. Is there a way I can include git commit id in the jar manifest, something similar to what git-commit-id-plugin does for maven. Thanks
Abdul Rahman
  • 1,294
  • 22
  • 41
3
votes
1 answer

sbt-assembly exclude dependsOn dependencies

I have a project with a few subprojects, and many dependencies, One subproject will have most development (app) and generating the full jar takes time. So I want to split the fat-jar generation into 2 jars: deps a fat-jar app a lean-jar I was…
dr jerry
  • 9,768
  • 24
  • 79
  • 122
3
votes
0 answers

Deduplicate: different file contents sbt-assembly

I have a multi-project built with sbt, and I would like to build an executable jar using sbt-assembly plugin. However, I get an error while building the jar file: [error] deduplicate: different file contents found in the following: [error]…
Cassie
  • 2,941
  • 8
  • 44
  • 92
3
votes
1 answer

Multi-project sbt-assembly issues

I am trying to create a project with two main classes - SparkConsumer and KafkaProducer. For that, I have introduced multi-project structure in sbt file. Consumer and producer modules are for separate projects, core project holds utils which are…
Cassie
  • 2,941
  • 8
  • 44
  • 92
3
votes
1 answer

Repository for publishing is not specified in multi-modules project with docker sbt

I am trying to deploy a multi-modules project using an sbt-docker plugin. I want to create separate containers for api and app modules and to skip other modules. However, every time I run docker: publish I get such an error: [error]…
Cassie
  • 339
  • 1
  • 3
  • 13
3
votes
1 answer

Preserving Manifest.mf when building via sbt assembly

When I build my project using sbt assembly, I get java.util.zip.ZipException: duplicate entry: META-INF/MANIFEST.MF. The solution that google recommends, is to use MergeStrategy.discard. That works in getting the project to build - but it crashes…
Ali
  • 261,656
  • 265
  • 575
  • 769
3
votes
2 answers

How to make a SBT task depend on a module defined in the same SBT project?

I have module A and module B in a multi-module SBT project. I want to write a resource generator task for module B that invokes code from module A. One way to do this is to pull all the code from module A under project/ but that is unfeasible as…
pathikrit
  • 32,469
  • 37
  • 142
  • 221
3
votes
2 answers

Error with sbt-assembly and Play Framework

Trying to build a fat jar of a play (2.6.6) + scala.js application, getting [error] (play/*:assembly) deduplicate: different file contents found in the following: [error]…
user4063815
3
votes
3 answers

Spring-Boot: How can I build a runnable jar with SBT?

How can I build a runnable jar with SBT? Perhaps Spring-Boot isn't suitable for SBT built applications? Any suggestions on this? I tried using sbt-assembly but it fails when I try to run it. Note that sbt run works mainClass in assembly :=…
aclowkay
  • 3,577
  • 5
  • 35
  • 66
3
votes
1 answer

How to run Spark application assembled with Spark 2.1 on cluster with Spark 1.6?

I've been told that I could build a Spark application with one version of Spark and, as long as I use sbt assembly to build that, than I can run it with spark-submit on any spark cluster. So, I've build my simple application with Spark 2.1.1. You…
3
votes
0 answers

How to bundle integration tests into jar so they can be run with scalatest runner

I can run integration tests in sbt using it:test. I would like to assemble my integrations tests into a fat jar so other users can run them with the ScalaTest runner org.scalatest.tools.Runner and not have to learn sbt. I am unable to get the…
Christopher Helck
  • 1,130
  • 2
  • 8
  • 23
3
votes
1 answer

com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'play.application'

I am using sbt assembly plugin to build a binary distribution of my play application. but every time I want to start the appp I get the following error com.typesafe.config.ConfigException$Missing: No configuration setting found for key…
gvalenncia
  • 261
  • 3
  • 9
3
votes
1 answer

Creating multiple artifacts with SBT

I've seen near-variants of this question, but not with answers that have all the useful information. Using sbt 0.13.13 and sbt-assembly 0.14.3, and a multi-project build.sbt based on http://www.scala-sbt.org/0.13/docs/Multi-Project.html like…
Don Branson
  • 13,631
  • 10
  • 59
  • 101
3
votes
2 answers

Spark fat jar to run multiple versions on YARN

I have an older version of Spark setup with YARN that I don't want to wipe out but still want to use a newer version. I found a couple posts referring to how a fat jar can be used for this. Many SO posts point to either maven(officially supported)…
noobman
  • 75
  • 1
  • 7