Error Knowledge Base MAVEN NON_RESOLVABLE_PARENT_POM

Non-resolvable parent POM

Maven cannot resolve the `<parent>` POM for your project from the local filesystem or configured repositories.

Affected versions: All supported Apache Maven versions.

What This Error Means

Maven cannot resolve the <parent> POM for your project from the local filesystem or configured repositories.

How to Fix It

  1. Confirm the parent coordinates in <parent> are exactly correct (including snapshot vs release).
  2. If the parent is part of the same multi-module build, run from the reactor root (the directory containing the aggregator pom.xml).
  3. If the parent should be local, fix <relativePath> to point at the correct parent POM file. If you want to disable local resolution, set <relativePath/> to empty so Maven resolves the parent from repositories.
  4. If the parent is remote/private, add the correct repository (or configure a mirror) and configure credentials in ~/.m2/settings.xml under <servers>.
  5. Force Maven to retry once: mvn -U -DskipTests package.
  6. If a cached miss exists, delete *.lastUpdated under ~/.m2/repository/<groupId path>/<artifactId>/, then rerun.

Why It Happens

  • The parent POM was not installed/deployed, or the coordinates are wrong.
  • <parent.relativePath> points to a non-existent or incorrect local POM (common in CI/monorepos).
  • The parent is in a private repository that is not configured (or requires credentials).
  • A cached not found result (*.lastUpdated) is preventing Maven from re-checking immediately.

How to Verify

  1. Re-run mvn -DskipTests package and confirm Maven proceeds past the model-building phase.
  2. Confirm the parent POM exists in ~/.m2/repository/<groupId path>/<artifactId>/<version>/ if it is resolved remotely.

Manual parent POM checks

  1. Open pom.xml and verify <parent> coordinates (groupId, artifactId, version) are correct.
  2. If you rely on <relativePath>, confirm the parent POM file actually exists at that path (and that CI uses the same workspace layout).
  3. If the parent is remote, confirm your repository configuration and credentials: mvn -q help:effective-settings.
  4. Force updates once (helps after publishing a new parent): mvn -U -DskipTests package.

Common CLI Output

[ERROR] Non-resolvable parent POM for com.example:app:1.0.0: Could not find artifact com.example:parent:pom:1.0.0 in central (https://repo.maven.apache.org/maven2) and 'parent.relativePath' points at wrong local POM
[ERROR] Non-resolvable parent POM for com.example:app:1.0.0: Failed to transfer artifact com.example:parent:pom:1.0.0 from/to internal (https://repo.example.com/maven): Return code is: 401, ReasonPhrase: Unauthorized.

How parent POM resolution works

  1. Maven uses the <parent> section to inherit dependencyManagement, pluginManagement, properties, and other build configuration.
  2. Maven can resolve the parent either from a relative path (<relativePath>) or by downloading the parent POM from configured repositories.
  3. If the parent is missing, not accessible, or blocked by auth/TLS/proxy, Maven cannot build the effective model and the build fails early.

Prevention Tips

  • Publish parent POMs to a repository manager and rely on remote resolution in CI.
  • Avoid fragile <relativePath> assumptions when building in different directory layouts.
  • Use a single mirrored repository configuration in settings.xml across environments.

Where This Can Be Triggered

github.com/apache/maven/blob/maven-3.9.11/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java

Maven's model builder throws an UnresolvableModelException with the "Non-resolvable parent POM" message when the parent cannot be resolved. - GitHub

throw new UnresolvableModelException(
        "Non-resolvable parent POM " + model.getParent() + " for " + model.getGroupId() + ":" + model.getArtifactId() + ":" + model.getVersion()
                + ": " + e.getMessage(),
        model.getGroupId(),
        model.getArtifactId(),
        model.getVersion(),
        model.getParent().getGroupId(),
        model.getParent().getArtifactId(),
        model.getParent().getVersion());

Need help or found a mistake? Contact RepoFlow support for questions.

Join our mailing list