5
修复SBT驱逐警告消息是否是一个好主意?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"
)