My project involve two module, there are web module and EJB module. my question are below:
1. What is the best practice to handle multiple module in maven? is there any sample i should refer?
2. If there is EJB module involve in the project, i need to package it into .ear file? .war file will not help in my case, am i right?
3. I'm using eclipse with m2m plugin, should i create a new maven project with "maven-archtype-quickstart" or "maven-archtype-j2ee-simple" or some other archtype to handle above scenario?
1) Do separate Maven projects, one for the EJB JAR, the other for the WAR.
2) Maybe. Which version of Java EE are you targeting? The latest versions let you package EJBs into your WAR. If you still want an EAR, do it as a third Maven project.
3) I never use an archetype but just select "create a simple Maven project" and select the correct packaging type, but I do that mainly because I already have example POMs that I can use (I completely overwrite the generated POM) and I have been too lazy to convert them into archetypes!