0
votes

When trying to create a Maven project in Eclipse for Selenium, I am getting the following errors in my POM.xml :

  1. CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.8.0 or one of its dependencies could not be resolved
  2. Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (execution: default-compile, phase: compile)
  3. org.apache.maven.plugins:maven-resources-plugin:pom:3.0.2 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
  4. Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.8.0:testCompile (execution: default-testCompile, phase: test-compile)

enter image description here

I am using the following artifacts :

  • Eclipse - Version: Kepler Service Release 2
  • Maven artifact id - maven-archetype-quickstart - v1.4
  • Group id - org.apache.maven.archetypes
1

1 Answers

1
votes

You have to fix your settings or maven installation to use the HTTPS version of http://repo.maven.apache.org/maven2 (https://repo.maven.apache.org/maven2): that probably what is blocking your Eclipse installation from finding the dependency, and therefore from continuing.

This is what happens when you type in the HTTP url:

501 HTTPS Required. 
Use https://repo.maven.apache.org/maven2/
More information at https://links.sonatype.com/central/501-https-required

To fix that:

  1. Update your Eclipse installation to latest (2020.06)
  2. Update your Maven to latest (3.6.3)
  3. You may clean up the "*.lastUpdated" files from your local repository (%USERPROFILE%\.m2\repository\). They may block Maven from retrying to download dependency (their purpose is actually to avoid download missing dependency more than once a day).
  4. If the previous items failed, you may also try to add the HTTPs repository in your settings: https://maven.apache.org/guides/mini/guide-multiple-repositories.html

Note: Kepler is very old. If you can't, for various reason, switch to latest Eclipse, you may also update maven and build the pom with maven directly rather than Eclipse. m2e (the Eclipse Plugin in charge of handling maven) does not use the mvn installation for dependency resolution.