0

On running "sbt debian:packageBin" command, the fakeroot program fails since it tries to look for the fat jar (assembly) in /target dir instead of /target/scala-2.11/ directory.

So, is there a setting to specify the source directory for debian packaging using sbt Debian plugin?

SBT version: 0.13.11 Added below in plugins.sbt: addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.4")

In build.sbt, have added below: lazy val root = (project in file(".")). enablePlugins(DebianPlugin)

schatter
  • 151
  • 1
  • 11
  • Thanks for your question. Could you add a bit more information: sbt, assembly and native-packager version, `build.sbt` – Muki May 22 '18 at 07:54
  • Edited the question, updated with the versions for sbt, native-packager and build.sbt snippet. – schatter May 22 '18 at 09:45

1 Answers1

1

I think you are mixing a few things up here. SBT native-packager and sbt-assembly solve both the same problem ( creating something you can deploy ), but in different ways.

how to fix your issue with native-packager

Check out the installation section in the reader, which states:

enablePlugins(JavaAppPackacking)

This configures your build to create JVM application packages. You can now run sbt Debian:packageBin.

sbt assembly

You'll have to create the debian package yourself. Assembly only generates a fat jar.

Cheers, Muki

Muki
  • 3,513
  • 3
  • 27
  • 50