我查看了相关问题并尝试了相关建议。他们似乎没有帮助。
这是我的build.sbt文件中的内容:
resolvers += Resolver.sonatypeRepo("snapshots")
...
libraryDependencies ++= Seq(
"org.elasticsearch" %% "elasticsearch-spark" % "2.2.0.BUILD-SNAPSHOT"
)
...
我已经确认回购有合适的 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回购?
我应该怎样做才能解决问题?
谢谢。
最佳答案
您可以指定其他解析器,对于声纳快照,可以添加resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
,有关更多信息,请参见http://www.scala-sbt.org/0.13/docs/Resolvers.html。