1
我正在尝试在SBT构建文件中添加mockito依赖项,但它给出了未解决的依赖项异常。ScalaTest和Mockito - 无法解析的依赖关系
我不确定它是否与Scala和Mockito版本有关。
scalaVersion := "2.11.8"
libraryDependencies ++= Seq("org.scalatest" % "scalatest_2.11" % "2.2.2" % "test",
"org.mockito" % "mockito-all" % "1.9.5" % "test")
例外:
trace] Stack trace suppressed: run 'last *:ssExtractDependencies' for the full output.
[trace] Stack trace suppressed: run 'last *:update' for the full output.
[error] (*:ssExtractDependencies) sbt.ResolveException: unresolved dependency: org.mockito#mockito-all;1.9.5: not found
[error] (*:update) sbt.ResolveException: unresolved dependency: org.mockito#mockito-all;1.9.5: not found
[error] Total time: 23 s, completed Oct 12, 2017 3:13:16 PM
我与不同版本的Mockito 1.8.5尝试为好。但没有运气。
在此先感谢。
我确实已将依赖项版本更改为上述内容。但我仍面临同样的问题。 –
您是否对代理和网络配置有任何问题?你能够获得文件夹的列表https://repo1.maven.org/maven2/org/mockito/mockito-core/2.8.47/? –
不,我没有看到为mockito创建的任何文件夹。我也尝试过不同的mockito版本,但是它的失败与相同的错误信息。 –