eclipse ee(Luna)沒法建立Maven項目

問題描述:web

        使用Eclipse自帶的Maven插件建立Web項目時報錯:apache

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)

app

錯誤如圖:webapp




解決方案:maven

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


     如圖:
orm



接下來在使用剛添加的catalog建立web工程xml

      

    這個時候就能夠看到Eclipse聯網下載了:ip

     
這個時候看一下是否是建立成功了


若是仍是不能建立或者問題沒有解決能夠安裝下面的方法:

1.刪除maven已經下載的文件路徑:.m2\repository\org\apache\maven

刪除以後再試下,這時候若是看到有進度,只須要耐心等待就好了

相關文章
相關標籤/搜索