Skip to main content

org.apache.maven.reactor.MavenExecutionException: Cannot find parent:

This exception will occur maven project has like below structure and parent POM is not installed in repository that means first time building.


|-- my-module
| `-- pom.xml
`-- parent
     `-- pom.xml 

To solve this error need add relative path in other POMs in parent section.

        <parent>
<groupId>parent.group</groupId>
<artifactId>parent.artifact</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>

Comments