JSF 2.0 Maven archetype

To quickly get started with JSF 2.0 I’ve created a maven archetype. To use this archetype, you must have Maven 2, Tomcat 6 and Eclipse installed on your machine. Follow the steps below to get a new project up and running:

Step 1: Go to your workspace folder

cd c:\workspaces\DevWorkspace

Step 2: Generate a new project

To generate a new project using the archetype, you must use the following command:

mvn archetype:generate -DarchetypeGroupId=nl.jwse.archtypes -DarchetypeArtifactId=martino -DarchetypeVersion=1.0 -DgroupId=[YOUR GROUP ID] -DartifactId=[YOUR ARTIFACT] DpackageName=[YOUR PACKAGE_NAME] -DremoteRepositories=http://www.jwse.nl/maven2

for example

mvn archetype:generate -DarchetypeGroupId=nl.jwse.archtypes -DarchetypeArtifactId=martino -DarchetypeVersion=1.0 -DgroupId=com.acme.sample -DartifactId=jsf2demo -DpackageName=nl.jwse.sample.jsf2demo -DremoteRepositories=http://www.jwse.nl/maven2

Step 3: Go inside the new project folder

cd c:\workspaces\DevWorkspace\jsf2demo

Step 4: Generate an Eclipse project

mvn eclipse:eclipse

This command will generate a WTP eclipse project for you.

Step 5: Import the project into Eclipse

As you can see below the archetype creates a complete project to get you started.

martino

Step 6: Add the project to the Tomcat server and start the server

Step 7: Point your browser to http://localhost:8080/jsf2demo

Laat een reactie achter

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>