'parent.relativePath' points at my com.mycompany:MyProject instead of org.apache:apache - Why?

Add an empty <relativePath> to <parent> so that it resolves the parent pom from the repositories.

  <parent>
    <groupId>org.apache</groupId>
    <artifactId>apache</artifactId>
    <version>8</version>
    <relativePath></relativePath>
  </parent>

Here is the relevant doc.

This feature is only for enhancing the development in a local checkout of that project. Set the value to an empty string in case you want to disable the feature and always resolve the parent POM from the repositories.
Default value is: ../pom.xml.


either ignore the warning, move the sources out of the unrelated parent or enter the correct value of to the element. The problem is caused by the default value for relativePath which is ../pom.xml and that default value gets injected in your effective pom, triggering the warning.


That message might be caused by a pom.xml in the parent directory relative to your current project. The pom in the parent directory does not match the project.parent config of the current pom.

Tags:

Maven