Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple project dependencies in SBT native packager

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?

like image 584
Adrien Aubel Avatar asked Aug 06 '13 08:08

Adrien Aubel


1 Answers

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.

like image 163
Adrien Aubel Avatar answered Sep 24 '22 00:09

Adrien Aubel