user3607326
user3607326

Reputation: 1

Getting Error in POM.xml on KEPLER Eclipse

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

Upvotes: 0

Views: 5820

Answers (2)

RP-
RP-

Reputation: 5837

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)

Upvotes: 0

Olemis Lang
Olemis Lang

Reputation: 768

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 .

Upvotes: 1

Related Questions