0
votes

Whenever I try to do anything with my eclipse kepler I get this error:

  Errors occurred during the build.
Errors running builder 'Maven Project Builder' on project 'PcsOne-Persistence'.
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
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

I have tried out everything under the sky to solve this issue with no success:

Examples:

  1. I have tried to uninstall and reinstall eclipse.
  2. Clean and install projects.
  3. Blow up .m2 repo and update all dependencies afresh.
  4. Install Maven plugin for eclipse (shows no updates for kepler)

No matter what I do I get this error which was NOT existent in the very same setup few days back. It popped up out of nowhere.

What possibly could have gone wrong here?

UPDATE: Here is my Pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
          <modelVersion>4.0.0</modelVersion>
          <groupId>com.mycomp.groupid</groupId>
          <artifactId>MyProject-1.0</artifactId>
          <version>1.0-SNAPSHOT</version>
</project>
2
@chrylis sure its very simple for one of the project. Will update my question. Stay tuned! - Ace

2 Answers

0
votes

I've had these problems pop up every now and then and the causes include:

  1. Lack of network access to the repositories
  2. Wrong version/group/artifact id on a plugin
  3. Eclipse maven settings being wrong (compared to the system settings for maven)
  4. The addition of a private repo that had bad copies of one or more artifacts/plugins
  5. Refactoring of poms to move stuff into a parent pom will sometimes inadvertantly break the link to or inheritance from that parent pom

I suggest you try to get the build working from the command line (removes a number of things that can go wrong). Try a build of a very simple maven project. Check the plugin identifiers again.

0
votes

Ok I solved the problem. For the benefit of other viewers the issue was with maven m2e connectors. There's a list of those plugins including something like 'lifecycle mapping' plugins. After making some change - that I unfortunately dont remember what I did, the nature of the error changed.

The new exception prompted me to the list of these plugins in eclipse marketplace. Installing them solved the issue. Eclipse version is kepler and I used external maven (not the embedded one).