![](/img/trans.png)
[英]Maven: Failed to retrieve pluginorg.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved
[英]Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved
我在這里收到此錯誤消息和另一條錯誤消息:無法讀取 org.apache.maven.plugins:maven-install-plugin:jar:2.4 的工件描述符:
即使當我使用此路徑 C:\\Users\\A591024.m2\\repository\\org\\apache\\maven\\plugins\\maven-resources-plugin\\2.4 進入 .m2 存儲庫時
maven-resources-plugin-2.4.jar 文件在那里並且 maven-resources-plugin-2.4.pom 也在那里。 我試圖刪除 .m2 存儲庫但沒有運氣。 到目前為止,maven 不會構建我迫切需要的項目。
有任何想法嗎?
似乎是代理問題,請通過獲取 LAN 設置和代理信息在您的 setting.xml 中進行跟蹤。
<proxies>
<proxy>
<id>proxy</id>
<active>true</active>
<protocol>http</protocol>
<host>HOSTNAME</host>
<port>PORT</port>
</proxy>
</proxies>
這是一個常見的問題,請參見下面的鏈接。
插件 org.apache.maven.plugins:maven-clean-plugin:2.5 或其依賴項之一無法解析
插件 org.apache.maven.plugins:maven-install-plugin:2.4 或其依賴項之一無法解析
錯誤可能類似於
org.apache.maven.plugins:maven-clean-plugin:2.4.1
(groupId):(artifactID):(version)
在依賴部分pom.xml
,放入
<dependency>
<groupId>(groupId)</groupId>
<artifactId>(artifactID) </artifactId>
<version>(version)</version>
<type>maven-plugin</type> // here type will be whatever the groupId is
</dependency>
結果將是上述錯誤的依賴項
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.4</version>
<type>maven-plugin</type>
</dependency>
重新加載構建,這應該下載那些未解決的錯誤的依賴項。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.