tags:

views:

13

answers:

1

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?

A: 

There is no general rule. Use the groupId to 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 same groupId for all their modules.

But nothing forces you to use a unique groupId per 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.appname and then a.b.appname.moduleN if the application is big and has many modules is a common pattern.

Pascal Thivent