sbt-assembly installation
Asked Answered
L

1

6

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)

Lowbred answered 2/4, 2013 at 15:24 Comment(1)
I haven't tried what you're doing - do either of these links help: xsbt plugins description scala-sbt plugins docDextrorotation
J
4

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.

Jacquijacquie answered 2/4, 2013 at 16:25 Comment(2)
The app I am trying to convert to fat jar already uses Build derivative class, I added the options from your sample and got strange error in sbt, never seen anything like this: error] References to undefined settings: [error] [error] {.}/compile:this-project-ref from {.}/compile:unmanaged-classpath [error] [error] {.}/runtime:this-project-ref from {.}/runtime:internal-dependency-classpath [error] [error] {.}/compile:this-project-ref from {.}/compile:internal-dependency-classpath ..... and much more lines like this. I am quite new to Scala, any ideas what I am doing wrong?Espy
@kirhgoff: I ran into the same issue. How did you fix it? ThanksPretrice

© 2022 - 2024 — McMap. All rights reserved.