5
votes

I am using the SBT native packager plugin (https://github.com/sbt/sbt-native-packager) for a project composed of multiple modules.

In my SBT settings I have:

lazy val settings = packageArchetype.java_application ++ Seq(
  ...
  // Java is required to install this application
  debianPackageDependencies in Debian ++= Seq("java2-runtime"),

  // Include the module JAR in the ZIP file
  mappings in Universal <+= (packageBin in Compile) map { jar =>
    jar -> ("lib/" + jar.getName)
  }
)

The problem is that the generated ZIP, or DEB for example, do not seem to include my project's modules dependencies. There is only the final module JAR, and the libraries used in it, but not the modules that it depends on.

Do you know how could I fix that?

1

1 Answers

5
votes

Found a solution to my problem: I needed to add exportJars := true in my settings for all my internal dependencies to be embedded in the package.