2017-07-07 120 views
1

在我的Eclipse Oxygen中創建maven-archtype項目時出現以下錯誤。創建項目時在Eclipse Oven的Maven上「無法解析原型」錯誤

Could not resolve archetype org.apache.maven.archetypes:maven-archetype-webapp:1.0 from any of the configured repositories. 
Could not resolve artifact org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0 
Failure to transfer org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org 
Failure to transfer org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org 

我可以從我的瀏覽器中使用下面的鏈接訪問Maven倉庫非常清楚:

https://repo.maven.apache.org/maven2/ 

我用我的辦公室筆記本電腦和坐在後面的安全網絡。

通過參考其他類似問題的答案,我已經試過把settings.xml放在.m2目錄下。我不知道使用哪個代理,因此我只是將我的系統憑證放在usernamepassword標記中。但是這不起作用。

我也嘗試在Eclipse Maven設置中添加Maven_Archtype。還是行不通。

有沒有人遇到過這個問題?請告訴我一個正確的解決方案,它已經得到了答覆。

回答

1

這通常發生在您已經安裝了開普勒或火星等Eclipse較早版本,然後單獨安裝較新版本的情況下,此較新版本訪問較舊版本的某些目錄。因此,請轉至----> C:\ Users \ Irfan(您的用戶名) 2.刪除這兩個文件夾「.eclipse」和「.m2」。 3.再次重新安裝較新版本的Eclipse。

相關問題