我有一個十字架上爲2.11建起了斯卡拉項目和2.12爲什麼ScalaTest 3.0.1 for 2.12沒有解決?
crossScalaVersions:= SEQ( 「2.11.8」, 「2.12.0」)
我添加依賴於scalatest。
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.0.1" % "test",
"org.mockito" % "mockito-all" % "1.10.19" % "test"
)
resolvers ++= Seq(
"Akka" at "http://akka.io/repository/",
"Sonatype" at "http://oss.sonatype.org/content/repositories/releases"
)
我可以看到,2.12版本published從3.0.0 scalatest。但SBT無法解決它。
[warn] ==== sbt-releases-repo: tried
[warn] http://repo.typesafe.com/typesafe/ivy-releases/org.scalatest/scalatest_2.12/3.0.1/ivys/ivy.xml
[warn] ==== sbt-plugins-repo: tried
[warn] http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scalatest/scalatest_2.12/3.0.1/ivys/ivy.xml
[warn] ==== my-ivy-proxy-releases: tried
[warn] http://artifactory.internal.com/ivy-releases/org.scalatest/scalatest_2.12/3.0.1/ivys/ivy.xml
[warn] ==== my-maven-proxy-releases: tried
[warn] http://artifactory.internal.com/maven-releases/org/scalatest/scalatest_2.12/3.0.1/scalatest_2.12-3.0.1.pom [warn] ==== Akka: tried
[warn] http://akka.io/repository/org/scalatest/scalatest_2.12/3.0.1/scalatest_2.12-3.0.1.pom
[warn] ==== Sonatype: tried
[warn] http://oss.sonatype.org/content/repositories/releases/org/scalatest/scalatest_2.12/3.0.1/scalatest_2.12-3.0.1.pom [info] Resolving jline#jline;2.14.1 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.scalatest#scalatest_2.12;3.0.1: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
任何指向這裏缺少的指針?
UPDATE: 添加我的〜/名.bst /庫設置
[倉庫]
local
my-ivy-proxy-releases: http://artifactory.internal.com/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
my-maven-proxy-releases: http://artifactory.internal.com/maven-releases/
根據你的日誌,SBT不會搜索對Maven Central的依賴(可能是因爲你的全局SBT配置改變了默認的解析器?)。您需要添加Maven Central作爲解析器,或者確保Scalatest依賴項可以從您組織的某個回購站中解析(artifactory.internal.com/maven-releases我猜)。 –
你說得對。當我將maven中心添加到build.sbt時,它可以工作。 我已經將我的〜/ .sbt/repositories設置爲指向artifactory。這是最近的一次變化。我認爲artifactory maven-proxy-releases默認會查看Maven Central。有些東西與我們的artifactory配置不符? – Cheeko
使用我的存儲庫文件更新後的文章 – Cheeko