Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quichtml
當你安裝了m2eclipse後,就能夠經過菜單【File】-【New】-【Project…】,選擇其中的Maven-Maven Project,根據Maven提供的工程原型或模板archetype來生成簡單的項目框架。web
這種方法並不推薦,由於eclipse須要網上加載apache
下載地址瀏覽器
http://repo1.maven.org/maven2/archetype-catalog.xml框架
推薦這種方式,先下載到本地,比較快eclipse
經過瀏覽器查看http://repo1.maven.org/maven2/ 找到名字爲archetype-catalog.xml下載到本地maven
或者直接下載http://files.cnblogs.com/files/zhaozhenqiang/archetype-catalog.xml ui
若是繼續報錯請檢查maven setting.xml文件,應該包含如下內容spa
在建立maven工程時有時候會出現這類異常.net
網上的解決方法有不少,可是每一種狀況是不同的,我試了幾個方法,沒有見效,若是已經有maven 工程了,個人操做是換一個workspace 工做空間就ok了
如圖,三個切換成哪個均可以,前提時切換到的工做空間沒有maven 工程。
而後在該工做區間建立maven web工程,若是不想用該新的工做空間,則直接切換到原來的工做空間,點擊import 導入到本身經常使用的工做區間就ok了。
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart
以前都是命令行建立,今天用eclipse裝m2eclipse的時候裝完後建立項目的時候報錯:
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repositories.
解決方式:
1.從http://maven.oschina.net/content/groups/public/org/apache/maven/archetypes/maven-archetype-quickstart/ 下載最新版maven-archetype-quickstart-1.1.jar
2.命令行到下載目錄下執行mvn install:install-file -DgroupId=org.apache.maven.archetypes -DartifactId=maven-archetype-quickstart -Dversion=1.1 -Dpackaging=jar -Dfile=maven-archetype-quickstart-1.1.jar