Automatic-Module-Name: Calling all Java Library Maintainers - Branch and Bound suggests:
For libraries it’s essential to pick a globally unique module name. A long-standing practice in Java is to use reverse DNS notation for packages (e.g.
com.acme.mylibrary.core
). We can apply the same to module names. Name your module after the root package of your module. This is the longest shared prefix of all packages in the module (for the previous example it might becom.acme.mylibrary
). Read Stephen Colebourne’s excellent advice on why this is a good idea. Ensure your module name is valid, meaning it consists of one or more java identifiers separated by a dot.
Also I think this is copy-pasted code and I don’t know where it originates, but e.g. scala/project/AutomaticModuleName.scala at 2.13.x · scala/scala · GitHub says:
* !! DO NOT BE TEMPTED INTO AUTOMATICALLY DERIVING THE NAMES FROM PROJECT NAMES !!
*
* The names carry a lot of implications and DO NOT have to always align 1:1 with the group ids or package names,
* though there should be of course a strong relationship between them.