今天编译maven项目时遇到仓库https证书过期,具体报错信息如下:
[ERROR] Failed to execute goal on project hudi-hadoop-mr: Could not resolve dependencies for project org.apache.hudi:hudi-hadoop-mr:jar:0.10.1: Failed to collect dependencies at org.apache.hive:hive-jdbc:jar:3.1.0.3.1.4.0-315 -> org.apache.hive:hive-service:jar:3.1.0.3.1.4.0-315 -> org.apache.hive:hive-llap-server:jar:3.1.0.3.1.4.0-315 -> org.apache.hbase:hbase-server:jar:2.0.2.3.1.4.0-315 -> org.glassfish.web:javax.servlet.jsp:jar:2.3.2 -> org.glassfish:javax.el:jar:3.0.1-b06-SNAPSHOT: Failed to read artifact descriptor for org.glassfish:javax.el:jar:3.0.1-b06-SNAPSHOT: Could not transfer artifact org.glassfish:javax.el:pom:3.0.1-b06-SNAPSHOT from/to jvnet-nexus-snapshots (https://maven.java.net/content/repositories/snapshots): Transfer failed for https://maven.java.net/content/repositories/snapshots/org/glassfish/javax.el/3.0.1-b06-SNAPSHOT/javax.el-3.0.1-b06-SNAPSHOT.pom: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: validity check failed: NotAfter: Tue Mar 01 07:59:59 CST 2022 -> [Help 1]
解决办法:
可在编译中添加如下参数跳过https证书校验:
-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true
本文为从大数据到人工智能博主「xiaozhch5」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。