You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Spring Boot项目pom.xml父依赖解析失败求助

Fixing Non-Resolvable Parent POM Error in Spring Boot

Hey there, I’ve run into this exact Maven issue before—let’s get your Spring Boot project back on track. The error you’re seeing means Maven tried to pull the spring-boot-starter-parent 2.0.0.RELEASE POM from Maven Central, failed (probably due to a blip in network connectivity, proxy issues, or a temporary repo outage), and then cached that failure so it wouldn’t waste time retrying automatically. Here’s how to fix it:

Step 1: Clear the cached failure files from your local Maven repo

Maven stores a record of failed downloads in your local repository. You need to delete these files to force it to try again:

  • Navigate to your local Maven repo path:
    • On Linux/macOS: ~/.m2/repository/org/springframework/boot/spring-boot-starter-parent/2.0.0.RELEASE/
    • On Windows: C:\Users\[YourUsername]\.m2\repository\org\springframework\boot\spring-boot-starter-parent\2.0.0.RELEASE\
  • Delete the files named _remote.repositories and any files ending with .lastUpdated in that directory.

Step 2: Force Maven to update dependencies

Open your terminal/command prompt, go to your project’s root directory (where the pom.xml lives), and run this command:

mvn clean install -U

The -U flag tells Maven to force update all dependencies, ignoring the cached failure status we just deleted.

Step 3: Verify network and proxy settings (if the above doesn’t work)

If you still get the error, double-check:

  • Your internet connection is working, and you can access the Maven Central repo directly in a browser.
  • If you’re behind a proxy, make sure your settings.xml (in ~/.m2/ or your Maven installation’s conf/ folder) has the correct proxy configuration.

Step 4: (Optional) Try a different Spring Boot version

While 2.0.0.RELEASE is a valid version, it’s pretty outdated. If you don’t have a hard requirement to use this specific version, consider upgrading to a more recent stable release (like 2.7.x or 3.x, depending on your Java version) by updating the parent version in your pom.xml:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.7.15</version> <!-- Or a newer compatible version -->
    <relativePath/> <!-- lookup parent from repository -->
</parent>

Once you’ve done these steps, reload your project in your IDE (if you’re using one—for IntelliJ, click the "Reload All Maven Projects" button in the Maven tool window) and the error should be gone.

内容的提问来源于stack exchange,提问作者Omar Amaoun

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 07:44:47