【发布时间】:2017-02-28 22:54:56
【问题描述】:
修复 SBT 驱逐警告消息是个好主意吗?
通过将被驱逐的库的版本覆盖到最新版本。这会迫使 SBT 终生使用被覆盖的版本吗? SBT 还会通知我们将来有更新的版本吗?
驱逐警告示例 (SBT 0.13.13)
[warn] There may be incompatibilities among your library dependencies.
[warn] Here are some of the libraries that were evicted:
[warn] * com.chuusai:shapeless_2.11:1.2.4 -> 2.3.2
[warn] * org.postgresql:postgresql:9.4-1201-jdbc41 -> 9.4.1208.jre7
[warn] * jline:jline:0.9.94 -> 2.12.1
[warn] Run 'evicted' to see detailed eviction warnings
通过在 build.sbt 的末尾添加来删除警告。按照 SBT 文档中的说明Eviction warning
dependencyOverrides ++= Set(
"org.postgresql" % "postgresql" % "9.4.1208.jre7",
"com.chuusai" %% "shapeless" % "2.3.2",
"jline" % "jline" % "2.12.1"
)
【问题讨论】: