直接创建maven项目的时候默认是从国外的服务器下载maven所需的依赖,有时需要翻墙,或者下载过慢,此时可以通过修改maven安装路径
/softwareInstall/maven/apache-maven-3.3.9/conf/setting.xml文件改成从国内jar仓库中下载所需依赖
在setting文件mirrors标签中添加
alimaven
central
aliyun maven
http://maven.aliyun.com/nexus/content/repositories/central/
repo1
central
Human Readable Name for this Mirror.
http://repo1.maven.org/maven2/
repo2
central
Human Readable Name for this Mirror.
http://repo2.maven.org/maven2/