0

我正在使用 Scala 2.12.6、Akka 和 zeroMQ 构建应用程序 我正在尝试像这样为 zeroMQ 添加依赖项,但在下载 zeroMQ 的依赖项时遇到问题。我正在尝试像这样添加 ZeroMQ 依赖项:

val `akka-zeromq`     = "com.typesafe.akka"      %% "akka-zeromq"   % "2.1-M1"

下面的部分解释了我正在使用的 sbt 解析器: resolvers += Resolver.url("bintray-sbt-plugins", url(" https://dl.bintray.com/sbt/sbt-plugin-releases/ "))(Resolver .ivyStylePatterns), resolvers += Resolver.bintrayRepo("pqw", "maven"), version := "0.0.1", fork := true, parallelExecution in Test := false, autoCompilerPlugins := true, if (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

如果您可以为此提供任何帮助,请告诉我。

4

1 回答 1

2

从我在https://mvnrepository.com/artifact/com.typesafe.akka/akka-zeromq上看到的内容,版本M-1未在maven central上发布,但存在于typesafe repo上。

我尝试了这个最小的例子:

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 并更新。也许尝试更新的依赖版本。

于 2018-07-24T08:42:19.417 回答