解决Jekins打包报错Failed to execute goal....
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                解决Jekins打包报错Failed to execute goal....
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.                        
                                報錯信息
[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部署的服務器只能訪問內網(wǎng),于是導致了上述問題。外網(wǎng)訪問不了那就把依賴先下載下來然后上傳到jekins服務器即可。
?
解決過程
1.上傳相關依賴到Jekins服務器,隨便找一個目錄存放即可(這里我放在了C:\.m2\repository)
2.修改Jekins編譯環(huán)境配置,maven編譯指令添加參數(shù) -Dmaven.repo.local=C:\.m2\repository(等號后面是剛才依賴上傳到的目錄)
3.正常情況下完成上述兩個步驟就可以了。但是今天遇到了一個新問題,上傳之后明明本地已經(jīng)有依賴了,maven還是一直去遠程倉庫下載依賴。所以我把所有C:\.m2\repository下所有的_remote.repositories文件全部剪切,丟進垃圾桶。
再回到Jekins重新Build一下。
總結
以上是生活随笔為你收集整理的解决Jekins打包报错Failed to execute goal....的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: MOS管工作动画原理图详解
- 下一篇: 网络视频监控系统的现状和发展
