我似乎无法找到下面第一次驱逐的根本原因。如下所示,运行evicted
不会提供与其相关的详细信息。
这一切都发生在project / plugins.sbt中添加之后:
libraryDependencies += "io.spray" %% "spray-json" % "1.3.1"
[warn] There may be incompatibilities among your library dependencies.
[warn] Here are some of the libraries that were evicted:
[warn] * io.spray:spray-json_2.10:1.2.6 -> 1.3.1
[warn] Run 'evicted' to see detailed eviction warnings
[projectName] $ evicted
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies.
[warn] Here are some of the libraries that were evicted:
[warn] * com.googlecode.efficient-java-matrix-library:ejml:0.23 -> 0.19 (caller: edu.arizona.sista:processors:3.3, edu.stanford.nlp:stanford-corenlp:3.3.1)
[warn] * com.google.guava:guava:(15.0, 13.0.1) -> 16.0.1 (caller: org.sorm-framework:sorm:0.3.16, com.jolbox:bonecp:0.8.0.RELEASE, com.typesafe.play:play-ws_2.11:2.3.7)
[warn] * xml-apis:xml-apis:(2.0.2, 1.3.03) -> 1.4.01 (caller: xalan:xalan:2.7.0, xerces:xercesImpl:2.11.0, xom:xom:1.2.5, com.io7m.xom:xom:1.2.10)
[warn] * io.netty:netty:(3.9.2.Final, 3.6.3.Final) -> 3.9.3.Final (caller: com.ning:async-http-client:1.8.14, com.typesafe.netty:netty-http-pipelining:1.1.2, com.typesafe.play:play_2.11:2.3.7)
[success] Total time: 2 s, completed Apr 9, 2015 8:04:11 PM
在运行时,我甚至没有尝试使用spray-json就崩溃了,所以在我的sbt构建中如何管理或驱逐这种依赖关系真的不对:
[error] (web-assets:less::jstaskJsOptions) java.lang.NoSuchMethodError: spray.json.JsArray.<init>(Lscala/collection/immutable/List;)V
首先在我的build.sbt中没有明确定义此版本的1.2.6版本,也许它是其他插件所需要的,但如何在没有逐出细节的情况下进行跟踪?我怎样才能理解这次神秘驱逐的细节?
答案 0 :(得分:6)
您可以使用
show externalDependencyClasspath
获取包含所有传递依赖项的toString
表示,但它看起来非常麻烦。我建议安装sbt-dependency-graph插件,使dependencyTree
任务可用,以可读格式显示您的完整类路径。