问题描述:
在记性Maven打包操作mvn clean package时,提示错误如下:
[ERROR] Plugin org.apache.maven.plugins:maven-jar-plugin:2.4 or one of its dependencies could not be resolved: Failed to read arti
org.apache.maven.plugins:maven-jar-plugin:jar:2.4: Could not transfer artifact org.apache.maven.plugins:maven-jar-plugin:pom:2.4 f
://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:80 [repo.maven.apache.org/23.235.47.215] failed: Connection tim
Help 1]
在记性Maven打包操作mvn clean package时,提示错误如下:
[ERROR] Plugin org.apache.maven.plugins:maven-jar-plugin:2.4 or one of its dependencies could not be resolved: Failed to read arti
org.apache.maven.plugins:maven-jar-plugin:jar:2.4: Could not transfer artifact org.apache.maven.plugins:maven-jar-plugin:pom:2.4 f
://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:80 [repo.maven.apache.org/23.235.47.215] failed: Connection tim
Help 1]
解决方案:
I had a similar issue with Eclipse and the same steps as Sanders did solve it. It happens because the proxy restricts call to maven repository
- Go to
D:\Maven\apache-maven-3.0.4-bin\apache-maven-3.0.4\conf
(ie your maven installation folder) - Copy
settings.xml
and paste it in.m2
folder, which is in the users folder of your windows machine. - Add the proxy setting
Something like this:
<proxies>
<!-- proxy
Specification for one proxy, to be used in connecting to the network.
-->
<proxy>
<active>true</active>
<protocol>http</protocol>
<username>your username</username>
<password>password</password>
<host>proxy.host.net</host>
<port>80</port>
</proxy>
</proxies>
文章转自:Maven: Failed to retrieve plugin descriptor error