I have a project that is a scala & scalatra API. I have two distributables that I build with sbt-native-packager -
- RPM & DEB install for on-premise installations
- heroku install for cloud installations
I'm currently using provided
scope dependencies for items I need to manually manage with the RPM/DEB approach - database libraries that I cannot bundle and distribute due to license restrictions.
"mysql" % "mysql-connector-java" % "5.1.30" % "provided",
"com.microsoft" % "sqlserver.jdbc" % "4.1" % "provided",
..etc..
This has been working great. I use the universal plugin and the dist
task, somewhat massaged, and then hook up some package build scripts.
Now I'm building the heroku install, and I don't know how to add back in those provided dependencies. I'm using the universal plugin and running the stage
task. However, provided dependencies are being filtered out and I'd like to actually have them included when running stage
, because I don't have the license restriction anymore in heroku.
Options that I think I have...
- Add a
mapping
to add back in provided scope dependencies during thestage
task, but not during thedist
task - Drop provided scope entirely and manually exclude those dependencies from the packaging process during
dist
I have some mappings already like this,
//add webapp dir to zip
mappings in Universal ++= directory("src/main/webapp")
//add db dir to zip, but move it into /lib/db instead of /db
mappings in Universal ++= (directory("src/main/resources/db").map{t =>
(t._1, "lib/"+t._2)
}
)
So I feel like I could probably figure out how to add/exclude if I really tried, but I'm having problems finding any documentation for this stuff. The examples here don't really help much, or I don't understand enough.
Thanks in advance!