[英]Can't reach maven dependency
有時候,maven沒有達到某種依賴關系。
當然是我的錯,但是我可以構建很多項目,而沒有很多依賴的問題...
在這種情況下,我試圖獲得:
<dependency>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
<version>4.3.1.Final</version>
</dependency>
我得到:
[ERROR] Plugin org.richfaces.cdk:maven-cdk-plugin:4.3.1.Final or one of its depe
ndencies could not be resolved: Could not find artifact org.richfaces.cdk:maven-
cdk-plugin:jar:4.3.1.Final in central (https://repo.maven.apache.org/maven2) ->
[Help 1]
我目前在將jdk 1.8與maven 3.3.9結合使用。 我還在settings.xml的活動配置文件引用中添加了存儲庫標簽:
...
<activeProfiles>
<!--make the profile active all the time -->
<activeProfile>nexus</activeProfile>
</activeProfiles>
<profiles>
...
<profile>
<id>nexus</id>
<!--Override the repository (and pluginRepository) "central" from the Maven Super POM
to activate snapshots for both! -->
<repositories>
<repository>
<id>repoId022</id>
<name>repositoryId022</name>
<url>https://mvnrepository.com/artifact/</url>
</repository>
...
我已經在瀏覽器中簽到了,我可以到達依賴路徑並下載它而沒有問題。
現在我沒主意了...您能建議什么嗎? 謝謝!
問題是托管所有工件的Maven中央存儲庫缺少您在pom.xml中提到的工件。
明確顯示錯誤消息,表明maven無法解析依賴關系,通常是由於您指定了錯誤的工件名稱或版本而導致的。
我所做的只是在Maven Central Repo上進行了驗證。
您可以通過遵循基本URL https://repo.maven.apache.org/maven2/來搜索工件,然后使用組和工件ID進行搜索。 我發現工件名稱從maven-cdk-plugin
更改為maven-richfaces-resources-plugin
,下面是相同的URL。 https://repo.maven.apache.org/maven2/org/richfaces/cdk/maven-richfaces-resources-plugin/4.3.1.Final/
希望它對您有所幫助,如果您還有其他疑問,請與我們聯系。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.