当前位置: 首页 > 知识库问答 >
问题:

项目生成错误:父POM fo不可解析

史昱
2023-03-14

这是我第一个使用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的父POM不可解析。springboot:first-springboot-project:0.0.1-snapshot:找不到项目org.springframework.boot:spring-boot-starter-parent:POM:2.0.0.build-snapshot和“parent.relativePath”指向错误的本地POM

共有1个答案

魏毅
2023-03-14

没有2.0.0-build-snapshot这样的东西,您可能直接从Spring Boot项目中复制了它?

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

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

https://docs.spring.io/spring-boot/docs/current-snapshot/reference/html/gett-start-installing-spring-boot.html#gett-start-maven-installation

指定所需的回购。

 类似资料:
  • null 项目生成错误:无法解析得父POM无法传输org.springframework.boot:spring-boot-starter-parent:POM:2.0.0.来自http://repo.maven.apache.org/maven2/得版本已缓存在本地存储库中,在经过artie得更新间隔或强制更新之前,将不会重新尝试解析.原始错误:无法传输项目org.springframework

  • 我正在使用maven创建我的第一个spring boot应用程序,我得到了这个错误: bank_application:bank_application:0.0.1的不可解析父POM-快照:无法传输工件org.springframework.boot:spring-boot-starter-parent:POM:1.4.2 这是我的pom.xml

  • 我是Spring靴的初学者。我遵循了入门指南。但没有成功。之后,我从这个链接导入一个项目 http://www.springboottutorial.com/Introduction-to-jpa-with-spring-boot-data-jpa。 我想我错过了一些重要的配置。 谢谢你

  • 我刚刚做了我的第一个Spring Starter项目,我一直得到这个错误。 项目生成错误:COM的父POM不可解析。示例:aop_demo:0.0.1-snapshot:无法传输项目org.springframework.boot:spring-boot-starter-parent:POM:2.1.3.从/到repositor.spring.milestone(https://repo.spri

  • 我对Maven的世界是新的。我正在尝试创建一个虚拟的Spring Boot项目使用spring工具套件在一个私人公司。每当我尝试创建一个spring-boot项目时,我都会得到以下错误。是否与专用网络有关??如果没有,我的maven安装有什么问题吗?我怎么让它运行? 这里有个错误: 项目生成错误:com.example的父POM不可解析。dummy:dummy-project:0.0.1-snap

  • 这是我的pom.xml 此行导致问题。 项目生成错误:com.skm:myapps:0.0.1-快照:无法解析org.springframework.boot:spring-boot-starter-parent:POM:2.0.2。来自https://repo.maven.apache.org/maven2的版本缓存在本地存储库中,在central的更新间隔已过或强制更新之前,不会重新尝试解析。