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

FatJar from sbt-assembly throw java.lang.NoClassDefFoundError

I'm trying to execute a fat jar builded with sbt-assembly using spark and deepLearning4J, unfortunately during execution i'm confronted to the Exception in thread "main" java.lang.NoClassDefFoundError: error for many jars. I tried to add jars using…
KyBe
  • 842
  • 1
  • 14
  • 33
6
votes
0 answers

Assembly dependency as part of multi-module sbt build

I have a multi module sbt project, e.g.: lazy val core = (project in file("my-project-core")) .settings(name := "my-project-core") // more settings lazy val app = (project in file("my-project-app")) .settings(name := "my-project-app") // more…
Alexey
  • 318
  • 1
  • 2
  • 10
6
votes
1 answer

How to deduplicate beanutils dependencies with commons-beanutils?

I have a project with several dependencies, which ultimately lead to depending on the following (I got these from sbt-dependency-graph plugin): commons-beanutils:commons-beanutils:1.7.0 commons-beanutils:commons-beanutils-core:1.8.0 As a…
ale64bit
  • 6,232
  • 3
  • 24
  • 44
6
votes
2 answers

sbt-assembly include test classes

I follow sbt-assembly : including test classes from a config described in https://github.com/sbt/sbt-assembly that work ok doing assembly When I load sbt I get assembly.sbt:5: error: reference to jarName is ambiguous; it is imported twice in the…
gilcu2
  • 343
  • 3
  • 13
6
votes
1 answer

Command line arguments not working for sbt-assembly jars

I am trying to pass command line arguments to my JAR created with sbt-assembly. Neither of these -Dconfig.file=application.conf nor -Dconfig.trace=loads My exact command is java -jar googleScraper-assembly-0.0.1.jar -Dconfig.trace=loads…
Greg R
  • 1,670
  • 4
  • 26
  • 46
6
votes
1 answer

How to properly manage logback configrations in development and production using SBT & Scala?

I have a pretty standard Scalatra project using Logback for logging. Following the logback manual I have added a logback-test.xml for my development configuration (logs of debugs), whilst maintaining a production logback.xml. However, in development…
Matthew Rathbone
  • 8,144
  • 7
  • 49
  • 79
6
votes
2 answers

SBT Assembly - Deduplicate error & Exclude error

I am trying to build a JAR with dependencies using sbt-assembly. But I am running into this error again and again. I have tried multiple different things but I end up here. I am pretty new to SBT and wanted to get some help on this one. Here are the…
macha
  • 7,337
  • 19
  • 62
  • 84
6
votes
1 answer

Add sources to sbt assembly

I am using sbt assembly to create a library, for internal purposes. I am publishing this jar to a local artifactory installation, and it works nicely. However, I still haven't figured out how to add the source code to the assembly creation process,…
idanzalz
  • 1,740
  • 1
  • 11
  • 18
6
votes
1 answer

Using Maven's shade plugin from Scala and sbt

Due to some quirks in some dependencies, I'm having trouble with sbt-assembly, and have been told that people working with Java and have had good results with Maven's shade plugin. How can I use Maven's shade plugin for Scala / sbt?
SRobertJames
  • 8,210
  • 14
  • 60
  • 107
6
votes
4 answers

sbt-assembly: skip specific test

I would like to configure sbt-assembly to skip a specific test class. Is there any way to do this? If it helps, I tagged the test using ScalaTest @Network tag.
fedragon
  • 884
  • 9
  • 10
6
votes
1 answer

sbt-assembly installation

I'm trying to use sbt-assembly and am having trouble getting it installed. Verbatim from the readme I added the project/plugins.sbt with the dependency: addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.8.7") Then I added a build.sbt file…
Greg
  • 10,696
  • 22
  • 68
  • 98
6
votes
1 answer

Creating an Akka fat Jar

I need to create a Nutch plugin that communicate with some external applications using Akka. In order to do this, I need to package the plugin as a fat Jar - I am using sbt-assembly version 0.8.3. When I try to run the plugin, I get the exception…
Andrea
  • 20,253
  • 23
  • 114
  • 183
6
votes
1 answer

Including Hyperic Sigar library within jar while using sbt assembly for Scala project

I'm building a Scala project with sbt and creating a fat jar with the sbt-assembly plugin. I'm able to add unmanaged jars (such as the Sigar jar) by adding the following to build.sbt. unmanagedJars in Compile += …
Brandon Amos
  • 940
  • 1
  • 9
  • 19
5
votes
0 answers

Why won't sbt-assembly shade json4s using inLibrary?

Using sbt-assembly 0.14.6: addSbtPlugin("com.eed3si9n" %% "sbt-assembly" % "0.14.6") Creating an uber jar for a Spark app with sbt-assembly, including a couple dependencies to be shaded: libraryDependencies += "org.json4s" % "json4s-native_2.11" %…
Don Branson
  • 13,631
  • 10
  • 59
  • 101
5
votes
1 answer

Why does Spark application fail with "ClassNotFoundException: Failed to find data source: jdbc" as uber-jar with sbt assembly?

I'm trying to assemble a Spark application using sbt 1.0.4 with sbt-assembly 0.14.6. The Spark application works fine when launched in IntelliJ IDEA or spark-submit, but if I run the assembled uber-jar with the command line (cmd in Windows 10): java…
korbee82
  • 107
  • 1
  • 6