加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

scala – 如何通过Nexus强制下载SBT插件和插件?

发布时间:2020-12-16 19:24:36 所属栏目:安全 来源:网络整理
导读:我想现在我已经想出如何通过Nexus强制下载项目依赖项. (我通过显式设置externalResolvers到只有一个值的Seq来做到这一点: override lazy val settings = super.settings ++ Seq( externalResolvers := Seq("Nexus repository" at "http://.../nexus/content
我想现在我已经想出如何通过Nexus强制下载项目依赖项. (我通过显式设置externalResolvers到只有一个值的Seq来做到这一点:

override lazy val settings = super.settings ++ Seq(
  externalResolvers := Seq("Nexus repository" at "http://.../nexus/content/groups/public/")
)

但是,如果我删除常春藤缓存,SBT仍会访问许多公共存储库以获取插件.理想情况下,我希望通过Nexus,以确保我们不依赖于这些存储库永远存在. (他们没有.)

有线索吗? (我在SBT 0.11.2)

解决方法

sbt 0.12为此目的增加了 Global repository setting.

Define the repositories to use by putting a standalone [repositories] section (see the 07001 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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读