一、在maven官网下载
![](https://img-blog.csdnimg.cn/img_convert/f9a42c9ee3b17c26a8906fe74597ffd6.png)
![](https://img-blog.csdnimg.cn/img_convert/8d59b4f248bb3062c86973de5b9f4976.png)
下载apache-maven-...-bin.zip类型
二、配置本地仓库
解压下载的maven,在conf文件夹中找到settings可以用记事本打开
![](https://img-blog.csdnimg.cn/img_convert/5960aaf8d4363e40fa7f21aa4a06444b.png)
找到红框中的代码,在下面添加一行,配置自己的仓库
注意要把localRepository从主时钟拿出来
本地仓库需要使用一个非中文 没空格的目录
![](https://img-blog.csdnimg.cn/img_convert/77e6f7e8be0fb6cebe9b962c7adba373.png)
三、配置阿里云的镜像仓库
将原有蓝框中的代码注释掉
加入我们的配置
https://developer.aliyun.com/mvn/guide
可以在阿里云官网上复制,防止更新
![](https://img-blog.csdnimg.cn/img_convert/40483f42bc88bb3b4e2c5f0450faf432.png)
四、配置maven工程的基础jdk版本
找到profiles标签,添加下面的代码
![](https://img-blog.csdnimg.cn/img_convert/0c2b498b2ba0c24dfb15bd6138dfa699.png)
![](https://img-blog.csdnimg.cn/img_convert/f6a7a7ff8df7aa9926b8ee33ccaf88d1.png)
<profile>
<id>jdk-1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>
五、idea中修改
File--->settings--->Maven:改成自己设置的maven地址
![](https://img-blog.csdnimg.cn/img_convert/2cac604095d3dbdc6817a05552cd21a1.png)