【Maven无法使用】Could not transfer artifactorg.springframework.boot:spring-boot-starter:2.0.1.RELEASE

Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.1.RELEASE from/to nexus-aliyun (https://maven.aliyun.com/repository/public): Connect to maven.aliyun.com:443 [maven.aliyun.com/59.110.251.9, maven.aliyun.com/182.92.29.54, maven.aliyun.com/182.92.29.13, maven.aliyun.com/59.110.251.4, maven.aliyun.com/182.92.29.40, maven.aliyun.com/182.92.29.53, maven.aliyun.com/182.92.29.16, maven.aliyun.com/59.110.251.12, maven.aliyun.com/59.110.251.11, maven.aliyun.com/59.110.251.10] failed: Connection refused: connect

Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.1.RELEASE from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.196.215] failed: Connection refused: connect  

问题:maven配置、pom.xml引用正确。下载地址镜像配置正确。但是报上述错误。

原因:公司设置代理上网,需要在"C:\用户\apache-maven-3.3.9\conf\settings.xml"  文件节点需要设置代理。

也可能maven与idea版本不兼容,尝试下载低版本maven。旧版本地址:https://archive.apache.org/dist/maven/maven-3/

<proxies>  
   <proxy>  
     <id>myProxy</id>  
     <active>true</active>  
     <protocol>http</protocol>  
     <host>123.123.123.123</host>  
     <port>8080</port>  
     <username>XXXXX</username>  
     <password>XXXXX</password>  
     <nonProxyHosts>*.XXX.com|XXX.org</nonProxyHosts>  
   </proxy>  
 </proxies>  

附:阿里云maven镜像地址配置

<mirror>
    <id>nexus-aliyun</id>
    <mirrorOf>central</mirrorOf>
    <name>Nexus aliyun</name>
    <url>https://maven.aliyun.com/repository/central</url>
</mirror>

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值