日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

解决Jekins打包报错Failed to execute goal....

發(fā)布時間:2023/12/20 编程问答 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 解决Jekins打包报错Failed to execute goal.... 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

報錯信息

[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.2.5.RELEASE:repackage (repackage) on project ndc172: Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.2.5.RELEASE:repackage failed: Plugin org.springframework.boot:spring-boot-maven-plugin:2.2.5.RELEASE or one of its dependencies could not be resolved: Failed to collect dependencies at org.springframework.boot:spring-boot-maven-plugin:jar:2.2.5.RELEASE -> org.springframework.boot:spring-boot-loader-tools:jar:2.2.5.RELEASE: Failed to read artifact descriptor for org.springframework.boot:spring-boot-loader-tools:jar:2.2.5.RELEASE: Could not transfer artifact org.springframework.boot:spring-boot-loader-tools:pom:2.2.5.RELEASE from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.196.215] failed: Connection timed out: connect -> [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

問題分析

由于近期公司內部maven倉庫關了,而Jekins部署的服務器只能訪問內網,于是導致了上述問題。外網訪問不了那就把依賴先下載下來然后上傳到jekins服務器即可。

?

解決過程

1.上傳相關依賴到Jekins服務器,隨便找一個目錄存放即可(這里我放在了C:\.m2\repository)

2.修改Jekins編譯環(huán)境配置,maven編譯指令添加參數 -Dmaven.repo.local=C:\.m2\repository(等號后面是剛才依賴上傳到的目錄)

3.正常情況下完成上述兩個步驟就可以了。但是今天遇到了一個新問題,上傳之后明明本地已經有依賴了,maven還是一直去遠程倉庫下載依賴。所以我把所有C:\.m2\repository下所有的_remote.repositories文件全部剪切,丟進垃圾桶。

再回到Jekins重新Build一下。

總結

以上是生活随笔為你收集整理的解决Jekins打包报错Failed to execute goal....的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。