Eclipse load MAVEN Project hint Pom.xml cannot resolve org.apache.maven.plugins:maven-resources-plugin:2.4.3 solution

Source: Internet
Author: User

Create a MAVEN project on another computer, copy to the import on this machine, there is a Pom.xml file error, prompts the following error

Multiple annotations found at:-Execution default-testresources of goal Org.apache.maven.plugins:maven-resourc Es-plugin:2.4.3:testresources Failed:plugin org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of I TS dependencies could not is resolved:failed to collect dependencies for Org.apache.maven.plugins:maven-resources-plugi n:jar:2.4.3 () (org.apache.maven.plugins:maven-resources-plugin:2.4.3:testresources:default-testresources: process-test-resources)-Plugin execution not covered by lifecycle Configuration:org.apache.maven.plugins: Maven-compiler-plugin:2.3.2:compile (Execution:default-compile, Phase:compile)-coreexception:could not get the Valu E for parameter Compilerid for plugin execution Default-compile:pluginresolutionexception:plugin Org.apache.maven.plug ins:maven-compiler-plugin:2.3.2 or one of its dependencies could is resolved:failed to collect dependencies for org . apache.maven.plugins:maven-compiler-plugin:jar:2.3.2 (): artifactdescriptorexception:failed to read artifact descriptor for org.apache.maven:maven-plugin-api:jar:2.0.6: Artifactresolutionexception:failure to transfer org.apache.maven:maven-plugin-api:pom:2.0.6 from http:// Repo1.maven.org/maven2 is cached in the local repository, resolution won't be reattempted until the update interval Of the has elapsed or updates are forced. Original error:could not transfer artifact org.apache.maven:maven-plugin-api:pom:2.0.6 from/to (http://repo1.m
 AVEN.ORG/MAVEN2): null to http://repo1.maven.org/maven2/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin- 
 Api-2.0.6.pom-coreexception:could not get the value for parameter Compilerid for plugin execution default-testcompile: Pluginresolutionexception:plugin org.apache.maven.plugins:maven-compiler-plugin:2.3.2 or one of its dependencies 
 Could is resolved:failed to collect dependencies for org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2 (): ArtifactdeScriptorexception:failed to read artifact descriptor for org.apache.maven:maven-plugin-api:jar:2.0.6: Artifactresolutionexception:failure to transfer org.apache.maven:maven-plugin-api:pom:2.0.6 from http:// Repo1.maven.org/maven2 is cached in the local repository, resolution won't be reattempted until the update interval Of the has elapsed or updates are forced. Original error:could not transfer artifact org.apache.maven:maven-plugin-api:pom:2.0.6 from/to (http://repo1.m
 AVEN.ORG/MAVEN2): null to http://repo1.maven.org/maven2/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin- Api-2.0.6.pom-execution Default-resources of Goal org.apache.maven.plugins:maven-resources-plugin:2.4.3:resources Failed:plugin org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of its dependencies could not being resolved:f ailed to collect dependencies for org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3 () ( Org.apache.maven.plugins:maven-resources-plugin:2.4.3:resources:default-resources:process-resources)-Plugin execution not covered by lifecycle configuration: Org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testcompile (Execution:default-testcompile, Phase: Test-compile)

The error message appears in the project label for the POM header, and the project label content is

<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" >


reason

This is due to a lack of maven-resources-plugin-2.4.3.jar files. This file is under {user.home}\.m2\repository\org\apache\maven\plugins\maven-resources-plugin\. {User.home} is the MAVEN configuration path, usually my document, is the local Repository inside Window-preferences-myeclipse-maven4myeclipse-user setting.


Solution

1, in the Pom.xml file to add Maven-resources-plugin configuration

<dependency>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId> maven-resources-plugin</artifactid>
    <version>2.4.3</version>
</dependency>
2, run mvn install at the command line, if executed correctly should be in {user.home}\.m2\repository\org\apache\maven\plugins\maven-resources-plugin\ See Maven-resources-plugin-2.4.3.jar file below

3. Refresh Project (right key project selection refresh Item)

4, refresh Maven configuration, right key engineering node, select Maven4myeclipse-update Project Configuration


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.