Should groupId be unique in a multi-module project?

I have a multi-module maven project. What are the best methods for creating groupId? Can I use one common group for all modules or unique for each?

+3
source share
1 answer

There is no general rule. Use groupIdto separate (or not) things that have different problems, but are coarse-grained. XWiki is a good illustration of this approach. Hibernate is another example: they use the same groupIdfor all of their modules.

But nothing forces you to use unique groupIdfor each module, it seems too thin for me (this is like creating a package for each class).

In a corporate environment, using something like a.b.appname, and then a.b.appname.moduleNif the application is large and has many modules, this is a common template.

+4
source

Source: https://habr.com/ru/post/1742245/


All Articles