mchrobok
mchrobok

Reputation: 2027

Maven - peer not authenticated

A few days ago my maven stopped working. To be more specific it stops download dependencies. Below I note bunch of information and steps which I did in order to find solution.

  1. I double checked settings.xml - this file is used also by my colleagues and they haven't any problems
  2. I installed Maven 3.0.4, 3.0.5, 3.1.0 - it always fail during download dependencies
  3. I have 3 computers - 2 with Ubuntu and 1 with Windows. On Windows it works great, on both Ubuntu it doesn't.
  4. mvn clean install generates in debug mode something like that: Could not transfer artifact junit:junit:pom:3.8.1 from/to central...: peer not authenticated stacktrace
  5. I tried to use additional parameters mvn -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true clean install but it fails also. Output in debug mode ends with: Server key: Could not create EC public key: CKR_DOMAIN_PARAMS_INVALID
  6. If I add all dependencies manually (copy&paste from my colleagues ~/.m2 directory) then mvn clean install works correctly. So, it seems to be a problem only with downloading.

Does anyone have any suggestions what can be wrong?

Upvotes: 2

Views: 5369

Answers (1)

mchrobok
mchrobok

Reputation: 2027

I found a solution for my problem. Be sure you have rights to write into {jdk_directory}/security/java.security file (in my case /etc/java-7-openjdk/security/java.security) and if so, then modify it this way:

from:

#security.provider.9=sun.security.ec.SunEC
security.provider.9=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg

to

security.provider.9=sun.security.ec.SunEC
#security.provider.9=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg

It fixed problem on all my computers (all with maven 3.0.4)

Upvotes: 1

Related Questions