[英]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.
在下面,我注意到了为找到解决方案而做的大量信息和步骤。
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 mvn clean install
生成调试模式类似的东西: Could not transfer artifact junit:junit:pom:3.8.1 from/to central...: peer not authenticated
的堆栈跟踪 mvn -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true clean install
but it fails also. mvn -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true clean install
但也失败。 Output in debug mode ends with: Server key: Could not create EC public key: CKR_DOMAIN_PARAMS_INVALID
Server key: Could not create EC public key: CKR_DOMAIN_PARAMS_INVALID
mvn clean install
works correctly. mvn clean install
可以正常工作。 So, it seems to be a problem only with downloading. Does anyone have any suggestions what can be wrong? 有人有什么建议可能会出错吗?
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: 确保您有权写入
{jdk_directory}/security/java.security
文件(在我的情况下为/etc/java-7-openjdk/security/java.security)
,如果是这样,请按照以下方式进行修改:
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) 它解决了我所有计算机上的问题(全部使用Maven 3.0.4)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.