有兩個遠程服務器呈現。假設我們將它們命名爲A和B. 我的Java代碼已在GIT存儲庫中提交併保持最新。 我在服務器A和B上都提取了代碼。當我在服務器A上使用mvn clean package install時,它的正常工作和構建都成功完成。 但是,當我使用mvn乾淨的包安裝服務器B它給我跟隨建立失敗按摩的錯誤。Maven錯誤,PKIX路徑構建失敗:無法找到有效的證書路徑到所請求的目標
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] oagi-srt ........................................... SUCCESS [ 0.292 s]
[INFO] oagi-srt-common .................................... SUCCESS [ 1.959 s]
[INFO] oagi-srt-repository ................................ SUCCESS [ 2.357 s]
[INFO] oagi-srt-service ................................... SUCCESS [ 2.064 s]
[INFO] oagi-srt-import .................................... SUCCESS [ 3.064 s]
[INFO] oagi-srt-webapp .................................... FAILURE [ 21.398 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31.539 s
[INFO] Finished at: 2017-08-10T11:50:10+00:00
[INFO] Final Memory: 44M/303M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project srt-webapp: Could not resolve dependencies for project org.oagi:srt-webapp:war:1.0.0: Failed to collect dependencies at org.joinfaces:jsf-spring-boot-starter:jar:2.2.7 -> org.primefaces.extensions:all-themes:jar:1.0.8 -> org.primefaces.themes:afterdark:jar:1.0.8: Failed to read artifact descriptor for org.primefaces.themes:afterdark:jar:1.0.8: Could not transfer artifact org.primefaces.themes:themes-project:pom:1.0.8 from/to prime-repo-new (http://repository.primefaces.org): 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/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :srt-webapp
注: - 如果我直接把項目戰爭文件在Tomcat和重新啓動服務器,我的應用程序工作正常,因爲我預計這兩個服務器上。
謝謝路易斯,你的建議幫了我很多。我交叉檢查證書環境,並且服務器B上不存在某些證書。 – Swagat