Imagine I have the follwoing project structure:
a -> a-api
a-impl
b -> b-api
b-impl
And I want the build to fail when there is a dependency "cycle" because b-impl depends (transitively) on a-api and a-impl depends on b-api (note that this is not really a cycle).
I am not allowed to define additional dependencies (e.g. in a or b) and I am searching for a build plugin/configuration where this would automatically fail.
I'm currently evaluating if this is possible with a custom rule of the enforcer plugin: http://maven.apache.org/enforcer/enforcer-api/writing-a-custom-rule.html