原因:被墙的原因,奇怪的是有些包能下载有些包不能下载,比如其中一个不能下载的包,开启vpn后就能下载
解决办法:
1、打开Idea,在项目上右键,底部选择mevan
2、选择open 'settings.xml' 或 create 'settings.xml'
3、复制下面配置代码,确定重新打开下载
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
alimaven
aliyun maven
http://maven.aliyun.com/nexus/content/groups/public/
central
uk
central
Human Readable Name for this Mirror.
http://uk.maven.org/maven2/
CN
OSChina Central
http://maven.oschina.net/content/groups/public/
central
nexus
internal nexus repository
http://repo.maven.apache.org/maven2
central