一、镜像问题

1、为什么需要配置maven国内镜像?

  • 在不配置镜像的情况下,maven默认会使用中央库.--https://repo.maven.apache.org/maven2
  • maven中央库在国外,有时候访问会很慢,尤其是下载较大的依赖的时候,有时候速度会很慢,甚至会出现无法下载的情况。
  • 为了解决依赖下载速度的问题,需要配置maven国内镜像。

2、配置国内maven镜像(阿里云镜像)

<mirrors>
<!-- 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>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>

3、OSC MAVEN仓库目前已停止提供服务。

以下地址已访问不了:

http://maven.oschina.net/content/groups/public

http://maven.oschina.net/content/repositories/thirdparty/

<?xml version="1.0"?>
<settings>
<localRepository>D:\repository</localRepository><!--需要改成自己的maven的本地仓库地址-->
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>nexus</id>
<name>local private nexus</name>
<url>http://maven.oschina.net/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories> <pluginRepositories>
<pluginRepository>
<id>nexus</id>
<name>local private nexus</name>
<url>http://maven.oschina.net/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile></profiles>
</settings>

解析Maven的settings.xml文件的更多相关文章

  1. maven设置------settings.xml文件学习

    https://blog.csdn.net/tomato__/article/details/13025187 快速预览 maven的配置文件为settings.xml,在下面路径中可以找到这个文件, ...

  2. Maven中settings.xml文件各标签含义

    原文地址:http://www.cnblogs.com/jingmoxukong/p/6050172.html?utm_source=gold_browser_extension settings.x ...

  3. maven的settings.xml文件

    settings.xml是maven的配置文件.一般我们在网上下载的maven包解压以后,conf文件里面的有个setting.xml文件,通常这个settings.xml文件中会有你的本地仓库会在哪 ...

  4. [转] 分享一个快的飞起的maven的settings.xml文件

    <?xml version="1.0"?> <settings> <localRepository>/home/yizhen/.m2/repos ...

  5. 分享一个快的飞起的maven的settings.xml文件

    <?xml version="1.0"?> <settings> <localRepository>/home/yizhen/.m2/repos ...

  6. 较快的maven的settings.xml文件

    <?xml version="1.0" encoding="UTF-8"?> <settings> <!-- <localR ...

  7. Maven的settings.xml文件结构之mirrors

    Maven的远程库提供大量构件,供Maven项目直接下载使用.对于一个Maven项目,如果没有特别声明,默认使用Maven的central库,url如下: http://repo.maven.apac ...

  8. maven在windows环境下加载settings.xml文件

    今天发现maven在windows环境下加载的settings.xml文件是c:下的,就算修改conf下的settings.xml里的<localRepository>给他明确指向也没用.

  9. Maven入门2-pom.xml文件与settings.xml文件

    Maven入门2-pom.xml文件与settings.xml文件 本文内容来源于官网文档部分章节,settings.xml文件:参考http://maven.apache.org/settings. ...

随机推荐

  1. JS事件高级

    1. 注册事件(绑定事件) 1.1注册事件概述 1.2 addEventListener 事件监听方式 1.3 attachEvent 事件监听方式 1.4 注册事件兼容性解决方案 2. 删除事件(解 ...

  2. 17.3.15---C语言详解FILE文件操作

    FILE 是 C语言文件结构定义, 打开文件和文件操作要用到这类结构.可以看成变量类型,用于变量声明.这个是一种数据结构类型,用来表示一个文件的相关信息,如果定义了一个文件指针,就用这个指针来指向某个 ...

  3. 吴裕雄--天生自然 pythonTensorFlow自然语言处理:Attention模型--训练

    import tensorflow as tf # 1.参数设置. # 假设输入数据已经转换成了单词编号的格式. SRC_TRAIN_DATA = "F:\\TensorFlowGoogle ...

  4. 1.Jenkins基本安装及插件离线安装

    Jenkins基本安装 Jenkins官方地址:https://jenkins.io/zh/,下载最新版本,需要依赖对应的jdk版本才可以正常运行. dockerfile文件构建docker镜像 FR ...

  5. 限制客户端同账号同IP多终端登录

    打开SoftEther VPN Server Manager工具,连接上节点 1.管理虚拟HUB--管理用户--双击用户--安全策略--最大多重登录数设置为1 2.管理虚拟HUB--虚拟HUB属性-- ...

  6. 吴裕雄--天生自然C语言开发:函数

    return_type function_name( parameter list ) { body of the function } /* 函数返回两个数中较大的那个数 */ int max(in ...

  7. C2. Power Transmission (Hard Edition)(线段相交)

    This problem is same as the previous one, but has larger constraints. It was a Sunday morning when t ...

  8. rest framework-restful介绍-长期维护

    ###############   django框架-rest framework    ############### # django rest framework 框架 # 为什么学习这个res ...

  9. Spring @Column的注解详解

    就像@Table注解用来标识实体类与数据表的对应关系类似,@Column注解来标识实体类中属性与数据表中字段的对应关系. 该注解的定义如下: @Target({METHOD, FIELD}) @Ret ...

  10. iOS仿抖音节拍界面、Swift,MVVM架构完整项目、日历demo、滚动切换分类等源码

    iOS精选源码 在Object-C中学习数据结构与算法之排序算法 日历-基本功能都有的日历 选择日期 上下月 动画 仿抖音卡节拍界面 垂直.水平方向皆可滚动.header悬浮的列表视图 Auto La ...