eclipse 创建mavenwebapp失败

在尝试使用eclipse创建maven webapp项目时遇到错误,错误信息涉及archetype仓库无法解析。解决方案是手动删除本地maven仓库中maven-archetype-webapp 1.0版本的文件,然后重新在eclipse中创建项目,让eclipse自动下载该版本,从而成功创建webapp项目。

eclispe 创建maven webapp 报错




自己一直习惯用idea来开发项目,但是最近刚到的公司采用exlipse作为开发IDE为了代码的管理不得不采用eclipse。在我使用eclipse创建maven webapp工程的时候遇到了如下的问题:


首先我选择webapp
选择webapp


然后一波操作猛如虎,报错了我内心是崩溃的,具体错误如下
报错


我们来看看日志说的错误
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:1.0 from any of the configured repositories.
Could not resolve artifact org.apache.maven.archetypes:maven-archetype-webapp:jar:1.0
Failure to transfer org.apache.maven.archetypes:maven-archetype-webapp:jar:1.0 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.maven.archetypes:maven-archetype-webapp:jar:1.0 from/to alimaven (http://maven.aliyun.com/nexus/content/groups/public/): maven.aliyun.com
Failure to transfer org.apache.maven.archetypes:maven-archetype-webapp:jar:1.0 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.maven.archetypes:maven-archetype-webapp:jar:1.0 from/to alimaven (http://maven.aliyun.com/nexus/content/groups/public/): maven.aliyun.com



我在idea中创建都没有问题,在eclipse中就蹦了,惊慌失措的我开始去请教度娘,但是网上的教程大多数都说要修改catalog然后再用修改的catalog来创建webapp,又或者是怎样,反正翻来覆去回答都是大同小异无法解决我的问题



解决办法:

首先看报错的日志发现是webapp 1.0无法解决,我索性的便去maven仓库中看看的我的webapp1.0,找到webapp1.0,下面是我的位置 F:\RepMaven\org\apache\maven\archetypes\maven-archetype-webapp\1.0
webapp1.0
接下来我们要做的事情很简单,删除这个1.0的文件,然后去eclipse重新创建webapp项目 ,然后eclispe就会重新自动去下载webapp 1.0的jar包,问题解决

评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值