wood burning stoves 2.0*
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven with Ejb Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven with Ejb " Watch "Maven with Ejb " New topic
Author

Maven with Ejb

Kousik Majumder
Ranch Hand

Joined: Sep 30, 2007
Posts: 227
Hi all,

I have an application where ear contains both ejbs and a .war file.
Now suppose if I have 10 entity beans and 10 session beans in my application then according to my understanding I think my ejb module should contain 20 submodule of beans.

Am I right about my understanding? Please tell.


an example draft is shown below:-

myproject/ear
myproject/war
myproject/ejbs
myproject/ejbs/ejbModule1
myproject/ejbs/ejbModule2
....
....
myproject/ejbs/ejbModule20


Another option that may happen is also given below. Please tell me what is the best practice from these two?

myproject/ear
myproject/war
myproject/ejbModule1
myproject/ejbModule2
....
....
myproject/ejbModule20


Thanks in Advance,
Kousik
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5779
    
    7

First go and read chapter 4 of Better Builds With Maven. That chapter covers this topic rather nicely.

Also, you do not need to place each EJB in its own project. You should group EJBs in projects in a way that makes sense from a component point of view. Also, you would not create multiple subprojects under an ejb subproject, but rather have multiple ejb subprojects. Example:

base
base/someejbs
base/otherejbs
base/war


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Maven with Ejb
 
Similar Threads
placing ejb and web modules
Regarding war creation in Maven
Packageing concept of Maven with Ejb
Isolation of EARs (and EJB3)
.jar or .ear ?