在这样的项目结构中,我有一堆conf文件:
```javascriptsrc / main / resources / live.conf
src /测试/资源/ test.conf
当我运行sbt jar(使用一个jar插件)时,我希望将live.conf从构建的工件中排除在外。我添加了这一行,不幸的是,在运行sbt测试时,它也排除了test.conf :编译。
excludeFilter in Runtime in unmanagedResources := "*.conf"
如何将live.conf排除在工件jar中,但不能用于测试?
发布于 2013-12-10 10:21:32
这应有助于:
mappings in (Compile, packageBin) ~= { _.filter(!_._1.getName.endsWith(".conf")) }packageBin是一项产生jar工件的任务,mappings表示Compile作用域中用于编译和项目打包的文件。
https://stackoverflow.com/questions/20491505
复制相似问题