我想用Maven开始一个小项目。我想使用JSF2和Hibernate。你能推荐一些原型吗?或者其他一些开始这个项目的步骤。
谢谢...
我想用Maven开始一个小项目。我想使用JSF2和Hibernate。你能推荐一些原型吗?或者其他一些开始这个项目的步骤。
谢谢...
使用
mvn archetype:generate
会出现一些原型列表。您可能会发现它们有用/教育性,因为其中许多是针对JSF项目的:
1: internal -> appfuse-basic-jsf (AppFuse archetype for creating a web application with Hibernate, Spring and JSF)
...
6: internal -> appfuse-modular-jsf (AppFuse archetype for creating a modular application with Hibernate, Spring and JSF)
...
20: internal -> softeu-archetype-seam (JSF+Facelets+Seam Archetype)
21: internal -> softeu-archetype-seam-simple (JSF+Facelets+Seam (no persistence) Archetype)
22: internal -> softeu-archetype-jsf (JSF+Facelets Archetype)
23: internal -> jpa-maven-archetype (JPA application)
...
39: internal -> myfaces-archetype-jsfcomponents (A simple archetype for create custom JSF components using MyFaces)
您可以尝试这个:
mvn archetype:generate -DarchetypeGroupId=com.github.happyfaces -DarchetypeArtifactId=happyfaces-archetype -DarchetypeVersion=1.0.2 -DgroupId=com.test -DartifactId=MyTestApp
看起来好像想要制造一场战争,不是吗?
因此,我建议您使用war
打包方式,这将允许您在开发模式下运行您的Web项目(还请注意,使用m2eclipse和eclipse WTP,您可能会获得额外的奖励)。