This maven2 archetype contains a little sample web application with this Frameworks:
- Spring 3.0.4.RELEASE Framework
- Servlet-API 2.5
- JSF 2.0 (mojarra 2.0.2)
- RichFaces 4.0.0.M1
- ploinFaces 1.6
- ploinMailFactory 1.3.1
- Hibernate 3.3.0
- TestNG 5.8
- Log4J 1.2.15
- HSQLDB 1.8.0.7
The configuration is annotation-driven. It is deployed on the PLOIN Repository-Serve
http://www.ploin-m2.de/nexus/content/groups/public/
you can create a project from the archetype with the following command:
mvn archetype:generate -DarchetypeGroupId=org.ploin.archetype -DarchetypeArtifactId=tempSpringRichHibernate -DarchetypeVersion=1.7.1 -DarchetypeRepository=http://www.ploin-m2.de/nexus/content/groups/public/ -DgroupId=org.ploin -DartifactId=demoSpringRichHibernate
The created project is a very simple web-application with a login mask and 2 xhtml-sites. I have tested the app on a tomcat 6.0.20 and Java 1.6 on Mac OS X Snow Leopard.

You can login with the username “admin” and the password “admin”.
After the creation the app is running with the HypersoniceSQL DBMS. But it is very easy to switch to MySQL or Oracle. I put the drivers for MySQL and Oracle as a comment in the pom.xml. So you just need to comment in the right lines in the pom.xml.
Congratulation for your archetype,
I’ve got only one error on GenericDao.java on puplic TSave(T entity) function:
name clash: save(T) in org.ploin.persistence.dao.hibernate.GenericDao and save(java.lang.Object) in org.springframework.orm.hibernate3.HibernateTemplate have the same erasure, yet neither overrides the other
have you the same error or a solution to solve it ?
Hi Oliver,
I builded a complete new project from the archetype. I can compile it with “mvn compile” without of errors. It is true, the HibernateTemplate have a method “save”. But this is method is overriden by the method in the GenericDao class. I got no problems with it.
Are you working with Java 6?
Try the following command in your command line: “mvn clean eclipse:clean”
than: “mvn compile”
and for editing in eclipse: “mvn eclipse:eclipse”
or for editing in IntelliJ IDEA: “mvn idea:idea”
Be aware that your IDE is working with Java 6.
Robert
Hi Robert,
I work with Java 6 and netbean. It’s true the maven compile works, it’s only Netbeans who reveal this error. I’ve seen on some web site (http://forums.sun.com/thread.jspa?threadID=5258022) another case which may explain the trouble… even If I don’t find a solution ;-(
Hi Oliver,
I belief, you just have to chang your compiler settings in NetBeans. If it still does not work, you should switch to InelliJ IDEA 😉
Robert
I’ve also another question do you know why some richfaces component as doesn’t work ? It seem like if a library missing.
Hi Oliver,
good questions. 2 days ago I moved from germany to USA – Los Angeles. That is the reason why I am a litle busy :-). But I will answer your questions in the next 5 days. Hope this is OK for you.
Robert
I’ve found the answer to the second question. The RichFace 4.0.0.M1 doesn’t contain all RichFace component. When I change the pom to use the last millestone I ‘ve got more component. I still don’t have all component. I need to wait the next release for that. On the RichFace web site I see the roadmap : There will be a new millestone each month and the release is planned in february 2011.
org.richfaces
richfaces-bom
4.0.0.20101004-M3
import
pom
org.richfaces.ui
richfaces-components-ui
4.0.0.20101004-M3
<dependency>
<groupId>org.richfaces</groupId>
<artifactId>richfaces-bom</artifactId>
<version>4.0.0.20101004-M3</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-components-ui</artifactId>
<version>4.0.0.20101004-M3</version>
</dependency>
Hi Robert,
I could see some of broken links referring to richfaces while executing maven command and other libraries and eclipse project doees not recognize the libraries. If you can fix them, it would be a great help to us.
Thanks
Hi Baskar,
I take a look. I will respond soon.
– Robert
Hi Baskar,
can you please give me more information? Which maven version do you use? Maven2 or Maven3? Are you using Eclipse 3.7? Which libraries exactly are not recognized? Are you building with maven or with eclipse?
Thanks,
Robert
I posted here a new version of this archetype:
https://robert-reiz.com/2011/07/13/archetype-richfaces-4-0-0-m1-spring-3-0-5-release-hibernate-3-3-0/
This version contains the newest version of JSF 2.0 and some little BugFixes. I tested this with Maven 3 and Eclipse 3.7.