-1

Now i'm in trouble while converting a dynamic web project into maven project using spring tool suite. The following exception occurred.

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: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from/to central (http://repo.maven.apache.org/maven2): null to http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/3.1/maven-compiler-plugin-3.1.pom

Kindly requesting your help to solve the above mentioned question

user3184392
  • 1
  • 1
  • 2
  • 1
    Did you already check the answers to this question: http://stackoverflow.com/questions/19652101/maven-pom-xml-issue? Maybe you get a hint that will work for you... – evandor Jan 11 '14 at 07:04
  • Can you show the full error message? – Behe Jan 11 '14 at 07:36
  • 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: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:3.1 from/to central (http://repo.maven.apache.org/maven2): null to http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/3.1/maven-compiler-plugin-3.1.pom – user3184392 Jan 11 '14 at 09:53
  • Can you post the relevant parts of your pom.xml file? – Behe Jan 11 '14 at 17:27
  • [see](http://stackoverflow.com/questions/12533885/could-not-calculate-build-plan-plugin-org-apache-maven-pluginsmaven-resources) – Prasad Phule Mar 01 '15 at 16:52

1 Answers1

-1

This is likely because the certificate from https://repo.maven.apache.org is not trusted by your JAVA installation. You need to import it to your trust store.

If on Windows, try installing OpenSSL, and run these

openssl s_client -connect repo.maven.apache.org:443

then copy/paste the content of ------BEGIN CERTIFICATE------ and -----END CERTIFICATE------ to a file, say public.crt

then import this certificate to your truststore

%JAVA_HOME%\keytool -import -alias https://repo.maven.apache.org/maven2 -keystore lib\security\cacerts -file public.crt

Restart eclipse.

timpham
  • 556
  • 2
  • 7
  • 25