problem causes
The address used by the private server https
, and the security certificate has expired or does not exist. When using the maven command, you can add the following parameters to ignore the security check.
mvn -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true
Detailed explanation of parameters
Dmaven.wagon.http.ssl.insecure=true
- Allow relaxing ssl security checks;Dmaven.wagon.http.ssl.allowall=true
- Allow all X.509 format certificates to match. If changed to false, the same check as the browser will be performed;Dmaven.wagon.http.ssl.ignore.validity.dates=true
- Ignore certificate expiration issues
idea configuration default parameters
Configure VM options in idea, and then you can use these parameters by default
Maven configures the setting so that it ignores security checks
<proxies>
<proxy>
<id>my-proxy</id>
<active>true</active>
<protocol>http</protocol>
<host>my-proxy-host</host>
<port>my-proxy-port</port>
<nonProxyHosts>localhost|127.0.0.1</nonProxyHosts>
<!-- 添加以下三个参数 -->
<sslHostConfig>
<!--指定是否信任所有证书-->
<all>true</all>
<!--指定使用的SSL协议版本-->
<sslProtocol>all</sslProtocol>
<!--指定是否启用SSL-->
<sslEnabled>true</sslEnabled>
<!--指定支持的SSL协议版本列表-->
<sslProtocols>TLSv1.2</sslProtocols>
<!--指定是否忽略证书验证-->
<ignoreCertificates>true</ignoreCertificates>
<!-- 指定是否信任自签名证书-->
<trustSelfSigned>true</trustSelfSigned>
<!-- 指定是否允许所有证书 -->
<allowAllCerts>true</allowAllCerts>
</sslHostConfig>
</proxy>
</proxies>