在sbt中使用ProjectRef时如何包含传递依赖?

时间:2015-03-06 15:58:10

标签: scala sbt

我想在不创建聚合(“root”)项目的情况下从另一个sbt项目引用一个项目。

我有两个依赖于某些共享代码的项目,但它们足够独立,因此将它们置于聚合(“根”)项目下并不真正有意义(即我永远不会同时构建这两个项目时间,我希望他们在不同的git存储库中,但是我将在处理其中任何一个时更新共享代码。)

我目前的解决方案如下:

lazy val core = ProjectRef(file("../Core"), "core")

lazy val console = project.in(file(".")).dependsOn(core)

这一直有效,直到我不得不向“核心”项目添加库依赖项,现在我无法构建“控制台”项目。它失败并显示以下消息:

[error] missing or invalid dependency detected while loading class file 'Settings.class'.
[error] Could not access term typesafe in package com,
[error] because it (or its dependencies) are missing. Check your build definition for
[error] missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
[error] A full rebuild may help if 'Settings.class' was compiled against an incompatible version of com.

显然是指核心依赖的缺少的“com.typesafe.config”库。

有没有办法解决这个问题,以便使用core的依赖项编译控制台项目?

0 个答案:

没有答案