1、配置Mawen环境变量
1.1、MAWEN_HOME配置
![](https://img-blog.csdnimg.cn/4c39dbea1aee44dbb5167fa84567c83a.png)
![](https://img-blog.csdnimg.cn/38ae3c0c2db745f9baed01e542d612ad.png)
![](https://img-blog.csdnimg.cn/53a8068e9f424e1c9ed21b4f0386efb3.png)
2、Maven的conf目录下,配置settings.xml文件
2.1、配置本地仓库文件夹的位置
<!-- 配置本地仓库路径的,千万不配置错误!! -->
<localRepository>E:\apache-maven-3.6.1\repository</localRepository>
2.2、配置阿里云服务器地址
<!--
配置的是远程仓库的地址,配置的阿里云,国内的服务器
没有的jar包,从远程仓库中下载
没有这个配置,自动从中央仓库下载jar (国外)
-->
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
<mirrorOf>central</mirrorOf>
</mirror>
3、IDEA绑定Maven
![](https://img-blog.csdnimg.cn/dab4c7aadae8400fb4d7dcaeb97ca681.png)
![](https://img-blog.csdnimg.cn/402e7dbd9da04638b82b88b69d6d218c.png)
-DarchetypeCatalog=local
-DarchetypeCatalog=internal
两个写法都是可以的