站点图标 起风网

Eclipse使用Maven创建Web时错误:Could not resolve archetype

转载自:http://blog.csdn.net/afgasdg/article/details/12757433

问题描述:

        使用Eclipse自带的Maven插件创建Web项目时报错:

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\liujunguang\.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\liujunguang\.m2\repository)

错误如图:

解决方案:

在Eclipse Maven配置中添加新的Catalog配置:



也可以下载到本地,然后再添加,这样比较快,eclipse联网比较慢



     如图:


接下来在使用刚添加的catalog创建web工程

      

    这个时候就可以看到Eclipse联网下载了:

     
这个时候看一下是不是创建成功了



原文链接:https://blog.csdn.net/w605283073/article/details/50953293

本站声明:网站内容来源于网络,如有侵权,请联系我们,我们将及时处理。

退出移动版