SBT 使用的默认存储库是什么?

编程入门 行业动态 更新时间:2024-10-25 22:29:59
本文介绍了SBT 使用的默认存储库是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我可以提供一个 ~/.sbt/repositories 文件来覆盖 SBT 用于解析依赖项的存储库.当文件存在时,不使用默认存储库.

I can provide a ~/.sbt/repositories file to override the repositories that SBT uses for resolving dependencies. When the file is present the default repositories aren't used.

SBT (0.13) 中的默认存储库是什么?我想将它们添加到我的存储库文件中,这样我就可以解决网络内外的依赖关系,而无需更改/移动文件.

What are the default repositories in SBT (0.13)? I want to add them to my repositories file so I can resolve dependencies inside and outside the network without having to change/move the file.

推荐答案

如果您想添加到默认存储库(而不是替换它们),我认为最简单的方法是创建一个 <~/sbt/0.13/中的code>.sbt文件,例如~/sbt/0.13/my-resolvers.sbt:

If you want to add to the default repositories (instead of replacing them), I think the easiest would be to create an .sbt file inside ~/sbt/0.13/, e.g. ~/sbt/0.13/my-resolvers.sbt:

resolvers += "Oracle Repository" at "download.oracle/maven"

否则,您可以通过 show externalResolvers 在 sbt 控制台中找到.条目存储在 sbt.boot.properties,最终作为启动器 jar 中的 sbt/sbt.boot.properties 文件(例如 ~/.sbt/launchers/0.13.17/sbt-launch.jar):

Otherwise, you can find out in the sbt console via show externalResolvers. The entries are stored in sbt.boot.properties, which ends up as the sbt/sbt.boot.properties file in the launcher jar (for example ~/.sbt/launchers/0.13.17/sbt-launch.jar):

[repositories] local local-preloaded-ivy: file:///${sbt.preloaded-${sbt.global.base-${user.home}/.sbt}/preloaded/}, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext] local-preloaded: file:///${sbt.preloaded-${sbt.global.base-${user.home}/.sbt}/preloaded/} maven-central typesafe-ivy-releases: repo.typesafe/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly sbt-ivy-snapshots: repo.scala-sbt/scalasbt/ivy-snapshots/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly

更多推荐

SBT 使用的默认存储库是什么?

本文发布于:2023-07-24 13:19:13,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1203683.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:SBT

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!