SBT 不使用基于 ssh 的解析器来解析依赖 [英] SBT doesn't use ssh-based resolver to resolve dependency
本文介绍了SBT 不使用基于 ssh 的解析器来解析依赖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的 build.sbt
中有以下定义:
I have the following definition in my build.sbt
:
libraryDependencies += "com.bubblefoundry" %% "something" % "0.1-SNAPSHOT"
resolvers += {
val privateKeyFile = new java.io.File(sys.env("HOME") + "/.ssh/id_rsa")
Resolver.ssh("Bubble Foundry", "bubblefoundry.com", "/usr/local/repository/") as ("peter", privateKeyFile) withPermissions("0644")
}
当 sbt 尝试解析依赖时,它失败了:
When sbt tries to resolve the dependency, it fails:
[info] Resolving com.bubblefoundry#something_2.10;0.1-SNAPSHOT ...
[warn] module not found: com.bubblefoundry#something_2.10;0.1-SNAPSHOT
[warn] ==== local: tried
[warn] /Users/peter/.ivy2/local/com.bubblefoundry/something_2.10/0.1-SNAPSHOT/ivys/ivy.xml
[warn] ==== Bubble Foundry: tried
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/com.bubblefoundry/something_2.10/0.1-SNAPSHOT/something_2.10-0.1-SNAPSHOT.pom
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.bubblefoundry#something_2.10;0.1-SNAPSHOT: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
它似乎甚至没有连接到服务器来查找依赖项.这是为什么?我做错了什么吗?
It appears like it didn't even connect to the server to look for the dependency. Why is that? Am I doing something wrong?
依赖已发布(使用相同的解析器定义)到 /usr/local/repository/com/bubblefoundry/...
The dependency has been published (using the same resolver definition) to /usr/local/repository/com/bubblefoundry/...
推荐答案
我找到了解决方案:从 ssh
切换到 sftp
:
I found a solution: switch from ssh
to sftp
:
resolvers += {
val privateKeyFile = new java.io.File(sys.env("HOME") + "/.ssh/id_rsa")
Resolver.sftp("Bubble Foundry", "bubblefoundry.com", "/usr/local/repository/") as ("peter", privateKeyFile)
}
这篇关于SBT 不使用基于 ssh 的解析器来解析依赖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文