MeWrite Docs

Non-resolvable parent POM

Mavenで親POMの解決に失敗した場合に発生するエラー

概要

Non-resolvable parent POM は、pom.xmlで指定した親POM(<parent>要素)をMavenが解決できない場合に発生するビルドエラーです。Spring Bootプロジェクトで spring-boot-starter-parent を使用する際に頻発します。

エラーメッセージ

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.example:my-app:1.0-SNAPSHOT:
Could not find artifact org.springframework.boot:spring-boot-starter-parent:pom:3.2.0
in central (https://repo.maven.apache.org/maven2)
[ERROR] Non-resolvable parent POM: Failure to transfer
org.springframework.boot:spring-boot-starter-parent:pom:3.2.0
from https://repo.maven.apache.org/maven2 was cached in the local repository

原因

1. 親POMのバージョンが存在しない

1
2
3
4
5
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>999.0.0</version> <!-- 存在しないバージョン -->
</parent>

2. リポジトリにアクセスできない

ネットワーク制限やプロキシ設定の不備により、Maven Centralや社内リポジトリにアクセスできない場合があります。

3. ローカルキャッシュの破損

以前の失敗がキャッシュされ、再試行がブロックされている場合があります。

4. settings.xmlのミラー設定の誤り

ミラーリポジトリの設定が不正で、親POMを含むリポジトリにルーティングされない場合があります。

解決策

1. 親POMのバージョンを確認

Maven Central で正しいバージョンを確認します。

1
2
3
4
5
6
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>3.2.4</version> <!-- 実在するバージョン -->
    <relativePath/>
</parent>

2. <relativePath/> を明示する

ローカルの親POMを参照しない場合、空の <relativePath/> を追加します。

1
2
3
4
5
6
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>3.2.4</version>
    <relativePath/> <!-- リポジトリから取得 -->
</parent>

3. ローカルキャッシュを削除して強制更新

1
2
3
4
5
# 親POMのキャッシュを削除
rm -rf ~/.m2/repository/org/springframework/boot/spring-boot-starter-parent

# 強制更新でビルド
mvn clean install -U

4. settings.xmlのミラー設定を確認

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
<!-- ~/.m2/settings.xml -->
<settings>
    <mirrors>
        <mirror>
            <id>central-mirror</id>
            <mirrorOf>central</mirrorOf>
            <url>https://repo.maven.apache.org/maven2</url>
        </mirror>
    </mirrors>
</settings>

5. プロキシ設定を確認

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
<!-- ~/.m2/settings.xml -->
<settings>
    <proxies>
        <proxy>
            <id>my-proxy</id>
            <active>true</active>
            <protocol>https</protocol>
            <host>proxy.example.com</host>
            <port>8080</port>
        </proxy>
    </proxies>
</settings>

デバッグ方法

1
2
3
4
5
# 詳細なデバッグ出力
mvn clean install -X

# 有効なsettings.xmlを表示
mvn help:effective-settings

関連エラー

関連エラー

Java の他のエラー

最終更新: 2026-02-12