美文网首页
第五章 SBT国内源配置

第五章 SBT国内源配置

作者: 比特阳 | 来源:发表于2017-01-14 22:09 被阅读0次

参考

网上找了许多,都是oschina的源,阿里的源也试了,都很慢。最终修改源列表如下,半分钟就好了。具体是哪一行发生了作用,就不清楚了。

~/.sbt$ cat repositories
[repositories]
local
aliyun-nexus: http://maven.aliyun.com/nexus/content/groups/public/  
ibiblio-maven: http://maven.ibiblio.org/maven2/
typesafe-ivy: https://dl.bintray.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
uk-repository: http://uk.maven.org/maven2/
jboss-repository: http://repository.jboss.org/nexus/content/groups/public/

osc: http://maven.oschina.net/content/groups/public/
typesafe: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
sonatype-oss-releases
maven-central
sonatype-oss-snapshots

测试一下,启动迅速,再也不用等待了。

~/.sbt$ sbt
[info] Set current project to root--sbt (in build file:/home/bit/.sbt/)
> 

==============
20170115更新
在sbt编译spark的时候又报错了,连不上服务器。精简一下文件,不是越多越好,直接定位到阿里云提供的源即可。

$ dpkg -L sbt
/usr/share/sbt-launcher-packaging/conf/sbtopts
/usr/share/sbt-launcher-packaging/conf/sbtconfig.txt

这两个文件增加一行,让源生效:
-Dsbt.override.build.repos=true
$ cat repositories
[repositories]
local
aliyun-nexus: http://maven.aliyun.com/nexus/content/groups/public/  
typesafe: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
sonatype-oss-releases
maven-central
sonatype-oss-snapshots

相关文章

  • SBT增加国内镜像并生效

    第五章 SBT国内源配置 2017-06-1314:07:07前几天执行:sbt update失败主要是proje...

  • 第五章 SBT国内源配置

    参考 http://www.jianshu.com/p/bd37bb185e8b http://www.itdad...

  • sbt卡住的解决办法,sbt设置代理

    My Blog: sbt卡住的解决办法,sbt设置代理 方法一:设置国内源(失败) 创建~/.sbt/reposi...

  • SBT 设置国内源

    原因 由于总所周知的问题,在国内使用SBT是极其心累的事情。 解决 切换SBT的仓库源地址,改为使用国内的。 网上...

  • yum切换国内源

    yum切换国内源 配置dns服务器 配置yum的源 参考链接: yum配置国内源 备份/etc/yum.repos...

  • sbt配置简洁方便的lib依赖

    问题 众所周知在撰写sbt的build.sbt 配置时随着子项目的和依赖的lib逐渐增加,build.sbt会变得...

  • 从零搭建基于sbt和IDEA的远程spark调试工程

    接着之前文章 sbt 以及 IDEA sbt 插件安装配置教程 我们可以利用sbt和IDEA搭建一套可以远程调用s...

  • SBT实用配置

    配置repo 编辑文件~/.sbt/repositories,增加repo地址。 可以测下各个repo的速度,把速...

  • springboot环境使用

    idea maven创建springboot项目 maven的settings.xml配置国内源配置: 配置pro...

  • sbt提速

    ~/.sbt/repositories 设置所有项目均使用全局仓库配置,忽略项目自身仓库配置 3 常用交互命令

网友评论

      本文标题:第五章 SBT国内源配置

      本文链接:https://www.haomeiwen.com/subject/lwqybttx.html