eclipse 创建mavenwebapp失败
eclispe 创建maven webapp 报错
自己一直习惯用idea来开发项目,但是最近刚到的公司采用exlipse作为开发IDE为了代码的管理不得不采用eclipse。在我使用eclipse创建maven 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
接下来我们要做的事情很简单,删除这个1.0的文件,然后去eclipse重新创建webapp项目 ,然后eclispe就会重新自动去下载webapp 1.0的jar包,问题解决