Questions tagged [sbt-assembly]

0

votes
0

answer
3

Views

sbt assembly error:deduplicate: different file contents found in io.netty.versions.properties

I have added the following jar to build.sbt file as follows: "com.amazonaws" % "aws-java-sdk" % "1.11.492" Post this ,during merge , I am getting the following error : [error] 1 error was encountered during merge java.lang.RuntimeException: deduplicate: different file contents found in the followi...
Kishori
1

votes
1

answer
1k

Views

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 same scope by import sbtassembly.AssemblyKeys._ and i...
gilcu2
1

votes
2

answer
336

Views

OpenIE 4.2 - Can't generate standalone .jar using sbt

I'm trying to generate a standalone .jar of the OpenIE tool from Washington's Knowitall project, as described in this Github page, using the command: sbt clean compile assembly but it stops after a while, without giving any error. I can execute sbt clean compile, but sbt assembly does not work. The...
smothP
2

votes
2

answer
149

Views

Scala: Sbt can run project, but calling the jar results in ClassNotFoundError

I have a project that will compile/package/run with SBT, but when I call the jar from the command line with Scala, I get a 'java.lang.ClassNotFoundException'. build.sbt: name := "coloring" version := "0.1" scalaVersion := "2.12.5" libraryDependencies ++= Seq("org.scala-graph" %% "graph-core" % "1.1...
Logister
3

votes
1

answer
3.4k

Views

Proper way to make a Spark Fat Jar using SBT

I need a Fat Jar with Spark because I'm creating a custom node for Knime. Basically it's a self-contained jar executed inside Knime and I assume a Fat Jar is the only way to spawn a local Spark Job. Eventually we will go on submitting a job to a remote cluster but for now I need it to spawn this way...
Chobeat
3

votes
2

answer
2k

Views

Increase memory in sbt-assembly

Is there a way to increase the memory during assembly (the plugin)? I notice that adding more memory to sbt through SBT_OPTS does't really help. I suspect that assembly is forking a separate JVM that doesn't inherit the JVM configurations from sbt. Here is the error: java.util.concurrent.Execution...
marios
18

votes
7

answer
5.9k

Views

How to work efficiently with SBT, Spark and “provided” dependencies?

I'm building an Apache Spark application in Scala and I'm using SBT to build it. Here is the thing: when I'm developing under IntelliJ IDEA, I want Spark dependencies to be included in the classpath (I'm launching a regular application with a main class) when I package the application (thanks to the...
Alexis Seigneurin
5

votes
1

answer
3.6k

Views

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 while using the xsbt-web-plugin to run a container...
Matthew Rathbone
6

votes
1

answer
1.6k

Views

How to build jar from play framework 2.5.x

I try to build jar from clean project with sbt-assembly how describes in docs: addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.11.2") import AssemblyKeys._ assemblySettings mainClass in assembly := Some("play.core.server.ProdServerStart") fullClasspath in assembly += Attributed.blank(PlayKeys.pla...
zella
6

votes
2

answer
3.3k

Views

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 merge java.lang.RuntimeException: deduplicate: differ...
Abommination
4

votes
1

answer
279

Views

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 deployed but I'm not sure how to create the two separat...
Petesta
2

votes
2

answer
1.1k

Views

Copying resources using SBT

I have a Scala project, using SBT. I have a directory html inside my project which needs to be copied when the project is being run with sbt run, or when I package it into a Jar using sbt-assembly. Either way, I'll expect to have the html directory copied to target/scala-2.11/classes/html. I have tr...
bicpence
6

votes
1

answer
1.9k

Views

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 -Dconfig.resource=application.conf This is my build.sbt lazy va...
Greg R
1

votes
2

answer
139

Views

Cannot compile ScalaCheck with specs2 since upgrading

I used to use: "org.scalacheck" %% "scalacheck" % "1.10.1" % "test" withSources() withJavadoc(), "org.specs2" %% "specs2" % "1.14" % "test" withSources() withJavadoc(), Which worked fine, then I upgraded my dependencies to what I think are the latest: "org.scalacheck" %% "scalacheck" % "1.12.1" % "t...
samthebest
2

votes
1

answer
9.1k

Views

SBT Assembly not working (not a valid command)

I have tried a lot of solutions that I could find related to this topic. Above all of them, sbt assembly command not found looked the most related, but that did not solve it. I am using sbt 13.7 build.sbt: lazy val commonSettings = Seq( organization := "com.example", version := "0.1.0" ) lazy val...
lbollar
5

votes
3

answer
3.2k

Views

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
2

votes
2

answer
454

Views

Problems finding Main class in sub-directories w/SBT assembly

I am attempting to use SBT assembly(0.14.0) to create a fat jar of my Scala project. My project structure is as follows: >top > build.sbt > api > src > main > scala > name > Boot.scala > other directories I am trying to set Boot as the main method to be run in the jar. I have tried using: baseDir...
rushimg
22

votes
1

answer
2.4k

Views

Multiple executable jar files with different external dependencies from a single project with sbt-assembly

I have a single scala project built with sbt using a build.scala file. I can use sbt-assembly to generate a single executable jar file from this project without problem. Now I want to generate multiple executable jar files, where each file includes a common set of internal and external base dependen...
Oscar Täckström
5

votes
1

answer
1.2k

Views

Should sbt-assembly perform a “maven-shade-plugin”-like relocation of classes?

The description of sbt-assembly merge strategy called rename sounded like it might permit something similar to the shading operation of the maven-shade-plugin which will relocate classes and their references to permit the management of incompatible versions of libraries. Would it be appropriate for...
Traveler
2

votes
2

answer
828

Views

sbt assembly for multiproject build

I have a multiproject sbt build file like this import sbt._ import Keys._...
questionersam
12

votes
2

answer
2.7k

Views

sbt-assembly: how to link dependancies 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 dependancies. Therefore, i could simply recompile and repack o...
Karolis
2

votes
1

answer
536

Views

sbt auto-plugins - disable them but for one sub project

Switching sbt-assembly from 0.11.2 to 0.13.0, I suddenly find myself in a situation where calling sbt assembly does not just invoke the task in the sub-project that explicitly added assemblySettings, but it tries to run it for each and every sub project. So, if I have lazy val root = project(...).ag...
0__
1

votes
3

answer
4.2k

Views

spark sbt compile error libraryDependencies

1.2.0-bin-hadoop2.4 and my Scala version is 2.11.7. I am getting an error so I can't use sbt. ~/sparksample$ sbt Starting sbt: invoke with -help for other options [info] Set current project to Spark Sample (in build file:/home/beyhan/sparksample/) > sbt compile [info] Updating {file:/home/beyhan/spa...
Beyhan Gül
2

votes
2

answer
614

Views

SBT - Assembly (Scala - Neo4j), How to deal with this deduplicate issue?

just trying to generate a Jar with sbt-assembly and I'm still trapped with this: [error] (*:assembly) deduplicate: different file contents found in the following: [error] /Users/fsalvador/.ivy2/cache/org.neo4j/neo4j-kernel/jars/neo4j-kernel-1.9.4.jar:META-INF/CHANGES.txt [error] /Users/fsalvador/.iv...
Francisco Gutiérrez
4

votes
2

answer
653

Views

SBT: How to publish both the aggregate project and all modules on Sonatype?

I have a SBT project which I was publishing to Sonatype with no issue and I converted it to a multi-module SBT project. Now I want to: publish the jar/javadoc/sources/pom file containing all the aggregated submodules to Sonatype (meaning that they should be signed with the sbt-pgp plugin) publish ea...
Eric
3

votes
1

answer
604

Views

SBT assembly issue: found String required sbt.Task[String] with <<= syntax

I'm a long-term and happy user of sbt-assembly, but I've encountered a problem when using SBT 0.13.0 & sbt-assembly 0.10.1 on a new project. I have previously used code like this: import sbtassembly.Plugin._ import AssemblyKeys._ lazy val sbtAssemblySettings = assemblySettings ++ Seq( // Slightly cl...
Alex Dean
2

votes
1

answer
3.4k

Views

All sbt plugins not found

when I use the sbt command in my project $sbt All my plugins are not found. Here is the content of my project/plugins.sbt addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.10.1") addSbtPlugin("org.xerial.sbt" % "sbt-pack" % "0.3.1") addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.2.1") addS...
6

votes
1

answer
95

Views

KryoException: Unable to find class with spark structured streaming

1-The Problem I have a Spark program that make use of Kryo but not as part of the Spark Mechanics. More specifically I am using Spark Structured Streaming connected to Kafka. I read binary values coming from Kafka and decode it on my own. I am faced with an Exception while attempting to deserialize...
MaatDeamon
3

votes
3

answer
2.3k

Views

Why is there no Main-Class attribute in generated manifest?

I have a build.sbt file that includes the assembly plugin. Up until the most recent build, the Main-Class attribute was being included in the assembled far jar, but all of a sudden, this is no longer the case. When I attempt to run the jar, I get the inimitable: no main manifest attribute, in ./tar...
PlexQ
3

votes
1

answer
279

Views

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, so when I import it in intellij it will also be ava...
idanzalz
3

votes
2

answer
1.2k

Views

parboiled2 and Spray cause conflicting cross-version suffixes

I'm trying to add parboiled2 as a dependency to my project, and follow the Calculator example but it conflicts with spray. My current build.sbt file includes: "io.spray" %% "spray-json" % "1.3.1" withSources() withJavadoc(), "io.spray" %% "spray-can" % sprayV withSources() withJavadoc(), "io.spray"...
samthebest
4

votes
4

answer
2.3k

Views

unresolved dependency org.apache.spark#spark-network-common_2.10 while building spark 1.2.0

With sbt version 0.13.6, [email protected]_1ad6bd90-94b5-0132-e2d9-5692d74b909b_7f496a9f21bf:~/bin/spark$ sbt/sbt --version Using /usr/lib/jvm/java-7-openjdk-amd64/ as default JAVA_HOME. Note, this will be overridden by -java-home if it is set. sbt launcher version 0.13.6 Spark 1.2.0 is failing with...
prayagupd
3

votes
4

answer
1.9k

Views

sbt-assembly: Merge Errors - Deduplicate

I am getting these errors using sbt assembly. I am using Spark which seems to be at the root of this problem. val Spark = Seq( "org.apache.spark" %% "spark-core" % sparkVersion, "org.apache.spark" %% "spark-sql" % sparkVersion, "org.apache.spark" %% "spark-streaming" % sparkVersion ) Error: [error]...
BAR
3

votes
1

answer
1.3k

Views

evict specific transitive dependency in sbt

Suppose a small test project (sbt 0.13.8, full project as gist): name := "test" organization := "org.example" version := "0.1.0-SNAPSHOT" scalaVersion := "2.11.6" libraryDependencies ++= Seq ( "com.lowagie" % "itext" % "4.2.1", "com.github.wookietreiber" %% "scala-chart" % "0...
3

votes
5

answer
3.7k

Views

java.lang.NoSuchMethodError: akka.actor.ActorCell.addFunctionRef

I am trying to setup a simple akka-http 2.4.2 project to test it out, but I am failing to do so. My built.sbt: import NativePackagerHelper._ lazy val akkaVersion = "2.4.2" lazy val root = (project in file(".")). settings( name := "akkTest", version := "0.1", scalaVersion := "2.11.7") libraryDependen...
Saif
4

votes
1

answer
780

Views

How to deduplicate beanutils dependencies with sbt-assembly?

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 consequence, when I try to build a fat JAR using sbt-assembly...
ale64bit
12

votes
2

answer
8k

Views

SBT assembly jar exclusion

Im using spark (in java API) and require a single jar that can be pushed to the cluster, however the jar itself should not include spark. The app that deploys the jobs of course should include spark. I would like: sbt run - everything should be compiled and excuted sbt smallAssembly - create a jar w...
user2843110
3

votes
1

answer
215

Views

Trigger SBT assembly from other subproject

I have a root project containing 3 subprojects plus sbt config files and nothing else. 2 main subprojects are called server and backend, the other is called common and is dependency of both main projects. server is PlayFramework project. backed project is configured to generate assembly jar into res...
Magik6k
3

votes
1

answer
464

Views

Not able to use assembly plugin

I am using scala version 2.11.7 I want to build a jar file from sbt which can be executed on a machine where scala is not installed. I guess i have to package the scala-library.jar in my jar file. Based on some googling, I think I will have to use the assembly plugin of sbt I added a new file called...
Knows Not Much
7

votes
1

answer
1.5k

Views

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 Config. After attempting many things, my solution was to defer...
Yuval Itzchakov

View additional questions