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.

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.