0%

Maven3下载配置

下载

解压D盘下某目录,如D:\xiao\work\apache-maven-3.8.4

安装

环境变量

1
2
3
4
5
6
添加变量
MAVEN_HOME
D:\xiao\work\apache-maven-3.8.4

PATH添加
%MAVEN_HOME%\bin

测试

cmd 运行mvn -v查看版本,检测是否安装成功

配置

编辑D:\xiao\work\apache-maven-3.8.4\conf\settings.xmllocalRepository的路径改为maven的repository文件夹,如D:\xiao\work\Maven\pack

构建测试

mvn help:system

1
2
3
4
5
6
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.548 s
[INFO] Finished at: 2021-11-24T10:18:56+08:00
[INFO] ------------------------------------------------------------------------

镜像

1
2
3
4
5
6
<mirror>
<id>nexus-tencentyun</id>
<mirrorOf>*</mirrorOf>
<name>Nexus tencentyun</name>
<url>http://mirrors.cloud.tencent.com/nexus/repository/maven-public/</url>
</mirror>

参考