You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by Apache Wiki <wi...@apache.org> on 2008/01/03 16:19:57 UTC

[Myfaces Wiki] Update of "MyFaces Archetypes for Maven" by GerhardPetracek

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The following page has been changed by GerhardPetracek:
http://wiki.apache.org/myfaces/MyFaces_Archetypes_for_Maven

------------------------------------------------------------------------------
  This archetype allows you to generate a template for a web application that uses !MyFaces, based on the blank example application. So, creating the template of the application is as easy as executing:
  
  {{{
- mvn archetype:create -DarchetypeGroupId=org.apache.myfaces.maven      \
+ mvn archetype:create -DarchetypeGroupId=org.apache.myfaces.buildtools   \
-                      -DarchetypeArtifactId=maven-archetype-myfaces    \
+                      -DarchetypeArtifactId=myfaces-archetype-helloworld \
-                      -DarchetypeVersion=1.0-SNAPSHOT                  \
+                      -DarchetypeVersion=1.0-SNAPSHOT                    \
-                      -DgroupId=myAppId                                \
+                      -DgroupId=myAppId                                  \
                       -DartifactId=testApp
  }}}
  
@@ -28, +28 @@

  To be able to use the archetype the first thing you should do is to checkout the myfaces archetype source from the svn, using the command:
  
  {{{
- svn co http://svn.apache.org/repos/asf/myfaces/maven/trunk/archetypes/maven-archetype-myfaces/
+ svn co http://svn.apache.org/repos/asf/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld
  }}}
  
  Now, let's install the plugin locally (this supposes that you have maven 2.x already installed). Navigate to the plugin root folder and use the mvn install command:
  
  {{{
- cd maven-archetype-myfaces
+ cd myfaces-archetype-helloworld
  mvn install
  }}}
  
@@ -45, +45 @@

  Now, using maven (anywhere in your file system) you can create a template for an application that uses !MyFaces using the command:
  
  {{{
- mvn archetype:create -DarchetypeGroupId=org.apache.myfaces.maven      \
+ mvn archetype:create -DarchetypeGroupId=org.apache.myfaces.buildtools      \
-                      -DarchetypeArtifactId=maven-archetype-myfaces    \
+                      -DarchetypeArtifactId=myfaces-archetype-helloworld    \
-                      -DarchetypeVersion=1.0-SNAPSHOT                  \
+                      -DarchetypeVersion=1.0-SNAPSHOT                       \
-                      -DgroupId=myAppId                                \
+                      -DgroupId=myAppId                                     \
                       -DartifactId=testApp
  }}}
  
@@ -65, +65 @@

  
  This whole process can save a lot of time while setting up a new web application. And what is better, you have already the structure to use maven :-)
  
+ Note: At the moment this Archetype creates a MyFaces 1.2.x project (see pom.xml).
  
  ==== Jetty plugin ====
  
@@ -82, +83 @@

  This archetype generates a maven multi-module project prepared for the development of custom JSF components. To create your new project, the only thing you have to do (again, after installing the archetype locally, but this will be not needed soon), is to execute this command;
  
  {{{
- mvn archetype:create -DarchetypeGroupId=org.apache.myfaces.maven          \
+ mvn archetype:create -DarchetypeGroupId=org.apache.myfaces.buildtools       \
-                      -DarchetypeArtifactId=maven-archetype-jsfcomponents  \
+                      -DarchetypeArtifactId=myfaces-archetype-jsfcomponents  \
-                      -DarchetypeVersion=1.0-SNAPSHOT                      \
+                      -DarchetypeVersion=1.0-SNAPSHOT                        \
-                      -DgroupId=myAppId                                    \
+                      -DgroupId=myAppId                                      \
                       -DartifactId=myJsfComponents
  }}}
  
  But well, now you have to get it from the sources:
  
  {{{
- svn co http://svn.apache.org/repos/asf/myfaces/maven/trunk/archetypes/maven-archetype-jsfcomponents
+ svn co http://svn.apache.org/repos/asf/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-jsfcomponents
  }}}
  
  Then, install the archetype:
  
  {{{
- cd maven-archetype-jsfcomponents
+ cd myfaces-archetype-jsfcomponents
  mvn install
  }}}
  
@@ -107, +108 @@

  
  {{{
  cd yourFolder
- mvn archetype:create -DarchetypeGroupId=org.apache.myfaces.maven         \
+ mvn archetype:create -DarchetypeGroupId=org.apache.myfaces.buildtools      \
-                      -DarchetypeArtifactId=maven-archetype-jsfcomponents \
+                      -DarchetypeArtifactId=myfaces-archetype-jsfcomponents \
-                      -DarchetypeVersion=1.0-SNAPSHOT                     \
+                      -DarchetypeVersion=1.0-SNAPSHOT                       \
-                      -DgroupId=myAppId                                   \
+                      -DgroupId=myAppId                                     \
                       -DartifactId=myJsfComponents
  }}}