错误:
Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.5.4:repackage (repackage) on project MemsRELTest: Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.5.4:repackage failed: Plugin org.springframework.boot:spring-boot-maven-plugin:2.5.4 or one of its dependencies could not be resolved: Failed to collect dependencies at org.springframework.boot:spring-boot-maven-plugin:jar:2.5.4 -> org.springframework.boot:spring-boot-buildpack-platform:jar:2.5.4 -> org.apache.httpcomponents:httpclient:jar:4.5.13 -> org.apache.httpcomponents:httpcore:jar:4.4.13: Failed to read artifact descriptor for org.apache.httpcomponents:httpcore:jar:4.4.13: Could not transfer artifact org.apache.httpcomponents:httpcore:pom:4.4.13 from/to nexus-aliyun (https://maven.aliyun.com/repository/public): Transfer failed for https://maven.aliyun.com/repository/public/org/apache/httpcomponents/httpcore/4.4.13/httpcore-4.4.13.pom ProxyInfo{host='10.10.2.93', userName='null', port=8080, type='https', nonProxyHosts='null'}: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1] |
[INFO] Scanning for projects... [INFO] [INFO] ---------------< com.local.project.sae.mes:MemsRELTest >---------------- [INFO] Building MemsRELTest 0.0.1 [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:3.2.0:copy-resources (copy-xmls) @ MemsRELTest --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] skip non existing resourceDirectory D:\RomanData\WorkSpace\MemsRELTest_jar\files [INFO] [INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ MemsRELTest --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] Copying 4 resources [INFO] Copying 15 resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ MemsRELTest --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 127 source files to D:\RomanData\WorkSpace\MemsRELTest_jar\target\classes [INFO] /D:/RomanData/WorkSpace/MemsRELTest_jar/src/main/java/com/saet/mems/base/config/ApplicationConfigurer.java: Some input files use or override a deprecated API. [INFO] /D:/RomanData/WorkSpace/MemsRELTest_jar/src/main/java/com/saet/mems/base/config/ApplicationConfigurer.java: Recompile with -Xlint:deprecation for details. [INFO] /D:/RomanData/WorkSpace/MemsRELTest_jar/src/main/java/com/saet/mems/org/tempuri/ORTLocator.java: Some input files use unchecked or unsafe operations. [INFO] /D:/RomanData/WorkSpace/MemsRELTest_jar/src/main/java/com/saet/mems/org/tempuri/ORTLocator.java: Recompile with -Xlint:unchecked for details. [INFO] [INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ MemsRELTest --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] skip non existing resourceDirectory D:\RomanData\WorkSpace\MemsRELTest_jar\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ MemsRELTest --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 2 source files to D:\RomanData\WorkSpace\MemsRELTest_jar\target\test-classes [INFO] [INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ MemsRELTest --- [INFO] Tests are skipped. [INFO] [INFO] --- maven-jar-plugin:3.2.0:jar (default-jar) @ MemsRELTest --- [INFO] Building jar: D:\RomanData\WorkSpace\MemsRELTest_jar\target\MemsRELTest-0.0.1.jar [INFO] [INFO] --- spring-boot-maven-plugin:2.5.4:repackage (repackage) @ MemsRELTest --- [INFO] Downloading from nexus-aliyun: https://maven.aliyun.com/repository/public/org/apache/httpcomponents/httpcore/4.4.13/httpcore-4.4.13.pom [INFO] Downloading from nexus-aliyun: https://maven.aliyun.com/repository/public/org/apache/maven/shared/maven-common-artifact-filters/3.2.0/maven-common-artifact-filters-3.2.0.pom [INFO] Downloading from nexus-aliyun: https://maven.aliyun.com/repository/public/org/apache/maven/plugins/maven-shade-plugin/3.2.4/maven-shade-plugin-3.2.4.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 14.509 s [INFO] Finished at: 2024-06-07T10:26:15+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.5.4:repackage (repackage) on project MemsRELTest: Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.5.4:repackage failed: Plugin org.springframework.boot:spring-boot-maven-plugin:2.5.4 or one of its dependencies could not be resolved: Failed to collect dependencies at org.springframework.boot:spring-boot-maven-plugin:jar:2.5.4 -> org.springframework.boot:spring-boot-buildpack-platform:jar:2.5.4 -> org.apache.httpcomponents:httpclient:jar:4.5.13 -> org.apache.httpcomponents:httpcore:jar:4.4.13: Failed to read artifact descriptor for org.apache.httpcomponents:httpcore:jar:4.4.13: Could not transfer artifact org.apache.httpcomponents:httpcore:pom:4.4.13 from/to nexus-aliyun (https://maven.aliyun.com/repository/public): Transfer failed for https://maven.aliyun.com/repository/public/org/apache/httpcomponents/httpcore/4.4.13/httpcore-4.4.13.pom ProxyInfo{host='10.10.2.93', userName='null', port=8080, type='https', nonProxyHosts='null'}: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
重点信息:unable to find valid certification path to requested target
原因:在 SSL/TLS 握手过程中,证书路径验证失败。这通常是由于缺少或不受信任的证书导致的,Maven 无法与远程仓库建立安全连接
解决办法:
1、更新java版本,java9以上自带证书
2、导入证书,参考链接
3、禁用证书验证,参考链接
4、以上不能解决,考虑maven的proxy代理问题。