I have a maven multimodule project. What the best practices for creating groupId? Can I use one common groupId for all modules or unique per each?
I have a maven multimodule project. What the best practices for creating groupId? Can
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no general rule. Use the
groupIdto separate (or not) things that have different concerns, but coarse grained. XWiki is a good illustration of this approach. Hibernate is another example, they use the samegroupIdfor all their modules.But nothing forces you to use a unique
groupIdper module, this seems clearly too fine grained to me (this sounds like creating a package for each class).In a corporate environment, using something like
a.b.appnameand thena.b.appname.moduleNif the application is big and has many modules is a common pattern.