You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm trying to package a multi-project build into a single zip file.
lazy val commonSettings =
net.virtualvoid.sbt.graph.Plugin.graphSettings ++
scalariformKeysPref ++
scalariformSettings
lazy val api = (project in file("api"))
.settings(commonSettings)
lazy val integration = (project in file("integration"))
.settings(commonSettings)
.dependsOn(api)
lazy val root = (project in file("."))
.enablePlugins(UniversalPlugin)
.settings(
name := "api",
version := "1.0"
)
.aggregate(api, integration)
.dependsOn(api, integration)
When I run packageZipTarball I'm get errors like:
(root/universal:packageZipTarball) java.io.IOException: Cannot run program "tar" (in directory "/var/folders/wp/xl36r_2s4595xndg3k75hbz80000gp/T/sbt_8cc085f6/api"): error=2, No such file or directory
Can someone point me to docs/help on how to get this working? At the moment it looks like it is not finding any files to bundle into the zip. I could manually specify the mappings, but I feel like there must be an easier/more correct solution here.
Thanks.
UPDATE: figured out a solution:
mappings in Universal <++= (sourceDirectories in (api, Compile)).map(dirs => dirs.flatMap(d => directory(d))),
in settings for the root project. Would be good to know if this is the 'recommended' way but it seems to work fine.
The text was updated successfully, but these errors were encountered:
Update: in fact the advice above is not great. For posterity, the thing I was doing wrong was I'd actually managed to delete the 'dependsOn' for the root project somehow.
I think the issue here is that you need to understand sbt multi-project builds well enough before trying to use sbt-native-packager with one. Which is fair enough I guess but does require a closer reading of the sbt docs http://www.scala-sbt.org/0.13/docs/Multi-Project.html.
Hi, I'm trying to package a multi-project build into a single zip file.
When I run
packageZipTarball
I'm get errors like:(root/universal:packageZipTarball) java.io.IOException: Cannot run program "tar" (in directory "/var/folders/wp/xl36r_2s4595xndg3k75hbz80000gp/T/sbt_8cc085f6/api"): error=2, No such file or directory
Can someone point me to docs/help on how to get this working? At the moment it looks like it is not finding any files to bundle into the zip. I could manually specify the mappings, but I feel like there must be an easier/more correct solution here.
Thanks.
UPDATE: figured out a solution:
mappings in Universal <++= (sourceDirectories in (api, Compile)).map(dirs => dirs.flatMap(d => directory(d))),
in settings for the root project. Would be good to know if this is the 'recommended' way but it seems to work fine.
The text was updated successfully, but these errors were encountered: