Kannan
Kannan

Reputation: 73

Create JSF 2.0 with Richfaces 4.0 / Primefaces project using Maven

I am new to JSF and Richfaces. I am in need to create a project with JSF 2.0 , Richfaces 4.0 , Hibernate using Maven.

I have go through many tutorials and I am so confused about installing maven archtypes, plugins , adding repositories etc.

I am using Ubuntu 12.04 and eclipse (kepler) and MySQL .

I have installed maven using Sudo apt-get install Maven2

Help me to get clear knowledge and to create a new project (for beginner) using

Upvotes: 0

Views: 547

Answers (2)

radicali
radicali

Reputation: 1

You can just install maven first as a external plugin for your Ide(eclipse) you can read this tuto:http://www.codejava.net/ides/eclipse/installing-maven-plugin-for-existing-eclipse-ide therefore you can just create a maven project with file->new->maven project and for the primefaces /jsf/hibernate maven will take care of all of them you need just to add the right dependencies in the file pom.xml for ex: for Hibernate you need to add :

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.4.0.GA</version>

Upvotes: 0

yannicuLar
yannicuLar

Reputation: 3133

My approach would be like:

  1. Install a new Eclipse. There are so many elipse-maven plugin issues that have been resolved since Kepler.
  2. Start a new maven 3 project, with a webapp archetype like maven-archetype-webapp, just to create a proper folder structure
  3. Add the dependencies you need to integrate with Spring, JSF-2, Hibernate etc. Pick them one by one, and make sure you are using the right versions, usually the latest release.stable version.

For example, here you can see all the versions for primefaces

I think that this would be a good tutorial for a starter. You can also check pom files from similar projects, and handpick some dependencies.

Upvotes: 1

Related Questions