• sbt第一次运行下载jar包很慢解决办法


    一、补充sbt配置文件,添加下载路径

    文件结构如下:修改了sbtconfig.txt,repo.properties.

     

    sbtconfig.txt配置内容为:

    
    
    1. # Set the java args to higssss
    2. -Xmx512M
    3. -XX:MaxPermSize=256m
    4. -XX:ReservedCodeCacheSize=128m
    5.  
    6. # Set the extra SBT options
    7. -Dsbt.log.format=true
    8. -Dsbt.boot.directory=D:sbt-repositoryoot
    9. -Dsbt.global.base=D:sbt-repository
    10. -Dsbt.ivy.home=D:sbt-repository
    11. -Dsbt.repository.config=D:sbtconf epo.properties
    12. -Dsbt.repository.secure=false
    repo.properties.配置内容为:
    
    
    1. [repositories]  
    2.   local
    3.   Nexus osc : https://code.lds.org/nexus/content/groups/main-repo
    4.   Nexus osc thirdparty : https://code.lds.org/nexus/content/groups/plugin-repo/
    5.   typesafe: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly  
    6.   typesafe2: http://repo.typesafe.com/typesafe/releases/
    7.   sbt-plugin: http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/
    8.   sonatype: http://oss.sonatype.org/content/repositories/snapshots  
    9.   uk_maven: http://uk.maven.org/maven2/  
    10.   ibibli: http://mirrors.ibiblio.org/maven2/  
    11.   repo2: http://repo2.maven.org/maven2/
    12.  
    13.   comp-maven:http://mvnrepository.com/artifact/
    14.   store_cn:http://maven.oschina.net/content/groups/public/
    15.   store_mir:http://mirrors.ibiblio.org/maven2/
    16.   store_0:http://maven.net.cn/content/groups/public/
    17.   store_1:http://repo.typesafe.com/typesafe/ivy-releases/
    18.   store_2:http://repo2.maven.org/maven2/
    19.  
    20.   sbt-releases-repo: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
    21.   sbt-plugins-repo: http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
    22.   maven-central: http://repo1.maven.org/maven2/
     

    完成配置,重启sbt,等待,ok。就是更改了sbt的本地仓库地址和中心仓库地址。 

    补充阿里云中心地址。

    
    
    1. [repositories]
    2. local
    3. aliyun-maven: http://maven.aliyun.com/nexus/content/groups/public/
    4. aliyun-ivy: http://maven.aliyun.com/nexus/content/groups/public/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
    5. typesafe: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly
    6. sbt-plugin-ivy: http://dl.bintray.com/sbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
    7. dl-ivy: http://dl.bintray.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
    8. sonatype-oss-releases
    9. maven-central

    二、下载慢的jar包,复制路径用其他下载工具下载

    启动sbt

    把下载的jar包,复制到D:sbt-repositorycacheorg.scala-langscala-libraryjars对应的目录下面

    三、sbt资源库离线包下载路径

    sbt-0.13.15资源库离线包下载路径(已经下载好sbt、sbteclipse、assembly所需支持包),下载地址:链接:http://pan.baidu.com/s/1pLluQG7 密码:0m77

     
  • 相关阅读:
    LuoguP1016 旅行家的预算 (贪心)
    LuoguP2254 [NOI2005]瑰丽华尔兹 (单调队列优化DP)(用记忆化过了。。。)
    LuoguP2876 [USACO07JAN]解决问题Problem Solving (区间DP)(未完成)
    Luogu3275 [SCOI2011]糖果 (差分约束)
    Luogu1993 小K的农场 (差分约束)
    Luogu4427 [BJOI2018]求和 (树上差分)
    LuoguP1516 青蛙的约会 (Exgcd)
    POJ3903Stock Exchange (LIS)
    LuoguP1020 导弹拦截 (LIS)
    线性筛
  • 原文地址:https://www.cnblogs.com/yangcx666/p/8723894.html
Copyright © 2020-2023  润新知