- 官网下载maven
http://maven.apache.org/download.cgi
- 解压放到,一个指定目录
- 配置环境变量:
MAVEN_HOME -- 解压后的dir path -- %MAVEN_HOME%in
- 修改,mavenconfsetting.xml
*** 增加自定义的本地仓库:
<localRepository>D:apache-maven-3.6.1myRepository</localRepository>*** 配置阿里云仓库
<!-- 阿里云仓库 -->
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>http:
//maven.aliyun.com/nexus/content/repositories/central/</url>
</mirror>
<!-- 中央仓库
1
-->
<mirror>
<id>repo1</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name
for
this
Mirror.</name>
<url>http:
//repo1.maven.org/maven2/</url>
</mirror>
<!-- 中央仓库
2
-->
<mirror>
<id>repo2</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name
for
this
Mirror.</name>
<url>http:
//repo2.maven.org/maven2/</url>
</mirror>
- idea配置:
*** 路径:file -- setting -- maven *** 配置: --- Maven home directory: 【D:/apache-maven-3.6.1】your maven dir --- User settings file: D:apache-maven-3.6.1confsettings.xml 【your maven dir confsetting.xml】Override【打钩】
*** aplay -- ok