2017-07-07 68 views
1

在我的Eclipse Oxygen中创建maven-archtype项目时出现以下错误。创建项目时在Eclipse Oven的Maven上“无法解析原型”错误

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:pom:1.0 
Failure to transfer org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org 
Failure to transfer org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org 

我可以从我的浏览器中使用下面的链接访问Maven仓库非常清楚:

https://repo.maven.apache.org/maven2/ 

我用我的办公室笔记本电脑和坐在后面的安全网络。

通过参考其他类似问题的答案,我已经试过把settings.xml放在.m2目录下。我不知道使用哪个代理,因此我只是将我的系统凭证放在usernamepassword标记中。但是这不起作用。

我也尝试在Eclipse Maven设置中添加Maven_Archtype。还是行不通。

有没有人遇到过这个问题?请告诉我一个正确的解决方案,它已经得到了答复。

回答

1

这通常发生在您已经安装了开普勒或火星等Eclipse较早版本,然后单独安装较新版本的情况下,此较新版本访问较旧版本的某些目录。因此,请转至----> C:\ Users \ Irfan(您的用户名) 2.删除这两个文件夹“.eclipse”和“.m2”。 3.再次重新安装较新版本的Eclipse。

相关问题