scala - 使用 akka-http 模板的新 sbt 应用程序,如何确定解析器并添加 maven Central?
问题描述
我有一个使用 akka http g8 模板构建的新 sbt 应用程序。
我正在尝试将 reactivemongo 1.0 添加到我的构建中,但出现此错误:
not found: https://repo1.maven.org/maven2/org/reactivemongo/reactivemongo_2.13/1.0/reactivemongo_2.13-1.0.pom
文档说这个库位于 Maven 中心。
如何确定我的项目当前在 sbt 中默认使用的解析器?
这个库是否有可能不是为 scala 2.13.3 或 2.13.1 构建的?
如何调试此类错误。
谢谢!
构建.sbt:
import Dependencies._
lazy val akkaHttpVersion = "10.2.1"
lazy val akkaVersion = "2.6.10"
lazy val root = (project in file("."))
.settings(
inThisBuild(
List(
organization := "com.example",
scalaVersion := "2.13.3"
)
),
name := "akka-http",
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
"com.typesafe.akka" %% "akka-http-spray-json" % akkaHttpVersion,
"com.typesafe.akka" %% "akka-actor-typed" % akkaVersion,
"com.typesafe.akka" %% "akka-stream" % akkaVersion,
"ch.qos.logback" % "logback-classic" % "1.2.3",
"com.softwaremill.macwire" %% "macros" % "2.3.3" % "provided",
"com.softwaremill.macwire" %% "util" % "2.3.3" % "provided",
"com.github.blemale" %% "scaffeine" % "3.1.0" % "compile",
"org.typelevel" %% "cats-core" % "2.1.1",
"com.lihaoyi" %% "scalatags" % "0.8.2",
"com.github.pureconfig" %% "pureconfig" % "0.13.0",
"org.reactivemongo" %% "reactivemongo" % "1.0",
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % Test,
"com.typesafe.akka" %% "akka-actor-testkit-typed" % akkaVersion % Test,
"org.scalatest" %% "scalatest" % "3.0.8" % Test
)
)
.enablePlugins(JavaAppPackaging)
解决方案
你可以尝试用 替换"org.reactivemongo" %% "reactivemongo" % "1.0"
吗"org.reactivemongo" %% "reactivemongo" % "1.0.0" % "provided"
?
我从 Maven 存储库https://mvnrepository.com/artifact/org.reactivemongo/reactivemongo_2.13/1.0.0复制它
推荐阅读
- php - 如何在 PowerShell 中进行 php-serialize 和 base64_encode?
- r - 分解时间序列数据:“不超过 2 个周期”
- c++ - 使用涉及地图的比较器对项目向量进行排序
- regex - Texmaker 中查找和替换中的正则表达式
- tfs - TFS 中缺少编辑器首选项
- list - haskell如何检查两个元组列表是否相等并采取联合
- python - 将边界应用于 Scipy Optimize Curvefit
- android - 在 asynytask 中完成活动意图
- google-apps-script - 从 Drive.Files.list 获取新的 Google Site Published URL
- html - CSS,outline-offset:分别设置每边的偏移量