簡體   English   中英

maven 項目無法解析原型

[英]maven project Could not resolve archetype

我正在嘗試在我的 Eclipse IDE 上啟動一個 Maven 項目,但收到此錯誤消息。 我試圖添加遠程代表http://repo.maven.apache.org/maven2/archetype-catalog.xml目錄文件。但它沒有修復錯誤。 請讓

org.apache.maven.archetypes:maven-archetype-quickstart:1.1 from any of the 
configured repositories.
Could not resolve artifact org.apache.maven.archetypes:maven-archetype- 
quickstart:pom:1.1
Failure to transfer org.apache.maven.archetypes:maven-archetype- 
quickstart:pom:1.1 from https://repo.maven.apache.org/maven2 was cached in t 
he 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- 
quickstart:pom:1.1 from/to central (https://repo.maven.apache.org/maven2): 
sun.security.validator.ValidatorException: PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
valid certification path to requested target
Failure to transfer org.apache.maven.archetypes:maven-archetype- 
quickstart:pom:1.1 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- 
quickstart:pom:1.1 from/to central (https://repo.maven

我不確定這會有所幫助。 使用以下commond進行強制更新:

mvn clean install -U

-U - > Maven強制更新。

你在公司網絡內,對吧? 然后代理或防火牆阻止您的訪問。 為Maven配置正確的代理或與管理員交談。

PKIX路徑構建失敗:sun.security.provider.certpath.SunCertPathBuilderException:無法找到所請求目標的有效證書路徑

指出SSL的問題。 您使用的java沒有有效的CA證書來驗證來自https://repo.maven.apache.org的SSL證書,或者您的公司防火牆正在使用自己的證書來劫持每個https流量 - 然后它們本身必須在您的javas中可用信任。

正如JF Meier所說,在這種情況下,您應該聯系您當地的管理員

我遇到了問題“無法解決原型......快速入門”
我看到了一些帶有發行編號的原型可供選擇,而另一些則只有大寫的“RELEASES”。
我跟着瀏覽器寫的路徑,發現:
501 HTTPS 必需。
使用https://repo1.maven.org/maven2/
更多信息請訪問https://links.sonatype.com/central/501-https-required
因此,他們將其更改為 https,您必須編輯路徑才能到達上述提到的外部原型: https : //repo1.maven.org/maven2/
這為我做到了。
可能您還必須尋找
“用戶\\您的用戶名\\.m2”中的“settings.xml”。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM