How to layout your modules
One module should have a single main package, its code base. Any main API goes into the module's main package. There can be any number of subpackages, which can again be API packages. For any API package, some special subpackages may be used to improve consistency Identification of (API) modules should be (TBC): If service provider or other implementation modules are separated from API modules (TBC): Packages
support
- API-supporting API. Provides optional implementations of interfaces in the main API from support/..
. Support classes should not be used by the API itself.util
- also API, but provides utilities for support, for the API itself or for users. Classes can be used by any other packages.internal
- Private API implementations detailsimpl
- Like internalIdentification of Modules
groupId
- should be the fully qualified main package parent nameartifactId
- should be the main package namegroupId
- should be the fully qualified API package parent nameartifactId
- should be the API package name + "-" + service/impl. nameRequirements for API packages
package-info.java
which describes the API's purpose, its use cases and provides example usages.