在安装好Maven之后,默认的~/.m2目录下是没有maven仓库配置文件settings.xml的,默认使用的是官方的仓库,访问速度会非常慢,我们需要配置下国内的仓库。

创建~/.m2/settings.xml文件,文件内容如下:

<?xml version="1.0"?>
<settings>
<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>

其中使用的是阿里云的mirror,国内的下载速度非常快。

配置阿里云maven的更多相关文章

  1. 配置阿里云maven中央库

    <mirrors> <mirror> <id>nexus-aliyun</id> <mirrorOf>*</mirrorOf> ...

  2. 一:配置使用阿里云Maven库

    鉴于国内的网络环境,从默认 Maven 库下载 jar 包是非常的痛苦. 速度慢就不说了,还经常是下不下来,然后一运行就是各种 ClassNotFoundException,然后你得找到残留文件删掉重 ...

  3. 阿里云Maven配置,Maven仓库配置,Maven镜像配置

    阿里云Maven配置,Maven仓库配置,Maven镜像配置 ======================== 蕃薯耀 2018年1月29日 http://www.cnblogs.com/fanshu ...

  4. 教你配置使用阿里云 Maven 库,体验秒下 jar 包的快感

    鉴于国内的网络环境,从默认 Maven 库下载 jar 包是非常的痛苦. 速度慢就不说了,还经常是下不下来,然后一运行就是各种 ClassNotFoundException,然后你得找到残留文件删掉重 ...

  5. maven配置阿里云仓库进行下载

    maven阿里云仓库下载 为了解决maven在下载jar包的时候,速度比较慢的问题,可以配置阿里云仓库配置方式的进行下载,首先找到您安装的maven路径. 在conf文件夹下面有个settings.x ...

  6. 为Nexus配置阿里云代理仓库【转】

    Nexus默认远程仓库为https://repo1.maven.org/maven2/ 慢死,还常连不上. 可以添加阿里云代理仓库 URL:http://maven.aliyun.com/nexus/ ...

  7. maven 动态版本 aliyun阿里云Maven仓库地址——加速你的maven构建

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/20 ...

  8. Nexus Repository Manager OSS 2 配置阿里云私服做代理的坑

    安装 搭建 Nexus 私服很简单,官网下载,解压: 使用管理员权限打开cmd: > cd nexus---bundle\nexus--\bin > nexus.bat install # ...

  9. 【配置阿里云 I】申请配置阿里云服务器,并部署IIS和开发环境,项目上线经验

    https://blog.csdn.net/vapaad1/article/details/78769520 最近一年在实验室做web后端开发,涉及到一些和服务器搭建及部署上线项目的相关经验,写个帖子 ...

随机推荐

  1. SQL 练习22

    查询出只选修两门课程的学生学号和姓名 --方式1: SELECT Student.SId,Sname from Student WHERE SId in ( SELECT sid from sc GR ...

  2. SQL Server 判断数据库中是否存在表

    使用场景 可以反复的执行相同脚本 方式1:查询sysobjects表 if EXISTS (SELECT * from sysobjects WHERE name='test_table') DROP ...

  3. spring boot 整合JPA bean注入失败

    有时候报的错误让你匪夷所思,找错误得学会找根.源头在哪里? 比如:我们刚开始看的错误就是 org.springframework.beans.factory.UnsatisfiedDependency ...

  4. NOIP 模拟 $24\; \rm graph$

    题解 \(by\;zj\varphi\) 首先一个点能否选择的条件是 \(dis_{1,x}+dis_{x,n}=dis_{1,n}\) 正解是计算一条道路上的所有为 \(-1\) 边的选择范围,是个 ...

  5. Seata–分布式事务

    10.1 分布式事务基础 10.1.1 事务 事务指的就是一个操作单元,在这个操作单元中的所有操作最终要保持一致的行为,要么所有操作都成功,要么所有的操作都被撤销.简单地说,事务提供一种"要 ...

  6. C# 调用DOS 命令

    class NetWorkDeviceInfo { public static string GetDeviceInfo() { System.Diagnostics.Process p = new  ...

  7. C++ 计算MD5

    头文件: #pragma once #ifndef MD5_H #define MD5_H #include <string> #include <fstream> /* Ty ...

  8. uwp 之后台音频

    C# code 后台任务 ---------------------------- public sealed class BgTask : IBackgroundTask { #region 私有字 ...

  9. 【IDE】WebStorm常用快捷键

    WebStorm常用快捷键 1. ctrl + shift + n: 打开工程中的文件,目的是打开当前工程下任意目录的文件. 2. ctrl + j: 输出模板 3. ctrl + b: 跳到变量申明 ...

  10. Redis Jedis lua脚本

    参考:http://redisdoc.com/script/eval.htmlhttps://blog.csdn.net/diudiu2025/article/details/86483043fina ...