These parts usually enter into my package names
- Domain name (your's or your company's / customer's) backwards
- Project name
- Artifact name (api, client, test etc.)
- Functionality
example:
com.mycompany.myproject.api.services
// contains service interfaces for project myproject
com.mycompany.myproject.common.util.string
// contains string-related utility classes that reside in a library module
// that will be used by several other artifacts
One good practice is to have a common root package that is distinct for an individual project (jar etc). For example: in the jar myproject-api.jar , the root package would be com.mycompany.myproject.api
. That way you always know where to find your classes.