Could not find artifact org.springframework.boot:spring-boot-starter-parent:pom:3.2.1.RELEASE in alimaven

在idea中使用maven命令

mvn spring-boot:run

运行项目的时候,提示以下错误

// An highlighted block
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.example:demo1:0.0.1-SNAPSHOT: The following artifacts could not be resolved: org.springframework.boot:spring-boot-starter-p
arent:pom:3.2.1.RELEASE (absent): Could not find artifact org.springframework.boot:spring-boot-starter-parent:pom:3.2.1.RELEASE in alimaven (http://maven.aliyun.com/
nexus/content/groups/public/) and 'parent.relativePath' points at no local POM @ line 5, column 13

原因:阿里云maven中没有3.2.1版本

解决方法:
将3.2.1.RELEASE删除,然后随便写入某一个数字,例如6(如果输入的数字不存在,可以换一个别的数字,例如0),idea会自动展示出阿里云maven中存在的版本,从里面选择一个版本就可以了
自动展示版本

Logo

鸿蒙生态一站式服务平台。

更多推荐