项目构建错误:com.demo.springrest:SpringRest:0.0.1-SNAPSHOT的不可解析的父POM:传输失败 org.springframework.boot:spring-boot-starter-parent:pom:2.0.6.RELEASE来自https://repo.maven.apache.org/maven2 已存储在本地存储库中,直到中心的更新间隔过去或 更新是强制性的。原始错误:无法传输工件org.springframework.boot:spring-boot-starter-parent:pom: 2.0.6。从/到中央(https://repo.maven.apache.org/maven2)的释放:连接超时和'parent.relativePath' 指向没有本地POM
我试图清理Maven本地存储库,但仍然存在相同的问题。 需要我们的帮助来解决。 示例POM文件如下:-
<?xml version="1.0" encoding="UTF-8"?>
<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.demo.springrest</groupId>
<artifactId>SpringRest</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>SpringRest</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.6.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>