解析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. ...
随机推荐
- OpenVINO在linux下安装
一.准备安装环境: 1.带命令行的64位centos操作系统,推荐极简安装模式,先不要安装GNOME桌面,避免和后面的openvino环境冲突 2.cpu要求 我目前是在服务器的虚拟机里面安装 注意如 ...
- ZJNU 1217 - 航线问题——高级
将所有航线的其中一边排序后,另一边进行类dp 定义一个数组c,c[i]表示在所有能够开通i条航线的组合中,位置序号最大的那条航线的序号的最小值 比如下面一个样例 1 3 2 4 3 1 4 2 此时对 ...
- pytorch(ch5
读取图片数据集::# -*- coding: utf-8 -*-import torch as tfrom torch.utils import dataimport osfrom PIL impor ...
- Spring--Spring 注入
Spring 提供了三种主要的装配机制: 在 XML 中进行显式配置 在 Java 中进行显式配置 隐式的 bean 发现机制和自动装配 Spring 从两个角度来实现自动化装配: 组件扫描:Spri ...
- fastDFS 文件系统搭建
1.单机版 https://www.cnblogs.com/chiangchou/p/fastdfs.html#_label3_0 2.集群版
- 笔记本安装SSD固态硬盘详细的优化设置
现在好多笔记本.台式机都加上固态硬盘了,固态硬盘的优势大家应该都有所了解了,在此略写一下固态硬盘优势: 1.启动快,没有电机加速旋转的过程: 2.不用磁头,快速随机读取,读延迟极小: 3.相对固 ...
- Hibernate一级缓存Session和对象的状态
建议看原文:https://blog.csdn.net/qq_42402854/article/details/81461496 一.session简介 首先,SessionFactor ...
- Linux基础篇九:用户管理
查看当前用户的ID信息(也可以查看其他用户的ID信息) 每个进程都会有一个用户身份运行 cat /etc/passwd 账号的操作: useradd (新建用户) 例题: groupadd s ...
- day35-子进程的开启
#1.异步非阻塞: import os from multiprocessing import Process def func(): print('子进程:',os.getpid()) if __n ...
- day25-网络基础
# 一.子网掩码: # 1. 作用是划分子网,就是将某个ip地址划分成网络地址和主机地址两部分. # 形式上等同于ip地址,也是一个32位二进制数, # 如果它的网络部分(前24位)全为1,主机部分( ...