How should I name my Java 9 module?

后端 未结 2 1371
一个人的身影
一个人的身影 2020-12-15 16:15

Suppose I have a library with groupId = org.abc and artifactId = myLibrary. What is the recommended name for the module name: myLibrary

2条回答
  •  囚心锁ツ
    2020-12-15 16:57

    I think we got an "official" answer from Mark Reinhold:

    Strongly recommend that all modules be named according to the reverse Internet domain-name convention. A module's name should correspond to the name of its principal exported API package, which should also follow that convention. If a module does not have such a package, or if for legacy reasons it must have a name that does not correspond to one of its exported packages, then its name should at least start with the reversed form of an Internet domain with which the author is associated.

提交回复
热议问题