解析Maven的settings.xml文件
一、镜像问题
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文件的更多相关文章
- maven设置------settings.xml文件学习
https://blog.csdn.net/tomato__/article/details/13025187 快速预览 maven的配置文件为settings.xml,在下面路径中可以找到这个文件, ...
- Maven中settings.xml文件各标签含义
原文地址:http://www.cnblogs.com/jingmoxukong/p/6050172.html?utm_source=gold_browser_extension settings.x ...
- maven的settings.xml文件
settings.xml是maven的配置文件.一般我们在网上下载的maven包解压以后,conf文件里面的有个setting.xml文件,通常这个settings.xml文件中会有你的本地仓库会在哪 ...
- [转] 分享一个快的飞起的maven的settings.xml文件
<?xml version="1.0"?> <settings> <localRepository>/home/yizhen/.m2/repos ...
- 分享一个快的飞起的maven的settings.xml文件
<?xml version="1.0"?> <settings> <localRepository>/home/yizhen/.m2/repos ...
- 较快的maven的settings.xml文件
<?xml version="1.0" encoding="UTF-8"?> <settings> <!-- <localR ...
- Maven的settings.xml文件结构之mirrors
Maven的远程库提供大量构件,供Maven项目直接下载使用.对于一个Maven项目,如果没有特别声明,默认使用Maven的central库,url如下: http://repo.maven.apac ...
- maven在windows环境下加载settings.xml文件
今天发现maven在windows环境下加载的settings.xml文件是c:下的,就算修改conf下的settings.xml里的<localRepository>给他明确指向也没用.
- Maven入门2-pom.xml文件与settings.xml文件
Maven入门2-pom.xml文件与settings.xml文件 本文内容来源于官网文档部分章节,settings.xml文件:参考http://maven.apache.org/settings. ...
随机推荐
- Go-开发环境搭建
02-开发环境搭建 目录 一 下载地址 二 安装 Linux安装 Windows安装 Mac安装 三 测试安装 四 命令介绍 基本介绍 build 和 run 命令 get 命令 一 下载地址 安 ...
- 并发与高并发(二)-JAVA内存模型
一.java内存模型(JMM)-同步操作与规则 它描述的是一组规则或规范,通过这组规范定义了程序中各个变量(包括实例字段,静态字段和构成数组对象的元素)的访问方式.一个线程如何和何时能看到其他线程共享 ...
- Ubuntu16装Flash
第一种方法: 1)下载flash的tar.gz压缩包.(以·tar.gz为后缀的文件是一种压缩文件,在Linux和macOS下常见,Linux和macOS都可以直接解压使用这种压缩文件) https: ...
- memcached安装使用相关-php
1.windows下面: 为什么memcache官方没有for windows的版本下载地址,现在怎么办? https://segmentfault.com/q/1010000002219198 32 ...
- 天融信(NAT)地址转换端口映射配置
目的地址为公司的公网地址 服务:选择或者自己定义一个端口号,就是要映射到服务器上的那个端口号 目的地址转换为:服务器ip 目的端口转换为:选择定义的服务(端口号) 规则描述:随便写
- vim的背景配置
1.vim背景颜色的配置 在usr/share/vim/vim74/colors 目录下有可以配置的颜色方案,可以查看: 命令:vim/etc/vimrc 打开vim的配置文件, 在最后加入一 ...
- Python_运维中常用的20个库和模块
1.psutil是一个跨平台库(https://github.com/giampaolo/psutil)能够实现获取系统运行的进程和系统利用率(内存,CPU,磁盘,网络等),主要用于系统监控,分析和系 ...
- tarjan通俗易懂题
洛谷2661 https://www.luogu.org/problemnew/show/P2661 分析:求缩点后成环中,环大小最小的size #include<bits/stdc++.h&g ...
- Linux文件属性和权限
Linux文件属性 第一栏:表示文件类型和权限 文件的类型: d:目录 -:文件 l:链接文件 b:可存储设备 c:可输入设备 第一组:表示拥有者权限 第二组:表示该组的权 ...
- Linux把内存挂载成硬盘提高读写速度
tmpfs是一种虚拟内存文件系统正如这个定义它最大的特点就是它的存储空间在VM里面,这里提一下VM(virtual memory),VM是由linux内核里面的vm子系统管理,现在大多数操作系统都采用 ...