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
12
votes
2 answers

sbt-assembly: how to link dependencies jar with main jar?

I am coding in scala and using SBT with sbt-assembly plugin. My project has a lot of external libraries, and therefore sbt-assembly takes a long time to pack the JAR file. I would like to have a separate jar files for my code and for the…
Karolis
  • 1,558
  • 1
  • 14
  • 23
11
votes
3 answers

Why Maven assembly works when SBT assembly find conflicts

The title could also be: What are the differences between Maven and SBT assembly plugins. I have found this to be an issue, while migrating a project from Maven to SBT. To describe the problem I have created an example project with dependencies…
Atais
  • 10,857
  • 6
  • 71
  • 111
11
votes
1 answer

Two libraries bring in different version of the same dependency. How to import them both?

I have the following situation: + DentistApp L TreatsLibrary L IceCream 1.0 L CavityCausesLib L IceCream 2.0 Now I get a VerifyError because TreatsLibrary is using IceCream.giveToKidAfterDrill() which was removed in version 2.0…
gurghet
  • 7,591
  • 4
  • 36
  • 63
11
votes
2 answers

Scala SBT Assembly cannot merge due to de-duplication error in StaticLoggerBinder.class

My problem is I can no longer use the sbt-assembly plugin because some kind of dependency merge problem creeped in, between a couple people working on this project. The problem when I run 'sbt assembly' : [error] 3 errors were encountered during…
Abommination
  • 121
  • 1
  • 3
10
votes
1 answer

Including a Spark Package JAR file in a SBT generated fat JAR

The spark-daria project is uploaded to Spark Packages and I'm accessing spark-daria code in another SBT project with the sbt-spark-package plugin. I can include spark-daria in the fat JAR file generated by sbt assembly with the following code in the…
Powers
  • 18,150
  • 10
  • 103
  • 108
10
votes
2 answers

How to exclude jar in final sbt assembly plugin

I need to exclude spark and test dependencies from my final assembly jar. I tried to use provider but it was not working. libraryDependencies ++= Seq("org.apache.spark" % "spark-core_2.11" % "2.0.1" % "provided") and execute sbt assembly. Please…
John
  • 1,531
  • 6
  • 18
  • 30
10
votes
1 answer

Shading over third party classes

I'm currently facing a problem with deploying an uber-jar to a Spark Streaming application, where there are congruent JARs with different versions which are causing spark to throw run-time exceptions. The library in question is TypeSafe…
Yuval Itzchakov
  • 146,575
  • 32
  • 257
  • 321
10
votes
1 answer

How to include test classes and test dependencies in sbt asssembly

I need to package my test classes, resources and also test dependencies with sbt assembly. This question sbt-assembly : including test classes didn't help - test:assembly still didn't generate a jar with any of the desired classes included. Note…
Bozho
  • 588,226
  • 146
  • 1,060
  • 1,140
9
votes
2 answers

Adding vendor information to MANIFEST.MF using sbt-assembly

I'm using sbt-assembly to create a runnable jar, but my application crashes because jai imageio loads the vendor name from the MANIFEST.MF file. If I manually edit the META-INF/MANIFEST.MF file from: Manifest-Version: 1.0 Main-Class:…
Josh Marcus
  • 1,749
  • 18
  • 30
9
votes
3 answers

installing sbt-assembly with sbt 0.11.2

I am trying to install sbt-assembly by following the instructions in order to make a stand-alone jar that can run on a computer without scala installed. So far these are the steps I've taken. I created a plugins.sbt file: $ cat…
dsg
  • 12,924
  • 21
  • 67
  • 111
9
votes
4 answers

sbt assembly cannot create jar getting java.lang.UnsupportedOperationException

I am using scala 1.12.10 akka 2.6.3 addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1") addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.1.0") However when executing sbt assembly I am getting: java.lang.UnsupportedOperationException: The Security…
igx
  • 4,101
  • 11
  • 43
  • 88
9
votes
1 answer

dynamically changing library dependencies in sbt build file from provided etc

We use spark a lot for our scala applications. If I'm testing locally my library dependencies are: libraryDependencies += "org.apache.spark" % "spark-core_2.10" % "1.6.1", libraryDependencies += "org.apache.spark" % "spark-sql_2.10" % "1.6.1"…
null
  • 3,469
  • 7
  • 41
  • 90
9
votes
1 answer

Setting up sbt to publish to artifactory based on git branch

I would like to set up an sbt project so that it can publish to the proper artifactory repository based on the (git) branch. The solution proposed for this question suggests to hardcode the repository in the build.sbt file. However, I would like the…
mitchus
  • 4,677
  • 3
  • 35
  • 70
9
votes
5 answers

libraryDependencies for com.eed3si9n#sbt-assembly;0.13.0: not found

I am building a sbt plugin and want to reference assembly task in the sbt-assembly plugin ( to be dependent on my task) to do this i need to reference it as a library ( as opposed to a plugin), and somehow sbt is not able to resolve it as a…
np-hard
  • 5,725
  • 6
  • 52
  • 76
9
votes
3 answers

Standalone deployment of Scalatra servlet

I implemented a Scalatra servlet and now want to create an executable jar, just like described in this tutorial: http://www.scalatra.org/2.2/guides/deployment/standalone.html I use IntelliJ IDEA with the Scala plugin for development and sbt to build…
sbaltes
  • 489
  • 1
  • 9
  • 17
1 2
3
35 36