亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

Maven中Could not find artifact XXXX的錯誤解決

 更新時間:2022年03月02日 15:46:50   作者:那就努力吖  
本文主要介紹了Maven中Could not find artifact XXXX的錯誤解決,文中通過示例代碼介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們可以參考一下

我目前碰到的是:

Could not find artifact com.alibaba.cloud:spring-cloud-alibaba-dependencies:pom:2.1.0 RELEASE in central

出現(xiàn)問題的原因其實(shí)很簡單,寫錯了版本號?。?.1.0 RELEASE中間不該是空格而應(yīng)該是.,即應(yīng)該寫成如下:

<dependencyManagement>
? ? <dependencies>
? ? ? <!-- spring cloud alibaba 2.1.0.RELEASE-->
? ? ? <dependency>
? ? ? ? <groupId>com.alibaba.cloud</groupId>
? ? ? ? <artifactId>spring-cloud-alibaba-dependencies</artifactId>
? ? ? ? <version>2.1.0.RELEASE</version>
? ? ? ? <type>pom</type>
? ? ? ? <scope>import</scope>
? ? ? </dependency>

在Maven引入alibaba.cloud依賴時,可在父類pom進(jìn)行指定應(yīng)該如下:

<!-- 子模塊繼承后,提供作用:鎖定版本 + 子module不用寫groupId和version-->
? <dependencyManagement>
? ? <dependencies>

? ? ? <!-- springBoot 2.2.2 -->
? ? ? <dependency>
? ? ? ? <groupId>org.springframework.boot</groupId>
? ? ? ? <artifactId>spring-boot-dependencies</artifactId>
? ? ? ? <version>2.2.2.RELEASE</version>
? ? ? ? <type>pom</type>
? ? ? ? <scope>import</scope>
? ? ? </dependency>

? ? ? <!-- spring cloud Hoxton.SR1 -->
? ? ? <dependency>
? ? ? ? <groupId>org.springframework.cloud</groupId>
? ? ? ? <artifactId>spring-cloud-dependencies</artifactId>
? ? ? ? <version>Hoxton.SR1</version>
? ? ? ? <type>pom</type>
? ? ? ? <scope>import</scope>
? ? ? </dependency>
? ? ??
? ? ? <!-- spring cloud alibaba 2.1.0.RELEASE-->
? ? ? <dependency>
? ? ? ? <groupId>com.alibaba.cloud</groupId>
? ? ? ? <artifactId>spring-cloud-alibaba-dependencies</artifactId>
? ? ? ? <version>2.1.0.RELEASE</version>
? ? ? ? <type>pom</type>
? ? ? ? <scope>import</scope>
? ? ? </dependency>
? </dependencyManagement>

以上三個依賴基本都是在一起的,其中版本號自行制定即可,但一定不要寫錯了,不然后期很麻煩!

到此這篇關(guān)于Maven中Could not find artifact XXXX的錯誤解決的文章就介紹到這了,更多相關(guān)Maven Could not find artifact內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評論