0
votes

I have created maven based web application so after created application i am getting two errors in pom.xml which are

1.Multiple annotations found at this line: - Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from http://repo.maven.apache.org/maven2 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-resources-plugin:pom:2.6 from/to central (http:// repo.maven.apache.org/maven2): null to http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom

2.Multiple annotations found at this line: - Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (execution: default-testCompile, phase: test-compile) - Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (execution: default-compile, phase: compile) - CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:3.1: ArtifactResolutionException: Failure to transfer org.apache.maven.plugins:maven-compiler-plugin:pom:3.1

Could you please let me know what needs to be done for resolving the issue

2
I have a similar issue with subtle differences . In my case compilation works when I run from the command line $ mvn compile . Nonetheless I get the maven error when I open the same project with Eclipse IDE . Version info is Eclipse Platform Version: 4.3.1.v20130911-1000 Build id: M20130911-1000 and I'm also using m2e - Maven Integration for Eclipse - 1.4.1.20140328-1905 , in case that matters . Any hints ? - Olemis Lang

2 Answers

1
votes

If you are facing the same issue I described in my comment above then it seems I could fix it by running mvn eclipse:eclipse with working directory set to Eclipse project folder i.e.

$ cd /path/to/eclipse/workspace/Project
$ mvn eclipse:eclipse

Does this work for you ? Maybe your environment is different . Providing more details might help others to understand your problem even better so as to offer useful suggestions .

0
votes

I had similar problem Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (execution: default-testCompile, phase: test-compile).

To Fix (apart from installing M2E plug-in and all):

  • Ensure installed maven is > 3.1 (using mvn -v). If not, you need to upgrade.
  • Ensure eclipse is pointing to correct maven location (Window->Preferences->Maven->Installations)
  • On Command prompt, go to project home directory and run mvn eclipse:clean and mvn eclipse:eclipse
  • Disable and enable Maven nature in eclipse (Right click on project, goto Maven -> Disable Maven Nature. To enable, Right click on project goto Configure -> Convert to Maven Project)