【发布时间】:2019-12-08 22:09:55
【问题描述】:
我将 play framework 升级到 2.4 版,但在我的 jars 文件中,我仍然看到我不了解它们的来源的 specs2 version 2.4.13 jars,因为 play framework 2.4 独立使用 specs2,这导致了版本冲突。
我试图确定哪个依赖项正在使用此插件隐式调用 specs2 版本 2.4.13:
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.10.0-RC1")
但它没有解决问题。
dependencyTree任务的输出:
+-com.github.nscala-time:nscala-time_2.11:2.2.0 [S]
[info] | +-joda-time:joda-time:2.8.2
[info] | +-org.joda:joda-convert:1.2
[info] |
[info] +-com.google.code.findbugs:jsr305:1.3.9
[info] +-com.google.guava:guava:18.0
[info] +-com.madgag:scala-io-file_2.11:0.4.10-itb [S]
[info] | +-com.madgag:scala-io-core_2.11:0.4.10-itb [S]
[info] | | +-com.jsuereth:scala-arm_2.11:2.0 [S]
[info] | |
[info] | +-org.scala-lang.modules:scala-parser-combinators_2.11:1.0.5 [S]
[info] |
[info] +-log4j:log4j:1.2.17
[info] +-net.htmlparser.jericho:jericho-html:3.3
[info] +-net.sourceforge.htmlcleaner:htmlcleaner:2.2
[info] +-org.apache.commons:commons-lang3:3.3.2
[info] +-org.scalaz:scalaz-core_2.11:7.1.3 [S]
[info] | +-org.scala-lang.modules:scala-parser-combinators_2.11:1.0.4 (evicted by: 1.0.5)
[info] | +-org.scala-lang.modules:scala-parser-combinators_2.11:1.0.5 [S]
[info] | +-org.scala-lang.modules:scala-xml_2.11:1.0.4 (evicted by: 1.0.6)
[info] | +-org.scala-lang.modules:scala-xml_2.11:1.0.6 [S]
[info] |
[info] +-xalan:serializer:2.7.2
原点错误是:
* 升级后,我在 build sbt 文件中添加了 specs2 依赖项,结果我得到了 2 个版本的 jars 文件和测试文件
class testSpec extends Specification with Forms
从规范版本 3.6.6 中读取规范并从版本 2.4.13 中读取表单 *
【问题讨论】:
-
您实际上遇到了哪个错误?
dependencyTree任务的输出是什么? -
@cbley,我回答了这个问题
-
啊,我真傻。当然,您必须为
Test范围运行任务。test:dependencyTree带给你什么? -
@cbley 我得到以下信息: org.specs 它不在任何其他依赖项下 +-org.specs2:specs2-core_2.11:2.4.13 [S] [info] | +-org.specs2:specs2-matcher_2.11:2.4.13 [S] [信息] | +-org.specs2:specs2-common_2.11:2.4.13 [S] [信息] | +-org.scala-lang:scala-reflect:2.11.4 [S] [信息] | +-org.scalaz:scalaz-concurrent_2.11:7.1.0 [S] [信息] | | +-org.scalaz:scalaz-core_2.11:7.1.0(被驱逐:7.1.3)[信息] | | +-org.scalaz:scalaz-core_2.11:7.1.3 [S] [信息] | | | +-org.scala-lang.modules:scala-parser-combinators_2.11:1.0.4(被驱逐:1.0.5)
-
然后你自己在
build.sbt或project/*.scala文件中介绍了它?!或者您正在使用的任何其他插件是否做到了?
标签: scala playframework sbt specs2