創建 maven maven-archetype-quickstart 項目抱錯問題解決方法

eclipse裝m2eclipse的時候裝完後創建項目的時候報錯:

Unable to create project from archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE

解決方法:

  1. Open Window > Preferences
  2. Open Maven > Archetypes
  3. Click 'Add Remote Catalog' and add the following:
    • Catalog File: http://repo1.maven.org/maven2/archetype-catalog.xml
    • Description: maven catalog

 

問題: 
eclipse裝m2eclipse的時候裝完後創建項目的時候報錯:

Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repositories.

解決方法:

步驟一: 
http://maven.oschina.net/content/groups/public/org/apache/maven/archetypes/maven-archetype-quickstart/ 下載最新版maven-archetype-quickstart-1.1.jar

步驟二: 
命令行到下載目錄下執行

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

重新打開發工具創建maven項目

發佈了3 篇原創文章 · 獲贊 9 · 訪問量 9萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章