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>