sbt项目导入scalding报错
Error importing scalding in sbt project
为什么在我的项目中导入 scalding sbt 时出现此错误 build.sbt(参考:
How to declare dependency on Scalding in sbt project?)。请帮帮我。
lazy val scaldingCore = ProjectRef(uri("https://github.com/twitter/scalding.git"), "scalding-core")
lazy val myProject = project in file(".") dependsOn scaldingCore
Error:Error while importing SBT project:
...
[warn] ====
public: tried [warn]
https://repo1.maven.org/maven2/com/twitter/scalding-core_2.10/0.16.0-SNAPSHOT/scalding-core_2.10-0.16.0-SNAPSHOT.pom
[info] Resolving org.scala-lang#scala-compiler;2.10.4 ... [info]
Resolving org.scala-lang#scala-reflect;2.10.4 ... [info] Resolving
org.scala-lang#jline;2.10.4 ... [info] Resolving
org.fusesource.jansi#jansi;1.4 ... [warn]
:::::::::::::::::::::::::::::::::::::::::::::: [warn] ::
UNRESOLVED DEPENDENCIES :: [warn]
:::::::::::::::::::::::::::::::::::::::::::::: [warn] ::
com.twitter#scalding-core_2.10;0.16.0-SNAPSHOT: not found [warn]
:::::::::::::::::::::::::::::::::::::::::::::: [warn] [warn] Note:
Unresolved dependencies path: [warn]
com.twitter:scalding-core_2.10:0.16.0-SNAPSHOT [warn] +-
myproject:myproject_2.10:0.1-SNAPSHOT [trace] Stack trace suppressed:
run 'last myProject/:update' for the full output. [trace] Stack trace
suppressed: run 'last myProject/:ssExtractDependencies' for the full
output. [error] (myProject/:update) sbt.ResolveException: unresolved
dependency: com.twitter#scalding-core_2.10;0.16.0-SNAPSHOT: not found
[error] (myProject/:ssExtractDependencies) sbt.ResolveException:
unresolved dependency: com.twitter#scalding-core_2.10;0.16.0-SNAPSHOT:
not found
Scalding publishes jars on Sonatype Maven Central, so you really shouldn't need to mess with the Git ProjectRef
. You just need to get your sbt resolvers正确以便它可以找到罐子。在您的 build.sbt
:
中从这个开始
resolvers ++= Seq(
Resolver.sonatypeRepo("releases"),
"Concurrent Maven Repo" at "http://conjars.org/repo"
)
级联 publishes to the Conjars repository 而不是中央,因此您很可能需要如图所示的附加解析器。
最初尝试这些,如果您仍然遇到未解决的错误,您可能需要添加 additional repos that Scalding uses,具体取决于您需要依赖的工件——您可能会 not 需要整个 scalding
超级神器,你可能 trim 下降到 scalding-core
、scalding-commons
、scalding-repl
,也许其他取决于需要你的项目。
所以要清楚,而不是 ProjectRef
和 dependsOn scaldingCore
,添加上面的解析器和类似这样的东西:
libraryDependencies ++= {
val scaldingVersion = "0.16.0-RC6"
Seq(
"com.twitter" %% "scalding-core" % scaldingVersion
, "com.twitter" %% "scalding-commons" % scaldingVersion
, "com.twitter" %% "scalding-repl" % scaldingVersion
)
}
以此类推
为什么在我的项目中导入 scalding sbt 时出现此错误 build.sbt(参考: How to declare dependency on Scalding in sbt project?)。请帮帮我。
lazy val scaldingCore = ProjectRef(uri("https://github.com/twitter/scalding.git"), "scalding-core")
lazy val myProject = project in file(".") dependsOn scaldingCore
Error:Error while importing SBT project:
...
[warn] ==== public: tried [warn]
https://repo1.maven.org/maven2/com/twitter/scalding-core_2.10/0.16.0-SNAPSHOT/scalding-core_2.10-0.16.0-SNAPSHOT.pom [info] Resolving org.scala-lang#scala-compiler;2.10.4 ... [info] Resolving org.scala-lang#scala-reflect;2.10.4 ... [info] Resolving org.scala-lang#jline;2.10.4 ... [info] Resolving org.fusesource.jansi#jansi;1.4 ... [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] ::
UNRESOLVED DEPENDENCIES :: [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: com.twitter#scalding-core_2.10;0.16.0-SNAPSHOT: not found [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] [warn] Note: Unresolved dependencies path: [warn] com.twitter:scalding-core_2.10:0.16.0-SNAPSHOT [warn] +- myproject:myproject_2.10:0.1-SNAPSHOT [trace] Stack trace suppressed: run 'last myProject/:update' for the full output. [trace] Stack trace suppressed: run 'last myProject/:ssExtractDependencies' for the full output. [error] (myProject/:update) sbt.ResolveException: unresolved dependency: com.twitter#scalding-core_2.10;0.16.0-SNAPSHOT: not found [error] (myProject/:ssExtractDependencies) sbt.ResolveException: unresolved dependency: com.twitter#scalding-core_2.10;0.16.0-SNAPSHOT: not found
Scalding publishes jars on Sonatype Maven Central, so you really shouldn't need to mess with the Git ProjectRef
. You just need to get your sbt resolvers正确以便它可以找到罐子。在您的 build.sbt
:
resolvers ++= Seq(
Resolver.sonatypeRepo("releases"),
"Concurrent Maven Repo" at "http://conjars.org/repo"
)
级联 publishes to the Conjars repository 而不是中央,因此您很可能需要如图所示的附加解析器。
最初尝试这些,如果您仍然遇到未解决的错误,您可能需要添加 additional repos that Scalding uses,具体取决于您需要依赖的工件——您可能会 not 需要整个 scalding
超级神器,你可能 trim 下降到 scalding-core
、scalding-commons
、scalding-repl
,也许其他取决于需要你的项目。
所以要清楚,而不是 ProjectRef
和 dependsOn scaldingCore
,添加上面的解析器和类似这样的东西:
libraryDependencies ++= {
val scaldingVersion = "0.16.0-RC6"
Seq(
"com.twitter" %% "scalding-core" % scaldingVersion
, "com.twitter" %% "scalding-commons" % scaldingVersion
, "com.twitter" %% "scalding-repl" % scaldingVersion
)
}
以此类推