Skip to content
Latchkey

Maven "Non-resolvable parent POM" - Fix in CI

Maven could not find the parent POM your project inherits from. Either the relativePath points nowhere, or the parent artifact was never published to a repository Maven can reach.

What this error means

The build fails almost immediately while reading the POM, with Non-resolvable parent POM for ... and a note that the parent could not be found and relativePath did not point at a local POM.

mvn 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
and 'parent.relativePath' points at no local POM @ line 4, column 13

Common causes

relativePath points at a missing local POM

By default Maven looks for the parent at ../pom.xml. In a CI checkout or a flattened directory layout, that path may not exist, so Maven falls back to repositories and finds nothing.

Parent artifact not published

For a multi-module build, the parent must either be in the same reactor (built together) or installed/deployed to a repository. Building one module alone without the parent available fails.

How to fix it

Build from the aggregator so the parent is in the reactor

Run Maven from the directory containing the parent/aggregator POM so all modules, including the parent, are part of the same build.

Terminal
mvn -f pom.xml install
# build a single module plus its required upstream modules:
mvn -pl :app -am install

Fix or disable relativePath

If the parent is resolved from a repository rather than a sibling directory, set an empty relativePath so Maven does not look on disk.

pom.xml
<parent>
  <groupId>com.example</groupId>
  <artifactId>parent</artifactId>
  <version>1.0.0</version>
  <relativePath/>  <!-- resolve from repository, not disk -->
</parent>

How to prevent it

  • Build multi-module projects from the aggregator POM with -am when targeting one module.
  • Use <relativePath/> when the parent comes from a repository, or a correct path when it is local.
  • Deploy the parent POM to your repository before building dependent modules in isolation.

Frequently asked questions

What causes ""Non-resolvable parent POM""?
By default Maven looks for the parent at ../pom.xml. In a CI checkout or a flattened directory layout, that path may not exist, so Maven falls back to repositories and finds nothing.
How do I fix "Non-resolvable parent POM"?
Run Maven from the directory containing the parent/aggregator POM so all modules, including the parent, are part of the same build.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card