0
votes

I try to install sbt-assembly to create jar file with all my scala files and their dependencies.

I already installed sbt (the command "sbt sbt-version" in shell gives the following version: 0.13.9). I downloaded sbt-assembly from the Github repository (https://github.com/sbt/sbt-assembly) and extracted in a folder.

I followed the instruction in the README on Github (creating a /project/assembly.sbt file with "addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.0")" inside). I also created a /project/build.sbt file, following this tutorial (http://raintomorrow.cc/post/50811498259/how-to-package-a-scala-project-into-an).

Anyway, when I write the command "sbt run" or "sbt assembly" in the shell (I am located in the folder where the sbt-assembly files are), I always get two errors message saying that the object "import AssemblyKeys._" and the value "assemblySettings" (from the file /project/build.sbt I just created) are not found.

If someone knows what I am doing wrong, it would be very helpful.

Thanks !

1

1 Answers

0
votes

build.sbt should be in the root of your project, not in project/build.sbt (but files adding SBT plugins should be in project). You should also be running sbt ... commands from the root. Also, AssemblyKeys and assemblySettings should be removed, they are only used with older sbt-assembly versions.