A shared module unnecessarily lists itself as an allowed target
A module that @Modulithic(sharedModules = …) names, and that declares allowedDependencies = {}, gets this message:
Module 'shared' depends on module 'order' via … Allowed targets: shared.
ApplicationModule#getAllowedDependencies adds all shared modules, and the module itself is not excluded (source https://github.com/spring-projects/spring-modulith/blob/2.1.1/spring-modulith-core/src/main/java/org/springframework/modulith/core/ApplicationModule.java#L524-L529).
A dependency inside the same module is never checked, so the entry has no effect on the result. It only appears in the message. For a non-shared module with allowedDependencies = {}, the message says "Allowed targets: none."
Is this intended, or should the module itself be left out of its own allowed dependencies?
A minimal project is attached.
That's fixed. Please give the snapshots a try.