Assuming you are talking about the local repo usually located at ~/.m2/repository
, yes, that is normal. You have to distinguish between the folder layout within the repository and the folder layout for your development.
As mentioned in this question, the artifacts are always in a folder structure according to their coordinates (groupId
, artifactId
and version
).
groupIdSplitAtDots/artifactId/version
Whether some artifacts are modules of another is completely irrelevant for the directory-layout of the local repository.
If you have e.g. the artifacts com.organisation.topic:artifact-parent:1.2
, com.organisation.topic:artifact-module1:1.2
and com.organisation.topic:artifact-module2:1.2
, the folder structure will be:
com
|-- organisation
|-- topic
|-- artifact-parent
|-- 1.2
|-- artifact-module1
|-- 1.2
|-- artifact-module2
|-- 1.2
Note, that for development it is usually a good idea to have the parent module in a parent folder, resulting in a layout like this:
artifact-parent
|-- artifact-module1
|-- artifact-module2
As per your second question, identical module names (artifactId
s) are not allowed. Regarding the artifactId
the docs state:
The identifier for this artifact that is unique within the group given by the group ID.