java - 项目构建错误:Non-resolvable parent POM: Failure to transfer org.springframework.boot:spring-boot-starter-parent:
问题描述
有人帮助我,我在尝试保存 pom.xml 文件时遇到了以下问题:
项目构建错误:Non-resolvable parent POM: Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:2.5.0 from http://uk.maven.org/maven2 is cached in the local repository , 直到 UK 的更新间隔已过或强制更新后才会重新尝试解决。原始错误:无法将工件 org.springframework.boot:spring-boot-starter-parent:pom:2.5.0 从/到英国(http://uk.maven.org/maven2):null 到 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 MaBanque 0.0.1-SNAPSHOT MaBanque Demo project for Spring Boot <java.version>11</java.version> org.springframework.boot spring-boot-starter-data-jpa org.springframework.boot spring-boot-starter-security org.springframework.boot spring-boot-starter-thymeleaf org.thymeleaf.extras thymeleaf-extras-springsecurity5
<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尝试生成这个项目
推荐阅读
- css - 自定义 gollum wiki 的布局
- c# - 当 RequiredFieldValidator 存在于 Bootstrap 模式中时,单击事件上的 Asp 按钮不会触发
- xamarin - MainActivity.OnActivityResult(int, Result, Intent)':在 Xamrine 中找不到合适的方法来覆盖
- algorithm - 为什么 BFS 不能将无向图转换为 DAG?
- python - “ValueError:不支持多类格式” roc_auc_score
- javascript - 将多个 SVG 对齐到环绕元素
- java - JavaFX - 后台线程上的 javafx.beans.property 更新
- google-cloud-platform - 将设备从一个注册表复制到另一个 Google IoT Core
- android - 在 Android 7(root)上,libusb_init 失败并显示 LIBUSB_ERROR_OTHER
- swiftui - 在 SwiftUI 中更轻松或更紧凑地实现等待代码