Nemo

关注TA

路漫漫其修远兮,吾将上下而求索。

  • 深圳市
  • 菜鸟工程师

可爱的留言者

Eclipse Maven新建项目报错解决

2016年03月21 15:16 4,070 0

  使用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)



解决:

1.

Eclipse -- > Window --> Preferences --> maven --> archetype -- >add remote catalog :

    在catalog File中填入:

    http://repo1.maven.org/maven2/archetype-catalog.xml

    Description: 随便填写一个英文名称.


2. 开始新建一个maven project.

    在select an Archetype的界面选择刚刚新建的catalog即可.





点赞(0)
点了个评