scala sbt及repo配置

3 篇文章 0 订阅
1 篇文章 0 订阅

#关于sbt的配置

  1. repos 源更改
    http 允许InsecureProtoco,具体的 repos后添加",allowInsecureProtocol"
    常用的repos:
huaweicloud-maven: https://repo.huaweicloud.com/repository/maven/
aliyun-maven-repo: https://maven.aliyun.com/repository/public/
aliyun-nexus: https://maven.aliyun.com/nexus/content/groups/public/

#部分情况下会优先选择此库,导致速度极慢,scalajs的部分插件只在此库中用,必须开启
#maven-central: https://repo1.maven.org/maven2/

typesafe: https://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly

sbt-plugin-repo: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
sbt-plugin-repo1: https://dl.bintray.com/sbt/sbt-plugin-releases, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  1. sbt 配置更改
    repos 生效需要修改 sbt配置,sbt安装目录下的conf中:
repositories(设定repos)   
sbtconfig.txt(修改sbt启动配置参数,for win
sbtopts(sbt启动配置,for linux/mac)

在配置文件中添加:
-Dsbt.override.build.repos=true
-Dsbt.repository.config=<sbt 安装路径>/sbt/conf/repositories
  1. idea配置
    idea中使用需要在 sbt jvm中添加:
-Dsbt.override.build.repos=true
-Dsbt.repository.config=<sbt 安装路径>/sbt/conf/repositories
  1. 关于项目中project中sbt.version的理解
    sbt相关命令执行时会自动切换为配置中的sbt version
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值