我在这样的项目结构中有一堆conf文件:
```
src / main / resources / live.conf
src / test / resources / test.conf
```
我想将live.conf从运行单罐sbt的构建工件中排除(使用单罐插件)。我添加了这一行,不幸的是,在运行sbt test:compile时,它也排除了test.conf
excludeFilter in Runtime in unmanagedResources := "*.conf"
我如何才能将live.conf排除在工件jar中而不用于测试?
这应该有助于:
mappings in (Compile, packageBin) ~= { _.filter(!_._1.getName.endsWith(".conf")) }
packageBin
是一个产生jar工件的任务,它mappings
表示在Compile
范围内用于编译和项目打包的文件
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句