解决IDEA无法下载maven依赖的问题 | 您所在的位置:网站首页 › idea建包不分级 › 解决IDEA无法下载maven依赖的问题 |
解决IDEA无法下载maven依赖的问题 今天新建一个springboot项目时,项目建好后,在IDEA下载依赖包时,下载了很久都没有下载完,后来仔细一看,是下载不了。 解决方法: 在项目的pom.xml文件上右键,弹出框中选择maven,再选择open 'settings.xml' 或者是 create 'settings.xml' ,操作如图: 在该文件中填入如下内容: xmlns:xsi="http://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">
nexus internal nexus repository
http://repo.maven.apache.org/maven2 central
xmlns:xsi="http://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">
nexus internal nexus repository
http://repo.maven.apache.org/maven2 central
重新右键pom.xml文件,选择 maven ,选择 Reimport 即可下载依赖。操作步骤及settings.xml文件内容如图: settings.xml文件内容: 至此,依赖依法下载的问题已经解决。。 疑惑:将settings.xml文件中的替换成如下内容,竟然也无法下载依赖(但看网上博客说会让下载速度变快的)
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
|
CopyRight 2018-2019 实验室设备网 版权所有 |