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