未解决的依赖项 - 导入 SBT 项目时出错 [英] unresolved dependencies - Error while importing SBT project
问题描述
导入 SBT 项目时出错:
...
Error while importing SBT project:
...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.apache.hadoop#hadoop-mapreduce-client-app;2.6.0-cdh5.4.2: not found
[warn] :: org.apache.hadoop#hadoop-mapreduce-client-core;2.6.0-cdh5.4.2: not found
[warn] :: org.apache.hadoop#hadoop-mapreduce-client-jobclient;2.6.0-cdh5.4.2: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[trace] Stack trace suppressed: run 'last prj1/:update' for the full output.
[trace] Stack trace suppressed: run 'last prj2/:ssExtractDependencies' for the full output.
[trace] Stack trace suppressed: run 'last prj1/:ssExtractDependencies' for the full output.
[error] (prj1/:update) sbt.ResolveException: unresolved dependency: org.apache.hadoop#hadoop-mapreduce-client-app;2.6.0-cdh5.4.2: not found
[error] unresolved dependency: org.apache.hadoop#hadoop-mapreduce-client-core;2.6.0-cdh5.4.2: not found
[error] unresolved dependency: org.apache.hadoop#hadoop-mapreduce-client-jobclient;2.6.0-cdh5.4.2: not found
[error] (prj2/:ssExtractDependencies) sbt.ResolveException: unresolved dependency: org.apache.hadoop#hadoop-mapreduce-client-app;2.6.0-cdh5.4.2: not found
[error] unresolved dependency: org.apache.hadoop#hadoop-mapreduce-client-core;2.6.0-cdh5.4.2: not found
[error] unresolved dependency: org.apache.hadoop#hadoop-mapreduce-client-jobclient;2.6.0-cdh5.4.2: not found
[error] (prj1/:ssExtractDependencies) sbt.ResolveException: unresolved dependency: org.apache.hadoop#hadoop-mapreduce-client-app;2.6.0-cdh5.4.2: not found
[error] unresolved dependency: org.apache.hadoop#hadoop-mapreduce-client-core;2.6.0-cdh5.4.2: not found
[error] unresolved dependency: org.apache.hadoop#hadoop-mapreduce-client-jobclient;2.6.0-cdh5.4.2: not found
[error] Total time: 146 s, completed May 17, 2016 4:16:57 PM
有关如何解决问题的任何建议.导入在另一台机器上工作正常.我在 .ivy2 文件夹中看到了 jar 文件.
Any suggestions on how to go about resolving the issue. The import works fine on another machine. I see the jar files in .ivy2 folder.
推荐答案
我使用的是 Intellij、SBT.问题是必须正确指定存储库位置.要指定,请转到文件 -> 设置 ->(搜索 SBT),然后在 VM 参数中指定存储库.
I was using Intellij, SBT. The issue was that the repositories location had to be properly specified. To specify that go to File -> Settings -> (Search for SBT) then in the VM parameters you can specify the repostories.
-XX:MaxPermSize=1024M-Dsbt.override.build.repos=true-Dsbt.repository.config=/usr/local/basically_some_path/some_repo_file_name.repositories
-XX:MaxPermSize=1024M -Dsbt.override.build.repos=true -Dsbt.repository.config=/usr/local/basically_some_path/some_repo_file_name.repositories
IntelliJ IDEA 2016.1.2Build #IU-145.971,建于 2016 年 4 月 29 日JRE:1.8.0_76-release-b47 amd64JVM:JetBrains s.r.o 的 OpenJDK 64 位服务器虚拟机
IntelliJ IDEA 2016.1.2 Build #IU-145.971, built on April 29, 2016 JRE: 1.8.0_76-release-b47 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
这篇关于未解决的依赖项 - 导入 SBT 项目时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!