问题描述
有人帮帮我 我在尝试保存 pom.xml 时遇到以下问题 文件:
项目构建错误:不可解析的父 POM:无法传输 org.springframework.boot:spring-boot-starter- parent:pom:2.5.0 from http://uk.maven.org/maven2 已缓存在本地存储库中,解析不会 重新尝试,直到 UK 的更新间隔已过或强制更新。原始错误:无法传输工件 org.springframework.boot:spring-boot-starter-parent:pom:2.5.0 from/to UK (http://uk.maven.org/maven2): null to http://uk.maven.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.5.0/spring-boot-starter- parent-2.5.0.pom 和 'parent.relativePath' 指向没有本地 POM
这是我的 pom.xml
4.0.0
org.springframework.boot
spring-boot-starter-parent
2.5.0
com.example
马银行
0.0.1-快照
马银行
Spring Boot 的演示项目
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>MysqL</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
解决方法
被缓存在本地仓库,看来你的maven无法加载 尝试重新安装 maven,并尝试使用 https://start.spring.io
生成此项目