spark-SBT本地仓库更改

SBTIDEA中配置仓库,和配置下载链接

第一步:指定SBT的jar包


第二步:修改jar包中的/sbt/sbt.boot.properties文件配置

可直接用rar打开,修改覆盖,在这里我用的办法是

将该文件右键鼠标打开方式,我选择的是IDEA,这样在修改保存,关掉的时候,rar会提示我是否覆盖

[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: 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
local
typesafe-ivy-releases: https://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
maven-central

[boot]
#  directory: ${sbt.boot.directory-${sbt.global.base-${user.home}/.sbt}/boot/}
#  directory: H:\sbt\.sbt\boot\
  directory: F:\sbt_Package\sbt\boot\

[ivy]
#  ivy-home: ${sbt.ivy.home-${user.home}/.ivy2/}
  ivy-home: F:\sbt_Package\ivy-repository\
  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}
  repository-config: F:\sbt_Package\sbt\repositories

repositories是远程仓库地址

Boot就是创建sbt目录(该目录可自己创建,然后在该目录下面创建repositories文件)

 

第三步:配置repositories文件

配置了OSCChina的国内仓库,会优先在这里下载,没有的话去官网仓库下载;

在下载jar的时候发现,大多数jar包会去官方 仓库下载,一些常用的可以在OSC上下载到,毕竟OSC是maven仓库地址。

[repositories]
local
oschina nexus:http://maven.oschina.net/content/groups/public/
Nexus osc thirdparty : http://maven.oschina.net/content/repositories/thirdparty/
typesafe: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
maven-central
sbt-plugins-repo: http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
play: http://private-repo.typesafe.com/typesafe/maven-releases/
sonatype-snapshots: https://oss.sonatype.org/content/repositories/snapshots
typesafe-releases: https://repo.typesafe.com/typesafe/releases
typesafe-ivy-releasez: https://repo.typesafe.com/typesafe/ivy-releases, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]

第四步:配置代理

H:\sbt\conf\sbtconfig.txt文件中

# Set the java args to high

-Xmx512M

-XX:MaxPermSize=256m

-XX:ReservedCodeCacheSize=128m



# Set the extra SBT options

-Dsbt.log.format=true

-Dhttp.proxyHost=proxy
-Dhttp.proxyPort=8080

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值