当eclipse-mars导入maven项目时pom文件出现Failure to transfer org.apache.tomcat.embed:tomcat-embed-websocket:jar

当eclipse-mars导入maven项目时pom文件出现Failure to transfer org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.38 from http://maven.aliyun.com/nexus/content/groups/public/ was
cached in the local repository, resolution will not be reattempted until the update interval of alimaven has elapsed or updates are forced. Original
error: Could not transfer artifact org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.38 from/to alimaven (http://maven.aliyun.com/nexus/
content/groups/public/):

如下图所示

第一种方法(未奏效)
出现这个问题好像是由于eclipse所能允许的Tomcat版本过低,更换新版本的eclipse可以解决问题在这里插入图片描述

旧版本的eclipse允许的Tomcat版本不包括9.0版本

如下图所示
在这里插入图片描述

第二种方法:在maven配置中更换国内镜像

原因:在报错信息中提到Failure to transfer org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.38 from http://maven.aliyun.com/nexus/content/groups/public/说明在这个镜像下不能够下载Tomcat9.0.38版本,更换镜像
操作步骤:打开maven配置文件,在F:\developer\maven\apache-maven-3.6.3\conf(我电脑上maven安装路径)路径下的setting.xml文件在mirrors标签中更改镜像
<mirror>
    <id>nexus-aliyun</id>
    <mirrorOf>*</mirrorOf>
    <name>Nexus aliyun</name>
    <url>http://maven.aliyun.com/nexus/content/groups/public</url>
  </mirror>

在这里插入图片描述
问题成功解决!!!
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值