Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to read artifact descriptor for maven-resources-plugin

Stage:

I am trying to compile a Maven project in Eclipse (Spring Tool Suite, version: 3.2.0.RELEASE).

Each project compilations throws this:

Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5
Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5

How can I solve it?

like image 578
Israel Avatar asked Mar 25 '23 03:03

Israel


1 Answers

Basically it's not able to connect and download the artifact which could be a couple different things. Most people will tell you to check your proxy settings, but I will stay away from that and give another suggestion in case that doesn't turn out to be your problem. It could be your mirror settings.

If you use maven at the office then there's a good chance maven is configured to look for your company's internal maven repository. If you're doing some work from home and you are not connected to the network this could be the problem. An obvious solution might be VPN to the office to get visibility to this repo. Another way around this is to add another mirror site to your /User/.m2/settings.xml file so if it fails to find it on your office network it will try public repo.

<mirror>
  <id>Central</id>
  <url>http://repo1.maven.org/maven2</url>
  <mirrorOf>central</mirrorOf>
  <!-- United States, St. Louis-->
</mirror>

For other maven repositories take a look here: http://docs.codehaus.org/display/MAVENUSER/Mirrors+Repositories

like image 114
afenkner Avatar answered Apr 09 '23 22:04

afenkner