您的位置:首页 > 运维架构 > Apache

Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:RELEASE from any of t

2015-06-30 14:55 639 查看
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:RELEASE from any of the configured repositories.
Could not resolve artifact org.apache.maven.archetypes:maven-archetype-webapp:pom:RELEASE
Failed to resolve version for org.apache.maven.archetypes:maven-archetype-webapp:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-webapp/maven-metadata.xml in local (C:\Users\Administrator\.m2\repository)
Failed to resolve version for org.apache.maven.archetypes:maven-archetype-webapp:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-webapp/maven-metadata.xml in local (C:\Users\Administrator\.m2\repository)


在创建maven工程时有时候会出现这类异常

网上的解决方法有很多,但是每一种情况是不一样的,我试了几个方法,没有见效,如果已经有maven 工程了,我的操作是换一个workspace 工作空间就ok了

如图,三个切换成哪一个都可以,前提时切换到的工作空间没有maven 工程。

然后在该工作区间创建maven web工程,如果不想用该新的工作空间,则直接切换到原来的工作空间,点击import 导入到自己常用的工作区间就ok了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: