Here is what I do. I create a master
Maven project with three subprojects:one to build the WAR, one to build the JAR and one to build the EAR. Directory layout is similar to:
masterproject
masterproject/warproject
masterproject/ejbproject
masterproject/earproject
The pom.xml in masterproject calls the three subprojects. The pom.xml in the subprojects all reference the mastterproject as the parent project. When I run the masterproject pom.xml, it builds everything.