我认为现在我想出了如何强制通过 Nexus 下载项目依赖项。 (我通过将 externalResolvers
显式设置为 Seq
来做到这一点,只有一个值:
override lazy val settings = super.settings ++ Seq(
externalResolvers := Seq("Nexus repository" at "http://.../nexus/content/groups/public/")
)
但是,如果我删除了 Ivy 缓存,SBT 仍然会访问许多公共(public)存储库来获取插件。理想情况下,我也希望通过 Nexus 来确保我们不会依赖这些存储库永远存在。 (他们没有。)
有什么线索吗? (我在 SBT 0.11.2 上)
最佳答案
添加 sbt 0.12 Global repository setting以此目的。
Define the repositories to use by putting a standalone
[repositories]
section (see the Launcher Specification page) in~/.sbt/repositories
and pass-Dsbt.override.build.repos=true
to sbt. Only the repositories in that file will be used by the launcher for retrieving sbt and Scala and by sbt when retrieving project dependencies.
关于scala - 如何强制通过 Nexus 下载 SBT 插件和插件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9885605/