• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

"Eclipse + EJB3 + Maven" question

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Denis Zjukow
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic