为了账号安全,请及时绑定邮箱和手机立即绑定

项目构建错误:不可解析的父 POM fo

项目构建错误:不可解析的父 POM fo

慕雪6442864 2021-12-10 10:56:42
这是我第一个使用 spring boot 的项目。所以我尝试使用父级更新 pom.xml,如下所示:<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">    <modelVersion>4.0.0</modelVersion>    <groupId>com.in28minutes.springboot</groupId>    <artifactId>first-springboot-project</artifactId>    <version>0.0.1-SNAPSHOT</version>    <name>springboot-in-10-steps</name>    <description>Demo project for Spring Boot</description>    <parent>        <groupId>org.springframework.boot</groupId>        <artifactId>spring-boot-starter-parent</artifactId>        <version>2.0.0.BUILD-SNAPSHOT</version> <!-- lookup parent from repository -->    </parent>    <dependencies>        <dependency>            <groupId>org.springframework.boot</groupId>            <artifactId>spring-boot-starter-web</artifactId>        </dependency>    </dependencies></project>但是,我得到了一个错误:项目构建错误:com.in28minutes.springboot:first-springboot-project:0.0.1-SNAPSHOT 的不可解析父 POM:找不到工件 org.springframework.boot:spring-boot-starter-parent:pom:2.0。 0.BUILD-SNAPSHOT 和 'parent.relativePath' 指向错误的本地 POM任何帮助请!
查看完整描述

2 回答

?
慕哥9229398

TA贡献1877条经验 获得超6个赞

没有这样的事情2.0.0-BUILD-SNAPSHOT,您可能直接从 Spring Boot 项目中复制了它?

Spring Boot 的发布版本可以在这里看到;

https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent

如果你想要最新的版本,<version>2.0.6.RELEASE</version>就可以了。

如果您想使用 SNAPSHOT 或 Milestone 版本,请参阅文档

https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/html/getting-started-installing-spring-boot.html#getting-started-maven-installation

它指定了所需的存储库。


查看完整回答
反对 回复 2021-12-10
?
收到一只叮咚

TA贡献1821条经验 获得超5个赞

更改2.0.0.BUILD-SNAPSHOT2.0.0.RELEASE


查看完整回答
反对 回复 2021-12-10
  • 2 回答
  • 0 关注
  • 204 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号