SO I have a Parent POM with three modules defined as so:
<modules> <module>m1</module> <module>m2</module> <module>m3</module> </modules> The parent also has two dependencies defined on its own modules:
<dependency> <artifiactId>m1</artifactId> </dependency> <dependency> <artifiactId>m2</artifactId> </dependency> When I try to build the project the build for the first module fails because it cannot find itself in the repository.
I have already figured out the when building m1 its trying to resolve the parent dependency on m1 in order to build m1. Obviously if you depend on yourself and you don't exist how can you build.
My question is should the Parent POM besides stating the modules have a dependency on them as well? Wondering what the correct practice is here?
NOTE: Parent has no code to itself:
- parentProj
- m1
- java
- resources
- m1Pom
- m2
- java
- resources
- m1Pom
- m3
- java
- resources
- m1Pom
- parentPom
- m1