maven中常遇到的一些錯誤,maven中常遇到錯誤

來源:互聯網
上載者:User

maven中常遇到的一些錯誤,maven中常遇到錯誤

1,eclipse could not resolve archetype這個是在eclipse建立項目時,選擇archetype時出現的:

在建立maven工程時報錯:

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

 

could not resolve archetype這個錯誤出現的原因是,在建立項目時使用的是我自己配置的maven倉庫中心,但是未啟動nexus伺服器,這時就會在maven中找不到。但是重新啟動nexus時,它不會再重新嘗試擷取了。這個在錯誤的詳細資料中會有提示。

 

could not resolve archetype解決辦法是刪除maven倉庫下載的jar,即在maven的settings.xml配置的下載路徑,並且更換一個workplace,然後重新設定一下maven,

 

重新匯入項目就可以了。

 

2,was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced -> [Help 1]

這個錯誤一般是在第一次更新jar的時候沒有啟動中心倉庫nexus,但是重新啟動後,它又不更新了。目前我的解決方案的是進入到nexus的目錄下D:\Soft\windows\nexus-2.14.0-01-bundle\sonatype-work\nexus\storage\central,找到你更新失敗的那個jar包的目錄。重新在eclipse中 install 一下就可以了。這是maven中經常遇到的錯誤之一

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.