Failed to read artifact handle for maven-resources-plugin

Stage

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

Each compilation of a project causes the following:

 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?

+2
source share
5 answers

In principle, he cannot connect and download an artifact, which may be slightly different. Most people will tell you to check the proxy settings, but I will avoid this and give another suggestion in case this does not turn out to be your problem. These may be your mirror settings.

If you use maven in the office, then there is a good chance that maven is configured to search your company's maven internal repository. If you are doing some work from home and you are not connected to the network, this can be a problem. An obvious solution might be an office VPN to get visibility for this repo. Another way is to add another mirror site to the /User/.m2/settings.xml file so that if he did not find it on your office network, he will try a 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, see here: http://docs.codehaus.org/display/MAVENUSER/Mirrors+Repositories

+4
source

My answer is based on the previous one (did not work with settings.xml for me)

  • I deleted everything under ... \ Users \ myUser.m2 \ repository *
  • The following dependency has been added to pom.xml:

    dependency> groupID> org.apache.maven.plugins artifact> Maven-resources-plugin version> 2.5

  • All `_remote.repositories' files in the .m2 \ repository \ org \ apache \ maven \ plugins' section have been changed and set to '.jar> central = http://mirrors.ibiblio.org/pub/mirrors/maven2

  • cleann

  • to establish

0
source

You should also check if your environment uses the default (or built-in) ID maven or external, I had a problem several times when I got timeouts, mainly because I did not load the correct configuration.

0
source

Check this section in the Maven.xml settings file:

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

If you do not have a proxy, delete this section and the problem will be resolved.

0
source

Try the command below in the mvn clean -X project directory

If you get the message "javax.net.ssl.SSLException: Received fatal alert: protocol_version" below, it will help you.

Why am I getting a Fatal Warning Received: Version Protocol or Unauthenticated from Maven Central?

0
source

Source: https://habr.com/ru/post/1209086/


All Articles