This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
We are converting our seam jboss tools-based projects into maven projects.
My colleague did the initial research and conversion.
JBoss tools generates 3 projects when you create a seam project: web, ear, and ejb projects. We preserved that structure and created 3 maven projects proj-web, proj-app, and proj-ear. He also created a proj-parent maven project to tie them together.
It seems to me that the task of the parent project, to tie all project together, is redundant to the task of the EAR project, proj-app, which creates an ear file containing the ejb jar and war files.
Furthermore, he designed all this on the command line and it's my job to figure out how to use it all in eclipse. The parent project set up does not play well in eclipse. I see no point to the parent project when "mvn install" on the app project builds the ear.
When does one really need a parent project? In this case isn't it redundant?
Personally, I would not set up a master (aka parent) project. In a way the ear project is the "master" project since it requires the other two to be built before it can be built. The only real reason to do a master project is to be able to enter a single command at the command line and have everything built. If you use a CI tool such as Jenkins, it will automatically recognize that your ear project depends on the app and web projects and thus if either of them needs to be rebuilt, it will also rebuild the ear.
By the way, the app, web and ear projects can still reference a parent POM (via coordinates, not via a relative path) to include common information (always a good practice). However, the parent POM does not have to reference the child projects as submodules. The two concepts are different and don't have to be used in conjunction.