如何找到正确的库Dependency Scala

时间:2018-12-21 10:19:01

标签: scala apache-spark sbt

我正在尝试找到 sbt 的正确libraryDependencies。我的Scala版本是scalaVersion := "2.12.8"

我尝试过这样,但出现错误:

libraryDependencies += "org.specs2" % "specs2_2.12.8-RC3" % "2.12.8"

无法解决的依赖

2 个答案:

答案 0 :(得分:1)

您可以添加双%%来自动检测版本,如SBT docs中所述:

libraryDependencies += "org.scala-tools" %% "scala-stm" % "0.3"

或您的情况:

libraryDependencies += "org.specs2" %% "specs2" % "2.12.8"

答案 1 :(得分:0)

例如,您也有不同的hadoop程序集。 例如Hortonworks,Cloudera等。 该公司有一个存储库,您有时需要使用它们。

hortonworks的示例:

lazy val repositoriesSettings = Seq(
  resolvers += "Mvnrepository" at "https://mvnrepository.com/artifact/",
  resolvers += "Hortonworks HDP" at "http://repo.hortonworks.com/content/repositories/releases/",
  resolvers += "Hortonworks Other Dependencies" at "http://repo.hortonworks.com/content/groups/public",
  resolvers += "Atlassian oracle" at "https://packages.atlassian.com/maven-3rdparty/"
)