unresolved dependencies - Error while importing SBT project

限于喜欢 提交于 2020-01-15 06:43:12

问题


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

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.


回答1:


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

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



来源:https://stackoverflow.com/questions/37288051/unresolved-dependencies-error-while-importing-sbt-project

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!