gpt4 book ai didi

sbt - Hortonworks shc Unresolved 依赖项

转载 作者:行者123 更新时间:2023-12-04 14:05:59 24 4
gpt4 key购买 nike

我想使用 hbase hortonworks 连接器。 github guide

但是我不知道如何在我的项目中导入它。我有以下 build.sbt :

name := "project"

version := "1.0"

scalaVersion := "2.11.8"

libraryDependencies ++= Seq(
"org.apache.spark" % "spark-core_2.11" % "2.2.0",
"org.apache.spark" % "spark-sql_2.11" % "2.2.0",
"org.scala-lang" % "scala-compiler" % "2.11.8",
"com.hortonworks" % "shc" % "1.1.2-2.1-s_2.11-SNAPSHOT"
)

它给了我以下 Unresolved 依赖关系:

Error:Error while importing SBT project:
...
[warn] ==== local: tried [warn] ivy.xml [warn] ==== public: tried [warn]
https://repo1.maven.org/maven2/com/hortonworks/shc/1.1.2-2.1-s_2.11-SNAPSHOT/shc-1.1.2-2.1-s_2.11-SNAPSHOT.pom [info] Resolving jline#jline;2.12.1 ... [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] ::
UNRESOLVED DEPENDENCIES :: [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: com.hortonworks#shc;1.1.2-2.1-s_2.11-SNAPSHOT: not found [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] [warn] Note: Unresolved dependencies path: [warn] com.hortonworks:shc:1.1.2-2.1-s_2.11-SNAPSHOT (build.sbt#L8-14) [warn] +- default:project_2.11:1.0 [trace] Stack trace suppressed: run 'last *:ssExtractDependencies' for the full output. [trace] Stack trace suppressed: run 'last :update' for the full output. [error] (:ssExtractDependencies) sbt.ResolveException: unresolved dependency: com.hortonworks#shc;1.1.2-2.1-s_2.11-SNAPSHOT: not found [error] (*:update) sbt.ResolveException: unresolved dependency: com.hortonworks#shc;1.1.2-2.1-s_2.11-SNAPSHOT: not found [error] Total time: 7 s, completed 3 août 2017 11:36:37

最佳答案

在您的解决方案中,您需要添加代表存储库的 resolvers 行。

scalaVersion := "2.11.12"

val sparkVersion = "2.1.0"

resolvers += "Hortonworks Repository" at "http://repo.hortonworks.com/content/repositories/releases/"

libraryDependencies += "org.apache.spark" %% "spark-core" % sparkVersion
libraryDependencies += "org.apache.spark" %% "spark-sql" % sparkVersion

libraryDependencies ++= Seq(
"com.hortonworks" % "shc-core" % "1.1.1-2.1-s_2.11"
)

关于sbt - Hortonworks shc Unresolved 依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45480673/

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