What is the best way of using static resources in an SBT based Scala project with a packaging plugin such as
Put it into the resources directory, but don't "reference the resources directory and read from the file": use
getResources, depending on your requirements) instead. This is the same technique TypeSafe Config and innumerable other libraries use. For this it doesn't matter if you use
sbt-native-packager or not.
This approach runs into problems if you need to make these resources available specifically as files (e.g. to feed them to an external process). In this case add them to
mappings as shown here:
mappings in Universal in packageBin += file("README") -> "README"
"README" with the file(s) you need).