I have a package "parent" which contains packages "parent.child1", "parent.child2" etc.
I wish to enforce that classes in "parent.x" cannot reference classes in "parent.**" (other than in "parent.x" and "parent.x.**").
The first bit is an easy, albeit recursive, Architectural Constraint. The "other than" clause is the tricky bit.
The reason we have this structure in our multi-module maven project is that each "child" is a small and self-contained collection of classes. It is impractical to make each "child" into a maven module. We're talking 5 or 6 classes in each, and it is at developers' discretion to create new "child" packages.
Thanks and regards, Robin.