Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 containing exactly what the readme said:

import AssemblyKeys._ // put this at the top of the file

assemblySettings

I get this error when launching sbt:

[error] /Users/me/git/stest/project/Build.scala:29: not found: value assemblySettings [error] .settings(assemblySettings: _*) [error] ^ [error] one error found [error] (compile:compile) Compilation failed

I went back and tried an alternate I saw in another stackoverflow post:

seq(assemblySettings:_*)

Same problem. Any ideas? (Scala 2.10.0)

like image 841
Greg Avatar asked Apr 02 '13 15:04

Greg


People also ask

What is sbt assembly?

The sbt-assembly plugin is an SBT plugin for building a single independent fat JAR file with all dependencies included. This is inspired by the popular Maven assembly plugin, which is used to build fat JARs in Maven.

Is Scala installed with sbt?

sbt will download Scala for you. If you install sbt-extras (basically just a script) you don't even need to download sbt : it will automatically download the sbt launcher you need. Very handy since you just need to specify sbt. version in your build.

How can I tell if sbt is installed on Windows?

Run the SBT console and then type sbtVersion to check the SBT version, and scalaVersion for the Scala runtime version.


1 Answers

The author of the plugin here. You said you put exactly what build.sbt says, but the error is coming from build.scala. *.sbt file automatically imports several things, so you have to manually import them for build.scala.

For full configuration, see https://github.com/eed3si9n/sbt-assembly-full-config-sample/blob/master/project/builds.scala.

like image 81
Eugene Yokota Avatar answered Nov 12 '22 03:11

Eugene Yokota