[英]SBT multi-project build classpath problems
I have a SBT project I'm trying to separate into a multi-project build.我有一个 SBT 项目,我试图将其拆分为一个多项目构建。
For some reason, there are a few tests I can't get to work when running the tests from the root build.出于某种原因,从根构建运行测试时,有一些测试无法工作。
These tests use Akka, and it looks something is wrong with the class path - the config is not loaded properly and I get this error:这些测试使用 Akka,看起来类路径有问题 - 配置未正确加载,我收到此错误:
[error] com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'akka' (SimpleConfig.java:152)
The dependency is configured for the sub-project, and works fine when I run the tests from within the project itself, and not from the root build.依赖项是为子项目配置的,当我从项目本身而不是从根构建运行测试时,它可以正常工作。
Does someone know how can I get this to work?有人知道我怎样才能让它工作吗?
Thanks for your help谢谢你的帮助
我自己刚刚遇到这个问题,我们设法通过在项目中启用fork来解决它:
ThisBuild / fork := true
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.