Project build error: Non-resolvable parent POM for

Project build error: Non-resolvable parent POM for

我是 Maven 世界的新手。我正在尝试在 私人公司 中使用 Spring 工具套件 创建一个虚拟 spring 引导项目。每当我尝试创建 spring-boot 项目时,我都会收到以下错误。跟私有网络有关系吗??如果没有,是不是我的maven安装有问题?我该怎么做 运行?

这是错误:

Project build error: Non-resolvable parent POM for com.example.dummy:dummy-project:0.0.1-SNAPSHOT: Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:2.1.0.BUILD-SNAPSHOT from https://repo.spring.io/snapshot was cached in the local repository, resolution will not be reattempted until the update interval of spring-snapshots has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.0.BUILD-SNAPSHOT from/to spring-snapshots (https://repo.spring.io/snapshot): repo.spring.io and 'parent.relativePath' points at no local POM pom.xml /dummy-project line 14 Maven pom Loading Problem

您项目的 pom.xml 文件有一个所谓的父 pom.xml 文件。 parent-pom 只是 spring.io 服务器上的另一个 pom 文件。 Maven 下载该 pom 文件并将其配置与项目的 pom 配置合并。

因此,maven 需要访问 https://repo.spring.io/snapshot 才能下载父 pom。由于父 pom 将缓存在您的本地 maven 存储库中,因此您只需要访问该服务器一次。