Maven / Java构建-SSL对等错误关闭

Dav*_*vid 2 java maven

在jenkins中从nexus调试Maven下载后,出现以下错误。

Openssl可以正常运行,并且该证书是由Amazon颁发的有效证书。

BasicRepositoryConnector-nexus.pmc.pearsonprd.tech-2-0, handling exception: javax.net.ssl.SSLException: SSL peer shut down incorrectly 09:42:35 %% Invalidated: [Session-2, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256] 09:42:35 BasicRepositoryConnector-nexus.tech-2-0, SEND TLSv1.2 ALERT: fatal, description = unexpected_message 09:42:35 BasicRepositoryConnector-nexus.tech-2-0, WRITE: TLSv1.2 Alert, length = 26 09:42:35 BasicRepositoryConnector-nexus.tech-2-0, called closeSocket() 09:42:35 BasicRepositoryConnector-nexus.tech-2-0, called close() 09:42:35 BasicRepositoryConnector-nexus.tech-2-0, called closeInternal(true) 09:42:35

Maven失败,并出现以下错误。

09:42:35 [ERROR] Failed to execute goal on project hybris-package: Could not resolve dependencies for project com.sap:hybris-package:jar:1.0-SNAPSHOT: Could not transfer artifact com.sap.hybris:hybris-commerce-suite:zip:6.6.0.1 from/to thirdparty (https://nexus.tech/nexus/content/repositories/thirdparty): GET request of: com/sap/hybris/hybris-commerce-suite/6.6.0.1/hybris-commerce-suite-6.6.0.1.zip from thirdparty failed: SSL peer shut down incorrectly -> [Help 1]

我的思维过程是与网络或Java相关吗?您以前看过吗?

jts*_*snr 5

将以下内容添加到您的mvn命令中:

-Dhttps.protocols=TLSv1.2
Run Code Online (Sandbox Code Playgroud)

  • 这解决了我面临的问题,但如果能用一行解释为什么需要这样做就太好了。 (3认同)