分享

spark开发环境详细教程2:window下sbt库的设置

本帖最后由 pig2 于 2017-8-24 22:01 编辑
问题导读

1.sbt在IntelliJ IDEA里面比较慢,该如何解决?
2.如何在window里面更改阿里源?
3.如何在Linux里更改源?




相关文章
spark开发环境详细教程1:IntelliJ IDEA使用详细说明
http://www.aboutyun.com/forum.php?mod=viewthread&tid=22320

spark开发环境详细教程2:window下sbt库的设置
http://www.aboutyun.com/forum.php?mod=viewthread&tid=22409

spark开发环境详细教程3:IntelliJ IDEA创建项目
http://www.aboutyun.com/forum.php?mod=viewthread&tid=22410

spark开发环境详细教程4:创建spark streaming应用程序
http://www.aboutyun.com/forum.php?mod=viewthread&tid=22465


sbt在IntelliJ IDEA里面大多情况下还是比较慢的,有两种解决办法:
1.提前下载放到缓存库里
2.更改库为阿里源

1.提前下载放到缓存库里

sbt安装后会在用户路径下看到两个文件夹。.ivy2、.sbt

sbt.jpg

下载的库,可以放到

C:\Users\aboutyun\.ivy2\cache里面

库.jpg

2.更改库
有的时候我们下载的非常慢,另外一种方法更改库。Linux下是在~/.sbt下修改。
window下C:\Users\aboutyun\.sbt修改repositories

sbtrep.jpg

库内容
[mw_shl_code=bash,true][repositories]
  local
  Nexus aliyun : http://maven.aliyun.com/nexus/content/groups/public/
  Nexus osc : http://maven.oschina.net/content/groups/public/  
   Nexus osc thirdparty : http://maven.oschina.net/content/repositories/thirdparty/  
  maven-central
  typesafe-ivy-releases: https://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
  sbt-ivy-snapshots: https://repo.scala-sbt.org/scalasbt/ivy-snapshots/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly

[boot]
  directory: ${sbt.boot.directory-${sbt.global.base-${user.home}/.sbt}/boot/}

[ivy]
  ivy-home: ${sbt.ivy.home-${user.home}/.ivy2/}
  checksums: ${sbt.checksums-sha1,md5}
  override-build-repos: ${sbt.override.build.repos-false}
  repository-config: ${sbt.repository.config-${sbt.global.base-${user.home}/.sbt}/repositories}[/mw_shl_code]



参考
windows+idea+sbt 如何使用国内的镜像
http://www.aboutyun.com/forum.php?mod=viewthread&tid=22376





已有(1)人评论

跳转到指定楼层
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条