[英]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.