Reputation: 11
I've created a prod.conf file which is my configuration file for my production environment. I'd like to ask, is there a way so that whenever I do play dist, the webapp_config.txt file that I've created is included in the zip and placed in the root directory of my web app?
Thanks in advance!
Upvotes: 0
Views: 117
Reputation: 1461
Check out the sbt task mappings
in dist
. It is a sequence of tuples (File -> String) that represent which files will be mapped to which paths in the resulting zip file.
In your case the steps to follow are:
add addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "0.7.1")
to the project/plugins.sbt file
import com.typesafe.sbt.SbtNativePackager._
in your build file
add the following to your project settings
mappings in (Universal, packageBin) += (baseDirectory.value / "webapp_config.txt") -> "webapp_config.txt"
Upvotes: 1