MyFaces Maven archetypes

The name if this project says it all: this project provides a number of Maven archetypes to get you started on a MyFaces-based project quickly. The table below lists the available archetypes an which MyFaces libraries are used.

Archetype name

Description of the created project

JSF version

View technology

Component set

JSP

Facelets

HelloWorld 2.0 Basic

Webapp project that uses MyFaces Core 2.0.x with Facelets as the page templating system.

2.0

none

HelloWorld 2.0 OpenWebBeans

Webapp project that uses MyFaces Core 2.0.x with Facelets as the page templating system. Uses JSR-299/JSR-330 annotations for managed bean definition with Apache OpenWebBeans as the CDI implementation.

2.0

none

HelloWorld Basic

Webapp project that uses MyFaces Core 1.2.x with JSP as the page templating system.

1.2

Tomahawk

HelloWorld-Facelets

Webapp project that uses MyFaces Core 1.2.x with Facelets as the page templating system.

1.2

Tomahawk

HelloWorld-Portlet

Simple portlet-enabled webapp.

1.2

none

Trinidad

Webapp that uses MyFaces Core 1.2.x and MyFaces Trinidad.

1.2

Trinidad 1.2

Trinidad 2.0 Archetype

Webapp that uses MyFaces Core 2.0.x and MyFaces Trinidad 2.0.

2.0

Trinidad 2.0

JSF-Component Library

Project that is intended to define new JSF components (rather than just use them). If you want to create a jar that defines a set of new custom JSF components then this archetype is a good starting point.

1.2

N/A

Each project that is created based on one of these archetypes comes with JUnit and Log4j preconfigured. The projects also come with Jetty preconfigured, so you don't need a separate Java EE Web Container or Application Server to deploy the app to.

Getting started

To get started with a new project using one of the provided archetypes, we have to make sure Maven is installed on your system. Once Maven is installed, we can just type

mvn archetype:generate -DarchetypeCatalog=http://myfaces.apache.org

at a command line. Maven will present us a numbered list of the available archetypes. (This should resemble the list presented above.) After choosing a number and pressing Enter, Maven asks us for a group ID, artifact ID, version, and package. These are the default values used to create the project. After we confirm these settings, Maven creates the new, empty project for us.

Drafts/Site/MavenArchetypes (last edited 2011-03-18 13:11:18 by BartKummel)