Reputation: 1596
I'm pretty newbie in Maven. Maybe that's is reason of this question :)
Today I tried to download project called Sonar Runner and just see how it's working. It was pretty strange experience for me because this project has 4 submodules:
They have respectively: 17, 2, 8 and 13 java files.
It makes me wonder why it's so fine grained. I know that you don't know what was their reasons. But I'm curious what reasons can be.
Until now I thought that size of project is a reason or separate teams working on diffrent parts of project.
But when project has 40 java files I guess size is not the reason.
What I get when I use multi-module project instead of one big project?
I tried to find out the answer in Google but with no luck.
EDIT: I found this one: Is there any benefit in using Maven Multimodule when working in a small application?
But still with project having 40 java files. Splitting it into 4 submodules seems just ridiculous for me.
Are there any other benefits?
Upvotes: 9
Views: 3512
Reputation: 43661
I'm almost always do multi-module Maven projects - even if I'm hacking some open-source experiment alone.
There many reasons to do multi-module projects:
pom
and a child jar
module. And move the organisational stuff to the parent pom
.A
depends on B
and B
depends on a part of A
, you may need to split A
in A1
and A2
.And probably much more.
These reasons are so many so since years already I prefer to start with the parent/child setup from the very start. I can't recall a single project I was involved in, which would stay single-module.
Even splitting 2-file project in 2 modules does not sound ridiculos to me, if there are reasons for this.
Upvotes: 10