【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>

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
"Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.3.2.RELEASE" 这个错误通常是由于 Maven 在下载依赖时出现问题引起的。根据引用,可能的原因是无法Maven 仓库中下载该依赖项。你可以尝试以下解决方法: 1. 确保你的网络连接正常,可以访问 Maven 仓库。有时候网络问题会导致无法下载依赖项。你可以尝试检查你的网络设置或者尝试使用其他网络连接。 2. 检查 Maven 的配置文件(settings.xml)中是否正确配置了镜像仓库。镜像仓库可以加快依赖项的下载速度。你可以检查是否配置了正确的镜像仓库地址,并且没有被防火墙或代理服务器所阻止。 3. 清除 Maven 的本地仓库。有时候本地仓库中的缓存文件可能会损坏或不完整,导致下载失败。你可以尝试删除本地仓库中与该依赖项相关的文件,然后重新运行 Maven 构建命令。Maven 会自动重新下载依赖项。 4. 检查该依赖项在 Maven 仓库中是否存在。根据引用,可能是由于该依赖项不存在或者被移除导致无法下载。你可以尝试在 Maven 仓库中搜索该依赖项,查看是否存在。 此外,根据引用,你还可以检查你的 IntelliJ IDEA 的设置,确保正确配置了 JDK 版本为 1.8 以上。这可能会对构建过程产生影响。 综上所述,你可以尝试检查网络连接、配置正确的镜像仓库、清除本地仓库并重新下载依赖项,以及检查该依赖项是否存在于 Maven 仓库中。同时,确保你的 IntelliJ IDEA 的设置中配置了正确的 JDK 版本。这些步骤有助于解决 "Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.3.2.RELEASE" 错误。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [彻底解决:Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom](https://blog.csdn.net/qq_45427317/article/details/120431314)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* [Missing artifact com.oracle:ojdbc14:jar:10.2.0.3.0-附件资源](https://download.csdn.net/download/weixin_42190030/15594516)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值