sbt.resolveexception:未解析的依赖项:org.glassfish.hk2#hk2 utils;2.22.2:未找到

mcdcgff0  于 2021-06-07  发布在  Kafka
关注(0)|答案(1)|浏览(467)

我是新手。
我试图在build.sbt中添加spark和kafka库,但出现以下错误:

of org.glassfish.hk2. and org.glassfish.hk2#hk2-locator;2.22.2: not 
 found and javax.validation#validation- 
  api;${javax.validation.version}: not found

每当我运行play run时,它都会下载jar文件,稍后会给出glassfish错误。我犯的错误是

Here are the codes:

    name := "smack"
   version := "1.0-SNAPSHOT"

  libraryDependencies ++= Seq(
  jdbc,
 anorm,
  cache
   )     

  play.Project.playScalaSettings

  libraryDependencies ++= Seq(
   "com.datastax.cassandra"  % "cassandra-driver-core" % "2.0.2",
   jdbc,
    anorm,
     cache)

   // logging
   libraryDependencies += "org.slf4j" % "slf4j-log4j12" % "1.7.25"

   // JSON
   libraryDependencies += "com.fasterxml.jackson.module" %% "jackson- 
   module-scala" % "2.8.8"

  // Kafka
  libraryDependencies += "org.apache.kafka" % "kafka-streams" % 
  "0.10.2.0"

   libraryDependencies += "org.apache.spark" % "spark-core_2.11" % 
   "2.3.0"
  libraryDependencies += "org.apache.kafka" % "kafka-clients" % 
  "2.0.0"

如何解决这个依赖问题?

k4aesqcs

k4aesqcs1#

我解决了这个错误。我在plugins.sbt中更改了播放版本
//typesafe存储库解析器+=“typesafe repository”at”http://repo.typesafe.com/typesafe/releases/"
//使用play sbt插件进行play项目
addsbtplugin(“com.typesafe.play“%”sbt插件“%”2.2.6”)
还补充了
//typesafe snapshots resolvers+=“类型安全快照”位于”http://repo.typesafe.com/typesafe/snapshots/"
它解决了我的错误。
供参考:
https://www.playframework.com/documentation/2.2.6/newapplication

相关问题