我正在使用Scala 2.12.6,Akka和zeroMQ构建应用程序,我试图像这样添加对zeroMQ的依赖关系,但是在下载对zeroMQ的依赖关系时遇到了问题。我试图像这样添加ZeroMQ依赖项:
val `akka-zeromq` = "com.typesafe.akka" %% "akka-zeromq" % "2.1-M1"
以下部分说明了我正在使用的sbt解析器: 解析器+ = Resolver.url(“ bintray-sbt-plugins”,url(“ https://dl.bintray.com/sbt/sbt-plugin-releases/”))(Resolver.ivyStylePatterns), 解析器+ = Resolver.bintrayRepo(“ pqw”,“ maven”), 版本:=“ 0.0.1”, 叉:= true, 测试中的parallelExecution:=否, autoCompilerPlugins:= true, 如果(formatOnCompile)scalafmtOnCompile:= true否则scalafmtOnCompile:= false
我认为我所做的一切都正确,但是在尝试使用命令sbt stage publishLocal运行项目时仍然遇到以下问题
[warn] module not found: com.typesafe.akka#akka-zeromq_2.12;2.1-M1
[warn] ==== local: tried
[warn] /home/mahendratonape/.ivy2/local/com.typesafe.akka/akka-zeromq_2.12/2.1-M1/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/typesafe/akka/akka-zeromq_2.12/2.1-M1/akka-zeromq_2.12-2.1-M1.pom
[warn] ==== local-preloaded-ivy: tried
[warn] /home/mahendratonape/.sbt/preloaded/com.typesafe.akka/akka-zeromq_2.12/2.1-M1/ivys/ivy.xml
[warn] ==== local-preloaded: tried
[warn] file:////home/mahendratonape/.sbt/preloaded/com/typesafe/akka/akka-zeromq_2.12/2.1-M1/akka-zeromq_2.12-2.1-M1.pom
[warn] ==== bintray-sbt-plugins: tried
[warn] https://dl.bintray.com/sbt/sbt-plugin-releases/com.typesafe.akka/akka-zeromq_2.12/2.1-M1/ivys/ivy.xml
[warn] ==== bintray-twtmt-maven: tried
[warn] https://dl.bintray.com/twtmt/maven/com/typesafe/akka/akka-zeromq_2.12/2.1-M1/akka-zeromq_2.12-2.1-M1.pom
[warn] ==== mavenRepo: tried
[warn] https://mvnrepository.com/artifact/org.zeromq/zeromq-scala-binding/com.typesafe.akka/akka-zeromq_2.12/2.1-M1/ivys/ivy.xml
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.typesafe.akka#akka-zeromq_2.12;2.1-M1: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] com.typesafe.akka:akka-zeromq_2.12:2.1-M1 (/home/mahendratonape/abc4.0/acs/build.sbt#L8)
[warn] +- org.tmt:abc-asd_2.12:0.0.1
如果您可以为此提供任何帮助,请告诉我。
答案 0 :(得分:1)
根据我在https://mvnrepository.com/artifact/com.typesafe.akka/akka-zeromq上看到的内容,版本M-1
尚未在 maven Central 上发布,但在 typesafe存储库上存在。
我尝试了以下最小示例:
resolvers += "Typesafe maven releases" at "http://repo.typesafe.com/typesafe/maven-releases/"
// https://mvnrepository.com/artifact/com.typesafe.akka/akka-zeromq
libraryDependencies += "com.typesafe.akka" % "akka-zeromq" % "2.1-M1"
重新加载sbt并更新。也许尝试更新的依赖版本。