注:oschina已失效

Maven 远程仓库

    <mirror>
<id>ui</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://uk.maven.org/maven2/</url>
</mirror>
<mirror>
<id>ibiblio</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>
</mirror>
<mirror>
<id>jboss-public-repository-group</id>
<mirrorOf>central</mirrorOf>
<name>JBoss Public Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
</mirror>
<mirror>
<id>CN</id>
<name>OSChina Central</name>
<url>http://maven.oschina.net/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>repo2</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo2.maven.org/maven2/</url>
</mirror>

说明:

  1. 上面的地址前面三个只适合maven,sbt的ivy不适合,sbt需要的jar包在里面会找不到,从下面的配置可以看出。
  2. oschina的镜像虽然都适用,但是访问速度真是慢
  3. 最全面的仓库在校园网完全没办法访问

SBT

修改SBT的远程仓库地址有很多办法,这里采用直接修改sbt-lauch.jar/sbt/sbt.boot.properties的方式

[scala]
version: ${sbt.scala.version-auto} [app]
org: ${sbt.organization-org.scala-sbt}
name: sbt
version: ${sbt.version-read(sbt.version)[0.13.9]}
class: ${sbt.main.class-sbt.xMain}
components: xsbti,extra
cross-versioned: ${sbt.cross.versioned-false}
resources: ${sbt.extraClasspath-} [repositories]
local
Local-Maven-Repository: file:///D:/Java/java-repositories, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]
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]
maven-central
uk-repository: http://uk.maven.org/maven2/
jboss-repository: http://repository.jboss.org/nexus/content/groups/public/ [boot]
directory: ${sbt.boot.directory-${sbt.global.base-${user.home}/.sbt}/boot/} [ivy]
ivy-home: D:/Java/java-repositories
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}

说明:

  1. repositories 修改远程仓库地址
  2. typesafe-ivy:目的是兼容ivy地址
  3. ivy-home:指的是本地仓库地址,就是jar存在哪里

___________________________________________

在{maven home/conf/settings.xml}中,在<mirror>节点中添加一下镜像

<mirror>

<id>alimaven</id>

<mirrorOf>central<mirrorOf>

<name>aliyun maven</name>

<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>

</mirror>

——————————————————————————————

修改

~/.m2/settings.xml

没有此文件需要自行创建个

<settings xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<servers/>
<mirrors>
<mirror>
<id>CN</id>
<name>OSChina Central</name>
<url>http://maven.oschina.net/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
<proxies/>
<profiles/>
<activeProfiles/>
</settings>

主要是添加mirros

<mirrors>
<mirror>
<id>CN</id>
<name>OSChina Central</name>
<url>http://maven.oschina.net/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>

同时在线查找包  http://maven.oschina.net/  类似maven官网

——————————————————————

/mavenhome/conf/settings.xml

<mirrors>

  <mirror>

	<id>alimaven</id>

	<mirrorOf>central<mirrorOf>

	<name>aliyun maven</name>

	<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>

	</mirror>

  <mirror>
<id>ui</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://uk.maven.org/maven2/</url>
</mirror>
<mirror>
<id>ibiblio</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>
</mirror>
<mirror>
<id>jboss-public-repository-group</id>
<mirrorOf>central</mirrorOf>
<name>JBoss Public Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
</mirror>
<mirror>
<id>CN</id>
<name>OSChina Central</name>
<url>http://maven.oschina.net/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>repo2</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo2.maven.org/maven2/</url>
</mirror> <mirror>
  <id>nexus-osc</id> 
  <mirrorOf>*</mirrorOf>
  <name>Nexus osc</name>
  <url>http://maven.oschina.net/content/groups/public/</url> </mirror> <!-- mirror
| Specifies a repository mirror site to use instead of a given repository. The repository that
| this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
| for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
|
<mirror>
<id>mirrorId</id>
<mirrorOf>repositoryId</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://my.repository.com/repo/path</url>
</mirror>
-->
</mirrors>
~/.m2/settings.xml

<mirrors>
<mirror>
<id>nexus-osc</id>
<mirrorOf>central</mirrorOf><!--这里指定只屏蔽central仓库-->
<name>Nexus osc</name>
<url>http://maven.oschina.net/content/groups/public/</url>
</mirror>
<mirror>
<id>nexus-osc-thirdparty</id>
<mirrorOf>thirdparty</mirrorOf>
<name>Nexus osc thirdparty</name>
<url>http://maven.oschina.net/content/repositories/thirdparty/</url>
</mirror> <mirror>
<id>ui</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://uk.maven.org/maven2/</url>
</mirror>
<mirror>
<id>ibiblio</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>
</mirror>
<mirror>
<id>jboss-public-repository-group</id>
<mirrorOf>central</mirrorOf>
<name>JBoss Public Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
</mirror>
<mirror>
<id>CN</id>
<name>OSChina Central</name>
<url>http://maven.oschina.net/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>repo2</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo2.maven.org/maven2/</url>
</mirror> </mirrors>
 

如何解决Maven速度慢的更多相关文章

  1. Ubuntu 14.04 下解决maven访问速度慢问题

    参考: maven国内镜像(maven下载慢的解决方法) maven中央仓库访问速度太慢的解决办法 Ubuntu 14.04 下解决maven访问速度慢问题 在启动OVX的时候,由于sh脚本中需要使用 ...

  2. 解决maven 在intellij IDEA 下载依赖包速度慢的问题

    解决maven 在intellij IDEA 下载依赖包速度慢的问题 参考:https://www.jianshu.com/p/63a593700ebc

  3. 如何解决Maven和SBT下载Jar包太慢

    国内:如何解决Maven和SBT下载Jar包太慢 Maven 远程仓库 <mirror> <id>ui</id> <mirrorOf>central&l ...

  4. 解决Maven并行编译中出现打包错误问题的思路

    解决Maven并行编译中出现打包错误问题的思路 并行构建 Maven 3.x 提供了并行编译的能力,通过执行下列命令就可以利用构建服务器的多线程/多核性能提升构建速度: mvn -T 4 clean ...

  5. 解决Maven关于本地jar包的打包处理

    在使用maven进行jar包管理时,通过我们都是通过maven去下载一些jar包,但有些jar在maven上没有,所以就就可能在本地直接手动加入一些需要用到的外部jar包.但如果我们用maven pa ...

  6. 解决Maven默认仓库没有的jar下载(二)

    前言: 在 “解决Maven不能下载“oracle.aspectjweaver.com.springsource.net.sf.cglib”jar(http://www.cnblogs.com/wql ...

  7. 解决Maven不能下载“oracle、aspectjweaver、com.springsource.net.sf.cglib”jar

    鸣谢网址:http://www.cnblogs.com/dongyangbolg/p/3455422.html http://www.cnblogs.com/ysq0908/p/4737977.htm ...

  8. 解决maven仓库有jar包但是maven程序无法下载仓库jar包

    话说,这个问题困扰了我两个多月了已经~~~ 后来发现不知道被谁动了,把我的仓库没有放到仓库组里面~~~ 用admin登录进去,默认密码是admin123,然后看截图操作吧. (记得删除你本地报错说** ...

  9. [转]解决Maven报错"Plugin execution not covered by lifecycle configuration"

    [转]解决Maven报错"Plugin execution not covered by lifecycle configuration" 导入Myabtis源码后,POM文件会报 ...

随机推荐

  1. React + Reflux 渲染性能优化原理

    作者:ManfredHu 链接:http://www.manfredhu.com/2016/11/08/23-reactRenderingPrinciple 声明:版权所有,转载请保留本段信息,否则请 ...

  2. 全文搜索引擎 Elasticsearch (三)logstash-input-jdbc同步数据 到elasticsearch

    参考链接: 1, 源码地址,官方介绍 2, logstash-input-jdbc使用建议 3, 官网介绍例子,使用 logstash-input-jdbc 到 elasticsearch 一.安装 ...

  3. 21:包含min函数的栈

    import java.util.Stack; /** * 面试题21:包含min函数的栈 * 定义栈的数据结构,请在该类型中实现一个能够得到栈最小元素的min函数. */ public class ...

  4. 深度学习基础系列(四)| 理解softmax函数

    深度学习最终目的表现为解决分类或回归问题.在现实应用中,输出层我们大多采用softmax或sigmoid函数来输出分类概率值,其中二元分类可以应用sigmoid函数. 而在多元分类的问题中,我们默认采 ...

  5. 删除或修改eclipse中svn的账号密码

    由于eclipse没有自带的管理svn账号的功能,我也没有找到相关的插件,要是有朋友知道的话也可以跟我说下哦!以下是关于自己手动去删除eclipse 软件的 svn账号,以便切换项目的时候去更换svn ...

  6. Revit二次开发示例:APIAppStartup

    下面介绍一个在Revit启动和关闭时调用外部程序的例子.   Revit调用的dll主程序: using System; using System.Collections.Generic; using ...

  7. 决策树(CART)

    CART算法全称是分类回归算法,(Classification And Regression Tree),他与ID3.C4.5的不同在于: 1.既可以处理分类问题又可以处理回归问题 2.使用基尼系数作 ...

  8. [BZOJ3595][SCOI2014]方伯伯的OJ(裂点Splay)

    用一棵Splay按名次维护每个点,其中一个节点对应初始编号连续的一段区间,这样总节点数是$O(m)$的. 对每个编号记录这个点被Splay的那个节点维护,用std::map存储,只记录被修改的点. 每 ...

  9. 通过Nuget添加Mvvmlight框架发生错误

    IDE:Visual Studio 2013 场景:通过Nuget添加Mvvmlight框架 具体错误: 解决办法:删除Nuget,然后添加新版本的Nuget Package Manager 具体操作 ...

  10. (转)park1.0.0生态圈一览

    转自博客:http://www.tuicool.com/articles/FVBJBjN Spark1.0.0生态圈一览 Spark生态圈,也就是BDAS(伯克利数据分析栈),是伯克利APMLab实验 ...