views:

197

answers:

1

Hello,

I am new to Java world but I am pretty good at using Flex, actionscript 3, Ant and even Maven to some extent. Now I would like to learn some java and use Hibernate and JBoss (webapp).

I already have Maven working and have found the m2eclipse plugin on the web, it seem pretty nice for maven integration.

Now I would like to know how to set the project using "best practices" if possible and start the ball rolling. My question is not about using Java or Hibernate, it is just about project settings / configuration using m2eclipse or maybe another tool if necessary.

Thank you in advance for your help.

A: 

Actually, archetypes are not m2eclipse specific, they are maven species. But this was just a side note. Now, to answer your question, there is "sadly" no unique option and I hope I won't make things more confusing at listing them:

  • You could simply use the maven-archetype-webapp archetype to create a blank webapp and setup the Hibernate stuff yourself (follow the Hibernate tutorial which is maven based).
  • You could create a more specialized webapp (using the struts2-archetype-starter or the wicket-archetype-quickstart or a MyFaces archetype) and setup the Hibernate stuff yourself.
  • You could use the javaee5-maven-archetype archetype to create a Java EE 5 (JSF 1.2 + EJB 3) application.
  • You could use the softeu-archetype-seam archetype to create a JBoss Seam application (JSF+Facelets+Seam).
  • You could use one of the numerous AppFuse archetypes (Hibernate, Spring and the presentation framework of your choise) to create an "AppFuse" application.

If you want some guidance, my recommendation would be to go for an AppFuse archetype. Choose a presentation framework and pick up the corresponding archetype. If you want a more "naked" solution, generate a blank webapp and setup hibernate yourself (follow the mentioned tutorial).

Pascal Thivent
Thank you very much for your response, I am playing with maven-archetype-webapp for the moment :)
Adnan Doric
@AdnanDoric That's a good choice IMO. BTW: The common way of recognizing a good answer is upvoting it ;)
Pascal Thivent