To solve the parent project, these possible sources are checked:
- relativePath
- local repository
- remote repositories
The relative path, if not specified explicitly, defaults to .. , that is, pom in the parent directory of the current project. Therefore, Maven checks to see if there is a pom file in this directory and b) this pom file contains the same coordinates as those specified in the parent definition of the current project.
If a) and b) are true, then the pom file is used as the parent to resolve the effective pom.
If a) is true and b) is false, a warning is issued because this usually indicates a misconfigured project (as in your case), and pom is ignored.
If a) false, other sources are checked.
So, in your case, I suppose you have the following in your utils / pom.xml
<parent> <groupId>...</groupId> <artifactId>ref-pom</artifactId> <version>..</version> </parent>
which implicitly includes <relativePath>..</relativePath> . So, Maven checks the utils parent directory, finds the POM, but this point is called project-parent instead of the expected ref-pom . So a warning.
The following steps will work:
<parent> <groupId>...</groupId> <artifactId>ref-pom</artifactId> <version>..</version> <relativePath>../ref-pom</relativePath> </parent>
(Note that in the text you write about ref-pom, but in the above modules there is only client-ref-pom and server-ref-pom )
but
You should consider whether this is really what you want, in your case, if you really need separate *-ref-pom modules or if the contents of these priests can and should be better placed inside the corresponding *-util modules,