问题:
IDea 向nexus(nexus使用http协议)私服deploy时报错如下:
Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project XXX: Failed to retrieve remote metadata com.test:XXX:0.0.1-SNAPSHOT/maven-metadata.xml: Could not transfer metadata com.test:XXX:0.0.1-SNAPSHOT/maven-metadata.xml from/to nexus-snapshots (https://127.0.0.1:8099/repository/maven-snapshots/): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
解决方案:
File->Settings->Build,Execution,Deployment->Build Tools->Maven->Runner->VM Options加入以下内容
-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Djsse.enableSNIExtension=false