Here is a sample repository for this case: https://github.com/xShadov/maven-plugin-dependency-sample
When maven plugin uses a plugin dependency, and that dependency comes from the same project, maven cannot do it - it fails immediately. That is not the case with normal dependencies, only plugin dependencies.
I try to do it with spring-cloud-contract-maven-plugin
, but the case is generic, it happens with every plugin. Spring cloud contract in their samples have exactly the same case (beer-common-dependency), but looking at their README
, they have the same problem (You can run Maven from the root folder once the "common" module has been installed.
).
Is there a way to solve it? I couldn't find one, and neither could guys from spring cloud contract, so probably not, but I want to be sure. Is it a bug or intended maven behavior?
This problem is serious for me, it's not possible to build a project with a single command, and complicates things even further on CI, because of version mismatch.