Reputation: 157
I have a Parent POM that has a Child mentioned in its <dependencies>
section. Is this allowed?
Please note this is not the <dependencyManagement>
section but the <dependencies>
section itself, so that any child inheriting from this parent will have all these dependencies available for them by default.
However, these children that are part of the <dependencies>
section of the parent, have to somehow exclude themselves from the parent when they are built?, Is this possible?
Currently, the child builds are failing saying that they are referencing themselves from the dependencies section of the parent.
The reason why we have these children as part of the parent's dependencies section is because these dependencies have to be available by default for the other children of the parent implicitly.
Any suggestions / help is much appreciated!
Upvotes: 1
Views: 133
Reputation: 35785
You cannot use modules as dependencies in the parent POM.
The modules need to declare their dependencies to other modules themselves.
Upvotes: 1