2

I have tried deleting .m2, deleting and pulling project, but i still get this error. The project / pom are fine, they work on other computers.

I am using Ubuntu 17.10, openjdk 1.8.151 and maven 3.5

Here's the trace :

[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building cookieFactory 0.1
[INFO] ------------------------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.858 s
[INFO] Finished at: 2018-02-10T12:05:37+01:00
[INFO] Final Memory: 9M/212M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

Thanks for your help

TheWildHealer
  • 1,546
  • 1
  • 15
  • 26
  • The problem is here: `: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty`... – khmarbaise Feb 10 '18 at 11:35
  • I was expecting an answer not a copy paste from my question thank you. If i bother asking it's because i have already searched for everything that could solve my problem. Any info i get on the web about any part of the error message is not corresponding to my case. – TheWildHealer Feb 10 '18 at 12:29
  • did you try https://stackoverflow.com/a/46369183/3892213 – best wishes Feb 10 '18 at 16:04
  • There's something wrong with your environment setup (e.g. java cert store). Can you reinstall your JDK? (or install new JDK, make it default for your env, point maven to use the new JDK and try again?) Try in a VM, docker, anything else but your current env. – hovanessyan Feb 10 '18 at 16:41
  • @bestwishes unfortunately it does not work – TheWildHealer Feb 10 '18 at 18:58
  • @hovanessyan i had already tried to reinstall jdk and it did not solve the problem, the project is working fine on others computers. – TheWildHealer Feb 10 '18 at 19:00
  • what OS are you using and which JDK? – hovanessyan Feb 10 '18 at 19:05
  • @hovanessyan my bad sorry, should have specified that, Ubuntu 17.10, openjdk 1.8.151 and maven 3.5. – TheWildHealer Feb 11 '18 at 09:37
  • 1
    have you tried running it with the Oracle JDK? I guess the cert stores will be different, at least you'll know if the issue is due to the certificates. – hovanessyan Feb 11 '18 at 09:38
  • @hovanessyan I just did, and it works, thank you. i guess i'll stay with oracle jdk for now, but the original problem is still unresolved – TheWildHealer Feb 13 '18 at 13:47

3 Answers3

0

Installing the official Oracle JDK solved the problem.

TheWildHealer
  • 1,546
  • 1
  • 15
  • 26
0

For me I have this error because I changed JDK version from 1.8 to 1.6, so you can try to change your JDK version in your project configuration.

Amine ABBAOUI
  • 175
  • 1
  • 12
0

It cost me the whole day to figure out it is because jre/JDK 7 not support https , I have jre7,jdk8,jdk4 installed on windows10. After changing my JAVA_HOME point to jdk14.It is fixed.

energy audit
  • 1
  • 1
  • 1
  • 2