Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved

Hello everyone

when i open openmrs-web and other maven projects in eclipse i get this error :

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

Does anyone know how to go about it .thanks @mozzy

Well @insookwa i think this a version problem. Check the version of the package you want to install and check if maven has it’s equivalent.

1 Like

Given that the maven-resources-plugin is a core component, this sounds like the likely cause is either a corrupted or missing file. First, if you’re behind a proxy, you’ll need to configure Maven to work with your proxy. Second, there are two possible approaches to resolving the issue: the easy way, which requires a good internet connection, and the slightly more complex way that can probably be done with any internet connection.

The Easy Way

Delete the %USERPROFILE%\.m2 directory (I think this is usually where it is but I’m not 100% certain on Windows). Reopen Eclipse and try to build the project.

Slightly more complex way

  1. Go to %USERPROFILE%\.m2\org\apache\maven\plugins\maven-resources-plugin\2.6
  2. Delete all the files there
  3. Go here and download the following files:
    • maven-resources-plugin-2.6.jar
    • maven-resources-plugin-2.6.jar.sha1
    • maven-resources-plugin-2.6.pom
    • maven-resources-plugin-2.6.pom.sha1
  4. Move all those files into %USERPROFILE%\.m2\org\apache\maven\plugins\maven-resources-plugin\2.6
  5. Reopen Eclipse
2 Likes

Thank you so much @ibacher though ive stumbled on a few new challenges

  1. on downloading the maven-resources-plugin-2.6.jar.sha1, i got this:dd093ff6a4b680eae7ae83b5ab04310249fc6590. its the same withmaven-resources-plugin-2.6.pom.sha1. i am new to maven and would request to know how am i supposed to add it to the repositories .

  2. after deleting the former files and adding the new downloaded files “maven-resources-plugin-2.6.jar”. ive re opened eclipse and tried to build another maven project and i recived these errors ;

Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.2 or one of its dependencies could not be resolved: Failure to transfer org.apache.maven.plugins:maven-war-plugin:jar:2.2 from Central Repository: was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-war-plugin:jar:2.2 from/to central (Central Repository:): repo.maven.apache.org Plugin org.apache.maven.plugins:maven-war-plugin:2.2 or one of its dependencies could not be resolved: Failure to transfer org.apache.maven.plugins:maven-war-plugin:jar:2.2 from Central Repository: was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-war-plugin:jar:2.2 from/to central (Central Repository:): repo.maven.apache.org

Thanks @ibacher for digging deep into this. I like that :grinning:

However what i can say , Ecllipse maven plugin is always trouble some. First try to follow the steps @ibacher has outlined ,

another option , would be ,
If you have maven installed on your machine , Just ensure you can build your project successfully without any errors in your command line and if that happens , then you may ignore eclipse maven plugin errors.

1 Like

I always forget that the Eclipse Maven Plugin tries to do it’s own thing… as if Maven wasn’t complex enough already!

At this point you might want to consider clearing out the .m2 directory completely. Or as @mozzy suggested, build from the command line and see if that works.

1 Like

OK let me try that thanks @ibacher @mozzy @joachimjunior

1 Like