I am trying to create a package using sbt-native-packager without the conf folder being in the project jar. I have my conf folder included as such:
resourceDirectory in Compile <<= baseDirectory(_ => new File("conf"))
This include the conf files in the project jar is there a way I can have the conf files included on the classpath for runtime,test,console but not dist?
Try something like
mappings in (Compile, packageBin) ~= { _.filterNot { case (_, name) =>
Seq("application.conf", "anotherconfig").contains(name)
}}
A variation of your @Alexey Yamshanov very useful above answer.
It excludes some configuration files from packaging inclusion.
For instance ending with dev.conf
, prod.conf
mappings in (Compile, packageBin) ~= {
_.filterNot { case (_, name) => Seq("dev.conf", "prod.conf").exists(name.endsWith) }
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With