Search code examples
javamavenpom.xmlearparent-pom

appropriate maven project structure for MDB and EAR


I have a headless (ie no war component) business object that I wish to install on my app server as an EAR. I understand to do this I would need to create a maven project to generate this Message Driven Bean's jar as normal, but then for the ear I'd need a separate maven project to generate the ear. Would this be a parent project or what is the correct abstraction?


Solution

  • Typcally you will have this Kind of Project structure:

    parent (packaging pom) -- ear (packaging ear) -- ejb-jar (packaging ejb)

    Have a look at this article. It's Java EE 5 but explains the structure very well

    http://www.developerscrappad.com/1177/java/java-ee/maven/building-and-deploying-java-ee-ear-with-maven-to-java-ee-application-server-part-1-project-directory-structure-amp-module-generation-through-archetype-generate/