0
votes

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)

1
Thanks for your question. Could you add a bit more information: sbt, assembly and native-packager version, build.sbtMuki
Edited the question, updated with the versions for sbt, native-packager and build.sbt snippet.schatter

1 Answers

1
votes

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