Maven3 multi module child groupId

In maven3, I get warnings if I indicate that the groupId of the child module in a project with multiple modules will be the same as the parent. Now I'm not sure if this indicates that I should use another groupId, or if I should omit it, in order to use the parent groupId.

According to http://maven.apache.org/guides/mini/guide-naming-conventions.html

A good way to determine the granularity of groupId is to use the project structure. That is, if the current project is a project with several modules, it must add a new identifier to parentId. eg. org.apache.maven, org.apache.maven.plugins, org.apache.maven.reporting

This makes me think that every child should have a different group than the parent. It is right?

+3
source share
1 answer

From maven documentation

If we want the groupId and / or version of your modules to be the same as their parents, you can remove the groupId and / or version of the identity of your module in the POM. This allows the module to inherit groupId and / or the version of the parent POM.

A warning allows the user to find out about this and avoid situations such as spelling groupIdor versionId.

+2
source

All Articles