I have the following scenario, I have some common text file (a config file template) that many projects need to include as part of their build
The easiest way is to put that file in a main/resources
folder of some project and include that project via a dependency.
However I need that file not to be just in the classpath, it needs to be in a folder outside of the classpath, e.g. /conf
I know I can use the mapping option, and I know the right side of the mapping, but what is the left side?
e.g.
libraryDependencies += //some project that has /main/resouces/foo.conf in it
mappings in Universal += classpathToFile("main/resources/foo.conf) -> "conf/foo-external.conf"
What should I put instead of classpathToFile
?
EDIT: I guess I can iterate over the entire classpath e.g.
mappings in Universal ++= {
val cp: Seq[File] = (fullClasspath in Runtime).value.files
cp.filter(_.name.endsWith(".conf")).map(f => f -> "bin/" + f.name)
}
But I'm not sure this is the best way...