gpt4 book ai didi

elasticsearch - sbt 无法解析来自 sonatype 快照的依赖关系

转载 作者:行者123 更新时间:2023-12-03 00:19:40 25 4
gpt4 key购买 nike

我查看了相关问题并尝试了那里的建议。他们似乎没有帮助。

这是我的 build.sbt 文件中的内容:

resolvers += Resolver.sonatypeRepo("snapshots")
...
libraryDependencies ++= Seq(
"org.elasticsearch" %% "elasticsearch-spark" % "2.2.0.BUILD-SNAPSHOT"
)
...

我已经确认 repo 有合适的 jar。这是在 sbt 解释器中编译的输出:
[info] Resolving org.elasticsearch#elasticsearch-spark_2.11;2.2.0.BUILD-SNAPSHOT ...
[warn] module not found: org.elasticsearch#elasticsearch-spark_2.11;2.2.0.BUILD-SNAPSHOT
[warn] ==== local: tried
[warn] /Users/aswami/.ivy2/local/org.elasticsearch/elasticsearch-spark_2.11/2.2.0.BUILD-SNAPSHOT/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch-spark_2.11/2.2.0.BUILD-SNAPSHOT/elasticsearch-spark_2.11-2.2.0.BUILD-SNAPSHOT.pom
[info] Resolving jline#jline;2.12.1 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.elasticsearch#elasticsearch-spark_2.11;2.2.0.BUILD-SNAPSHOT: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.elasticsearch:elasticsearch-spark_2.11:2.2.0.BUILD-SNAPSHOT (/Users/aswami/repos/dtex-datascience/build.sbt#L129)
[warn] +- com.dtex:analysis_2.11:0.1
[trace] Stack trace suppressed: run last analysis/*:update for the full output.
[error] (analysis/*:update) sbt.ResolveException: unresolved dependency: org.elasticsearch#elasticsearch-spark_2.11;2.2.0.BUILD-SNAPSHOT: not found

为什么它不尝试 sonatype-snapshots 存储库?
我应该怎么做才能解决问题?
谢谢。

最佳答案

您可以指定额外的解析器,对于 sonatype 快照,您可以添加 resolvers +=
"Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
,见 http://www.scala-sbt.org/0.13/docs/Resolvers.html了解更多信息。

关于elasticsearch - sbt 无法解析来自 sonatype 快照的依赖关系,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32131082/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com