Israel
Israel

Reputation: 3402

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?

Upvotes: 5

Views: 61323

Answers (3)

romangorbenko.com
romangorbenko.com

Reputation: 75

Please check this section in Maven settings.xml file:

<proxies>
        <proxy>
            <active>true</active>
            <protocol>http</protocol>
            <host>proxy</host>
            <port>8080</port>
        </proxy>
</proxies>

If you don't have a proxy delete this section and problem was resolved.

Upvotes: 0

jon
jon

Reputation: 980

My answer is based on the previous one (didn't work with the settings.xml for me)

  1. I deleted everything under ...\Users\myUser.m2\repository*
  2. Added in pom.xml the following dependency:

    dependency> groupId>org.apache.maven.plugins artifactId>maven-resources-plugin version>2.5

  3. Modified all '_remote.repositories' files under '.m2\repository\org\apache\maven\plugins' and set the '.jar>central=http://mirrors.ibiblio.org/pub/mirrors/maven2'

  4. cleann

  5. install

Upvotes: 1

afenkner
afenkner

Reputation: 486

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

Upvotes: 8

Related Questions