【问题标题】:How can I solve conflicting cross version suffixes in SBT?如何解决 SBT 中冲突的跨版本后缀?
【发布时间】:2014-08-29 10:26:58
【问题描述】:

我有一个使用最近移植到 Scala 2.11.1 的库的 Play 项目。

我还将 Play 更新到 Scala 2.11.1。

当我尝试运行该项目时,我得到:

[error] Modules were resolved with conflicting cross-version suffixes in {file:/...}:
[error]    org.scalaz:scalaz-core _2.11, _2.10
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) Conflicting cross-version suffixes in: org.scalaz:scalaz-core

我尝试使用 sbt-dependency-graph 插件检测哪个是使用 scalaz-core-2.10 的库。但是,在依赖图树中,scalaz-core的出现只有一种:

info]   | +-org.scalaz:scalaz-core_2.11:7.0.6

所以我不确定哪个是使用 scalaz-core_2.10 的库...我怎样才能检测到它?

我已经看到here,一旦我检测到它,我可以排除它,但我的问题是如何检测我必须排除的依赖项。

【问题讨论】:

  • 我最近在使用 Akka 时遇到了同样的问题,结果我在 Spray 依赖项中放置了 % 而不是 %%。解决这个问题就解决了。我会检查我的 build.sbt 并检查所有 Scala 库是否有 %%
  • last *:update 说了什么有用的东西吗?也许您可以共享一个库名称,除非它是您的私有库。

标签: scala playframework playframework-2.0 sbt dependency-management


【解决方案1】:

target/resolution-cache/reports/ 下是 Ivy 针对每个配置的分辨率报告。 寻找*-compile.xml*-test.xml 看看有没有

<module organisation="org.scalaz" name="scalaz-core_2.10">
   ....
</module>

这应该告诉你模块的caller

【讨论】:

    猜你喜欢
    • 2017-02-01
    • 1970-01-01
    • 2013-10-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-01
    • 2019-01-15
    相关资源
    最近更新 更多