This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark ""Eclipse + EJB3 + Maven" question" Watch ""Eclipse + EJB3 + Maven" question" New topic
Author

"Eclipse + EJB3 + Maven" question

Denis Zjukow
Ranch Hand

Joined: Mar 15, 2006
Posts: 39
Hi,

I am trying to find a way how to use the following three things together:

1) Eclipse - I want to use Eclipse WTP for development;
2) EJB 3 - I need EJB 3 in my project;
3) Manven 2 - I want to use Maven 2 as a build tool.

My question: is it possible to adjust an EJB project in Eclipse so that it would use maven layout and the project was a "real" EJB project (in Eclipse sense). The last requirement is important because I find hot replace very useful (I don't want to build my application manually every time I change it).

I want to have three projects in my Eclipse workspace: WAR, EJB and EAR. I use "mvn eclipse:eclipse" tool to generate metadata for WAR and EAR. It seems to work fine. However, this approach doesn't work for EJB.

If you know the solution, please, describe it or provide a link.

Thank you!
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30085
    
149

Denis,
Are you using an Eclipse plugin? As far as I know Eclipse doesn't have an "EJB project" type out of the box.

I think this is more of an Eclipse question than an EJB question so I'll move it to our IDES forum for you.

Note that you may get more answers if you could provide the directory structure Maven requires for EJB 3 (or a link to it.) Right now your question requires EJB 3, Maven and Eclipse experience. Providing that one link would get it down to just needing Eclipse knowledge - which is a lot more common than the combination of all three.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3703
    
    5

Originally posted by Jeanne Boyarsky:
DAs far as I know Eclipse doesn't have an "EJB project" type out of the box.


If you download the "Eclispe for Java EE developers" there is support for EJBs, although the GUI is limited. I've heard MyEclipse is better for fully automated EJB development.


My Blog: Down Home Country Coding with Scott Selikoff
Denis Zjukow
Ranch Hand

Joined: Mar 15, 2006
Posts: 39
I use Eclipse Europa and it does have support for EJB projects. However, by default it uses the following structure:



This structure is different from the default maven layout which looks like this:



The question is, how to setup Eclipse project properties so that Eclipse would understand maven layout. For a WAR project I use "mvn eclipse:eclipse -Dwtpversion=1.5" and it works fine, Eclipse perfectly understands maven layout. But, unfortunately, this does not work for an EJB project.

Any ideas?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: "Eclipse + EJB3 + Maven" question
 
Similar Threads
Exploded ear -how to debug jboss
Do you use in maven ear to build your ear in dev env?
Should i move my builds from ANT to Maven?
javaee: eclipse + maven
Do I need a parent project or will ear suffice