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 2006/06/16 17:29:21 UTC

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

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 WendySmoak:
http://wiki.apache.org/myfaces/MyFaces_Archetypes_for_Maven

The comment on the change is:
Formatting

------------------------------------------------------------------------------
  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 -DarchetypeArtifactId=myfaces-archetype -DarchetypeVersion=1.0-SNAPSHOT -DgroupId=myAppId -DartifactId=testApp
+ mvn archetype:create -DarchetypeGroupId=org.apache.myfaces.maven \
+                      -DarchetypeArtifactId=myfaces-archetype     \
+                      -DarchetypeVersion=1.0-SNAPSHOT             \
+                      -DgroupId=myAppId                           \
+                      -DartifactId=testApp
  }}}
  
  In the near future, the archetype will be located in a public repository in internet, but currently if you want to use it you have to build it from sources.
@@ -41, +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 -DarchetypeArtifactId=myfaces-archetype -DarchetypeVersion=1.0-SNAPSHOT -DgroupId=myAppId -DartifactId=testApp
+ mvn archetype:create -DarchetypeGroupId=org.apache.myfaces.maven \
+                      -DarchetypeArtifactId=myfaces-archetype     \
+                      -DarchetypeVersion=1.0-SNAPSHOT             \
+                      -DgroupId=myAppId                           \
+                      -DartifactId=testApp
  }}}
  
  In this last command we are creating an application with groupId=myAppId and artifactId=testApp. You can change that values to adapt your needs.
@@ -74, +82 @@

  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 -DarchetypeArtifactId=jsfcomponents-archetype -DarchetypeVersion=1.0-SNAPSHOT -DgroupId=myAppId -DartifactId=myJsfComponents
+ mvn archetype:create -DarchetypeGroupId=org.apache.myfaces.maven   \
+                      -DarchetypeArtifactId=jsfcomponents-archetype \
+                      -DarchetypeVersion=1.0-SNAPSHOT               \
+                      -DgroupId=myAppId                             \
+                      -DartifactId=myJsfComponents
  }}}
  
  But well, now you have to get it from the sources:
@@ -95, +107 @@

  
  {{{
  cd yourFolder
- mvn archetype:create -DarchetypeGroupId=org.apache.myfaces.maven -DarchetypeArtifactId=jsfcomponents-archetype -DarchetypeVersion=1.0-SNAPSHOT -DgroupId=myAppId -DartifactId=myJsfComponents
+ mvn archetype:create -DarchetypeGroupId=org.apache.myfaces.maven   \
+                      -DarchetypeArtifactId=jsfcomponents-archetype \
+                      -DarchetypeVersion=1.0-SNAPSHOT               \
+                      -DgroupId=myAppId                             \
+                      -DartifactId=myJsfComponents
  }}}
  
  And there you have it, you can start coding without having to hazzle with the project configuration. The archetype generates a multi-module project with this structure: