我正在做一个Scala项目,使用SBT构建并尝试遵循以下文档:
Elasticsearch网站,关于他们的测试框架: https://www.elastic.co/guide/en/elasticsearch/reference/current/using-elasticsearch-test-classes.html
在那里,他们谈论使用相同版本的ES,在我的情况下是ES:2.2.0
和lucene:5.4.1
但是,由于测试框架工件和版本的依赖性问题,我无法构建我的项目。
我已添加:
"org.elasticsearch.test" % "framework" % "2.2.0"
但SBT失败了:
Error:Error while importing SBT project:<br/>...<br/><pre>[info]
Resolving commons-io#commons-io;2.4 ... [info] Resolving io.spray#spray-
json_2.12;1.3.2 ... [info] Resolving com.typesafe.akka#akka-http-
testkit_2.12;10.0.1 ... [info] Resolving com.typesafe.akka#akka-stream-
testkit_2.12;2.4.16 ... [info] Resolving com.typesafe.akka#akka-
testkit_2.12;2.4.16 ... [info] Resolving jline#jline;2.14.1 ... [warn]
:::::::::::::::::::::::::::::::::::::::::::::: [warn] ::
UNRESOLVED DEPENDENCIES :: [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] ::
org.elasticsearch.test#framework;2.2.0: not found [warn]
:::::::::::::::::::::::::::::::::::::::::::::: [warn] [warn] Note:
Unresolved dependencies path: [warn]
org.elasticsearch.test:framework:2.2.0
(/Users/filipemiranda/datawerks/scala-query-engine/build.sbt#L13-30)
[warn] +- default:scala-query-engine_2.12:1.0 [trace] Stack trace
suppressed: run 'last *:update' for the full output. [trace] Stack trace
suppressed: run 'last *:ssExtractDependencies' for the full output.
[error] (*:update) sbt.ResolveException: unresolved dependency:
org.elasticsearch.test#framework;2.2.0: not found [error]
(*:ssExtractDependencies) sbt.ResolveException: unresolved dependency:
org.elasticsearch.test#framework;2.2.0: not found [error] Total time: 6 s,
completed Jan 21, 2017 8:20:44 PM</pre><br/>See complete log in <a
href="/Users/filipemiranda/Library/Logs/IdeaIC2016.1/sbt.last.log">/Users/
filipemiranda/Library/Logs/IdeaIC2016.1/sbt.last.log</a>
我看了看:https://oss.sonatype.org/content/repositories/releases/org/elasticsearch/test/framework/
我在那里找不到相同的版本。
有没有人遇到类似的问题,如何解决?
这是我的整个 build.sbt
name := "project-name"
version := "1.0"
lazy val scalaV = "2.12.1"
scalaVersion := scalaV
lazy val akkaHttpV = "10.0.1"
lazy val esVersion = "2.2.0"
lazy val luceneVersion = "5.4.1"
lazy val scalatestV = "3.0.1"
libraryDependencies ++= Seq(
"org.scala-lang" % "scala-compiler" % scalaV,
"org.scalatest" %% "scalatest" % scalatestV,
"com.typesafe.akka" %% "akka-http-core" % akkaHttpV,
"com.typesafe.akka" %% "akka-http" % akkaHttpV,
"com.typesafe.akka" %% "akka-stream" % "2.4.16",
"com.storm-enroute" %% "scalameter" % "0.8.2" % "test",
"io.searchbox" % "jest" % "2.0.3",
"org.elasticsearch" % "elasticsearch" % "2.2.0" withSources,
"com.twitter" %% "util-eval" % "6.40.0",
"org.apache.lucene" % "lucene-test-framework" % "5.4.1",
"org.elasticsearch.test" % "framework" % "2.2.0",
"com.storm-enroute" %% "scalameter" % "0.8.2" % "test",
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpV % "test"
)
我该如何处理?