myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Myfaces Wiki] Update of "MyFaces Archetypes for Maven" by LeonardoUribe
Date Mon, 28 Jan 2008 14:20:44 GMT
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 LeonardoUribe:
http://wiki.apache.org/myfaces/MyFaces_Archetypes_for_Maven

------------------------------------------------------------------------------
  = Archetypes =
  
- There are two [http://maven.apache.org/guides/introduction/introduction-to-archetypes.html
"Maven Archetypes"] in !MyFaces which aim is to help setting up a new JSF project in less
than one minute.
+ There are four [http://maven.apache.org/guides/introduction/introduction-to-archetypes.html
"Maven Archetypes"] in !MyFaces which aim is to help setting up a new JSF project in less
than one minute.
  
-  * '''!MyFaces Archetype''': this archetype creates the basic structure for a project that
will use !MyFaces. It includes all the dependencies needed so you don't have to find them
out. The best way to start a new web application.
+  * '''!MyFaces Hello World Archetype''': this archetype creates the basic structure for
a project that will use !MyFaces. It includes all the dependencies needed so you don't have
to find them out. The best way to start a new web application.
+  * '''!MyFaces Hello World with Facelets Archetype''': this archetype creates the basic
structure for a project that will use !MyFaces and Facelets. It includes all the dependencies
needed so you don't have to find them out. 
+  * '''!MyFaces Hello World with Trinidad''': this archetype creates the basic structure
for a project that will use !MyFaces and Trinidad. It includes all the dependencies needed
so you don't have to find them out. 
   * '''JSF Components Archetype''': aimed to those that want to setup a JSF component library
project. This archetype will create a maven multi-module project, that contains the artifact
for the JSF components and a webapp for the examples. Everything setup and prepared to be
deployed out-of-the-box! Includes a very simple demo component, that can be used in any JSF
implementation. Complete tutorial available [http://brunoaranda.googlepages.com/jsfcomponentsarchetype2
here].
  
- Note that those two archetype are not released yet, but they will be very soon. In the meanwhile,
you will have to build the archetypes yourself before using them.
+ This archetypes are available on maven repo under the group org.apache.myfaces.buildtools
  
- == The MyFaces Archetype ==
+ == The MyFaces Hello World Archetypes ==
  
- 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:
+ This archetypes 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.buildtools   \
                       -DarchetypeArtifactId=myfaces-archetype-helloworld \
-                      -DarchetypeVersion=1.0-SNAPSHOT                    \
+                      -DarchetypeVersion=1.0.0                           \
                       -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.
+ That's all. The goal archetype:create downloads the proper artifacts from the main maven
repo and create the test project. Now you can start to work immediately.
  
  ==== Getting and installing the plugin locally ====
  
- 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:
+ If you want to use the latest code of 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/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-helloworld
+ svn co http://svn.apache.org/repos/asf/myfaces/myfaces-build-tools/trunk/maven2-archetypes
  }}}
  
- 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:
+ 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. For example:
  
  {{{
  cd myfaces-archetype-helloworld
@@ -47, +49 @@

  {{{
  mvn archetype:create -DarchetypeGroupId=org.apache.myfaces.buildtools      \
                       -DarchetypeArtifactId=myfaces-archetype-helloworld    \
-                      -DarchetypeVersion=1.0-SNAPSHOT                       \
+                      -DarchetypeVersion=1.0.0                              \
                       -DgroupId=myAppId                                     \
                       -DartifactId=testApp
  }}}
+ 
+ or if you want to use MyFaces + Facelets
+ 
+ {{{
+ mvn archetype:create -DarchetypeGroupId=org.apache.myfaces.buildtools               \
+                      -DarchetypeArtifactId=myfaces-archetype-helloworld-facelets    \
+                      -DarchetypeVersion=1.0.0                                       \
+                      -DgroupId=myAppId                                              \
+                      -DartifactId=testApp
+ }}}
+ 
+ or if you want to use Myfaces + Trinidad 
+ 
+ {{{
+ mvn archetype:create -DarchetypeGroupId=org.apache.myfaces.buildtools               \
+                      -DarchetypeArtifactId=myfaces-archetype-trinidad               \
+                      -DarchetypeVersion=1.0.0                                       \
+                      -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.
  
@@ -106, +129 @@

  {{{
  mvn archetype:create -DarchetypeGroupId=org.apache.myfaces.buildtools       \
                       -DarchetypeArtifactId=myfaces-archetype-jsfcomponents  \
-                      -DarchetypeVersion=1.0-SNAPSHOT                        \
+                      -DarchetypeVersion=1.0.0                               \
                       -DgroupId=myAppId                                      \
                       -DartifactId=myJsfComponents
  }}}
@@ -131, +154 @@

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

Mime
View raw message