From richfaces-svn-commits at lists.jboss.org Thu May 27 20:18:51 2010 Content-Type: multipart/mixed; boundary="===============0412380009054864192==" MIME-Version: 1.0 From: richfaces-svn-commits at lists.jboss.org To: richfaces-svn-commits at lists.jboss.org Subject: [richfaces-svn-commits] JBoss Rich Faces SVN: r17329 - root/docs/trunk/Developer_Guide/en-US. Date: Thu, 27 May 2010 20:18:50 -0400 Message-ID: <201005280018.o4S0Io6h023663@svn01.web.mwc.hst.phx2.redhat.com> --===============0412380009054864192== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: SeanRogers Date: 2010-05-27 20:18:50 -0400 (Thu, 27 May 2010) New Revision: 17329 Modified: root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Getting_start= ed_with_RichFaces.xml root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-RichFaces_ove= rview.xml Log: Added Maven install instructions: RF-8040 Modified: root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Gettin= g_started_with_RichFaces.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Getting_star= ted_with_RichFaces.xml 2010-05-27 18:19:39 UTC (rev 17328) +++ root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Getting_star= ted_with_RichFaces.xml 2010-05-28 00:18:50 UTC (rev 17329) @@ -154,173 +154,185 @@
Creating a project with <productname>Maven</productname> - Maven is a build automation and project mana= gement tool for Java projects. Follow the instructions in this section to c= reate a Maven project for RichFaces. + Apache Maven is a build automation and proje= ct management tool for Java projects. Follow the instructions in this secti= on to create a Maven project for Ri= chFaces. - - - Add required repositories - - A structure for the Maven project with minimal content can be created= with the Maven archetype named maven-archetype-jsfwebapp (may be renamed in a later release) included as part o= f the RichFaces Component Development Kit (CDK). The arc= hetype and the project itself require the JBoss repository to be provided (= https://repository.jboss.org/nexus/content/groups/public/). To make the repositories accessible to Maven, add a profile in the maven_installation_folder/conf/settings.= xml file under the <profiles> element: - +
+ Setting up <productname>Maven</productname> + + Maven can be downloaded and installed from = Apache's website at ht= tp://maven.apache.org/download.html. Version 2.2.1 is recommended. + + + Once Maven has been installed, no further c= onfiguration is required to begin building Maven projects. + +
+
+ Using the <productname>RichFaces</productname> project archetype= + + + Add required repositories + + A structure for the project with minimal content can be created with= the Maven archetype named maven-archetype-jsfwebapp <= remark>(may be renamed in a later release) included as part of the= RichFaces Component Development Kit (CDK). The archetyp= e and the project itself require the JBoss repository to be provided (https://repository.jboss.org/nexus/content/groups/public/).= To make the repositories accessible to Maven, add a profile in the maven_installation_folder/conf/settings.xml file under the <profiles> element: + = - - - The profile then needs to be activated in the <activeProf= iles> element: - + + + The profile then needs to be activated in the <activePro= files> element: + = <activeProfiles> - <activeProfile>jboss-public-repository</activeProfile> -</activeProfiles> - - - - Generate the project from the archetype + <activeProfile>jboss-public-repository</activeProfile> +</activeProfiles> + + + Generate the project from the archetype = - + = - - The project can now be generated with the maven-archetype-j= sfwebapp archetype. The archetype for RichFaces 4.0 is still in = development; use the archetype for RichFaces 3.3.3 to generate a project un= til the 4.0 archetype is released. Create a new directory for your project,= then run the following Maven command: - -mvn archetype:generate -DarchetypeGroupId=3Dorg.richfaces.cdk -Dar= chetypeArtifactId=3Dmaven-archetype-jsfwebapp -DarchetypeVersion=3D3.3.3-SN= APSHOT -DgroupId=3Dorg.docs.richfaces -Dartifact= Id=3Djsf-app - - The following parameters can be used to customize your project: - - - - -DgroupId - + + The project can now be generated with the maven-archetype-= jsfwebapp archetype. The archetype for RichFaces 4.= 0 is still in development; use the archetype for RichFaces 3.3.3 to generate a project until the 4.0 archetyp= e is released. Create a new directory for your project, then run the follow= ing Maven command: + + mvn archetype:generate -DarchetypeGroupId=3Dorg.richfaces.cdk -Da= rchetypeArtifactId=3Dmaven-archetype-jsfwebapp -DarchetypeVersion=3D3.3.3-S= NAPSHOT -DgroupId=3Dorg.docs.richfaces -Dartifac= tId=3Djsf-app + + The following parameters can be used to customize your project: + + + + -DgroupId + + + Defines the package for the Managed Beans + + + + + -DartifactId + + + Defines the name of the project + + + + + + The command generates a JSF project with the following structure: + + jsf-app + =E2=94=9C=E2=94=80=E2=94=80 pom.xml + =E2=94=94=E2=94=80=E2=94=80 src + =E2=94=9C=E2=94=80=E2=94=80 main + =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 java + =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 org + =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 docs + =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 ri= chfaces + =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 Bean.java + =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 resources + =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 webapp + =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 WEB-INF + =E2=94=82 =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 faces-= config.xml + =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 web.xm= l + =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 index.xhtml + =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 pages + =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 index.xhtml + =E2=94=94=E2=94=80=E2=94=80 test + =E2=94=94=E2=94=80=E2=94=80 java + =E2=94=94=E2=94=80=E2=94=80 org + =E2=94=94=E2=94=80=E2=94=80 docs + =E2=94=94=E2=94=80=E2=94=80 richfaces + =E2=94=94=E2=94=80=E2=94=80 BeanTest.java<= /filename> + + + Add dependencies + + Your root directory of your project contains a project descriptor fi= le, pom.xml. To add RichFaces libraries to your projec= t, edit the project descriptor to add dependencies to the <depe= ndencies> element as follows: + + = + + = + + + If you wish to include modules for test-driven JSF development, add = any dependencies for the tests to the pom.xml file. Fo= r full details on how to use the jsf-test projec= t, refer to http:/= /community.jboss.org/wiki/TestDrivenJSFDevelopment. + + + = + + + Update the generated project + + After the project has been generated from the old archetype, it must= be updated to use RichFaces &VERSION; and JSF 2. + + + RichFaces &VERSION; uses Facelets and does not support JSP. Any index.jsp pages that were generated need to forward home.jsf page equivalents. + + + + = + + Build the project + + Build the project from the command line by entering the mvn= install command. + + + The BUILD SUCCESSFUL message indica= tes the project has been assembled and is ready to import into an IDE (inte= grated development environment). + + + = + + Import the project into an IDE + + Import the Maven project into your IDE. For Eclipse and JBoss Tools, you can either use <= application>Maven to prepare the project, or import the proje= ct using the M2Eclipse plug-in. + + + + Using <application>Maven</application> to prepare the projec= t for <application>Eclipse</application> - Defines the name of the project + Enter the following command in the root directory of the project: - - - - - The command generates a JSF project with the following structure: - -jsf-app -=E2=94=9C=E2=94=80=E2=94=80 pom.xml -=E2=94=94=E2=94=80=E2=94=80 src - =E2=94=9C=E2=94=80=E2=94=80 main - =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 java - =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 org - =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 docs= - =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 = richfaces - =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 Bean.java - =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 resources - =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 webapp - =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 WEB-INF - =E2=94=82 =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 face= s-config.xml - =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 web.= xml - =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 index.xhtml - =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 pages - =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 index.xhtml<= /filename> - =E2=94=94=E2=94=80=E2=94=80 test - =E2=94=94=E2=94=80=E2=94=80 java - =E2=94=94=E2=94=80=E2=94=80 org - =E2=94=94=E2=94=80=E2=94=80 docs - =E2=94=94=E2=94=80=E2=94=80 richfaces - =E2=94=94=E2=94=80=E2=94=80 BeanTest.jav= a - - - Add dependencies - - Your root directory of your project contains a project descriptor fil= e, pom.xml. To add RichFaces libraries to your project= , edit the project descriptor to add dependencies to the <depen= dencies> element as follows: - - = - - = - - - If you wish to include modules for test-driven JSF development, add a= ny dependencies for the tests to the pom.xml file. For= full details on how to use the jsf-test project= , refer to http://= community.jboss.org/wiki/TestDrivenJSFDevelopment. - - - = - - - Update the generated project - - After the project has been generated from the old archetype, it must = be updated to use RichFaces &VERSION; and JSF 2. - - - RichFaces &VERSION; uses Facelets and does not support JSP. Any index.jsp pages that were generated need to forward home.jsf page equivalents. - + mvn eclipse:eclipse -DdownloadSources=3Dtrue -Dwtpversion=3D2.0 + + The command generates the required Eclipse project files. You can then import the project into Eclips= e and JBoss Tools through the impo= rting wizard by choosing FileIm= port from the menu. Select = GeneralExisting Projects into Workspace as the import source and choose the root directory for your = project. + + + + Using the <productname>M2Eclipse</productname> plug-in</titl= e> + <para> + Alternatively, you can import a <application>Maven</application> p= roject into <application>Eclipse</application> and <application>JBoss Tools= </application> using the <productname>M2Eclipse</productname> plug-in. With= the plug-in installed, open the importing wizard by choosing <menuchoice><= guimenu>File</guimenu><guimenuitem>Import</guimenuitem></menuchoice> from t= he menu. Select <menuchoice><guimenu>Maven</guimenu><guimenuitem>Existing M= aven Projects</guimenuitem></menuchoice> as the import source and choose th= e <filename>pom.xml</filename> file for your project. + </para> + </step> + </stepalternatives> + </step> <!-- - <substeps> - <step> - <title>Deactivate the VDL view handler - - The VDL (View Definition Language) view handler = must be deactivated for your project to work with JSF 2. To deactivate the = viewhandler, edit the project's web.xml settings file = with the following context parameter: - -= - - + + Add tag library references + + After importing, edit the jsf-app/src/main/webapp/pages/index.xhtml file to include the tag lib= rary declaration as described in of . + + --> - - = - - Build the project - - Build the project from the command line by entering the mvn = install command. - - - The BUILD SUCCESSFUL message indicat= es the project has been assembled and is ready to import into an IDE (integ= rated development environment). - - - = - - Import the project into an IDE - - Import the Maven project into your IDE. For Eclipse and JBoss Tools, you can either use Maven to prepare the project, or import the projec= t using the M2Eclipse plug-in. - - - - Using <application>Maven</application> to prepare the project= for <application>Eclipse</application> - - Enter the following command in the root directory of the project: - -mvn eclipse:eclipse -DdownloadSources=3Dtrue -Dwtpversion=3D2.0 - - The command generates the required Eclipse project files. You can then import the project into Eclipse= and JBoss Tools through the impor= ting wizard by choosing FileImp= ort from the menu. Select G= eneralExisting Projects into Workspace= as the import source and choose the root directory for your p= roject. - - - - Using the <productname>M2Eclipse</productname> plug-in - - Alternatively, you can import a Maven pr= oject into Eclipse and JBoss Tools<= /application> using the M2Eclipse plug-in. With = the plug-in installed, open the importing wizard by choosing FileImport from th= e menu. Select MavenExisting Ma= ven Projects as the import source and choose the= pom.xml file for your project. - - - - - - + = - - Your project is now ready to use. Once components and functionality hav= e been added, you can run the application on a server and access it through= a web browser at the address http://localhost:8080/= jsf-app/. - + + Your project is now ready to use. Once components and functionality ha= ve been added, you can run the application on a server and access it throug= h a web browser at the address http://localhost:8080/jsf-app/. + +
+ =
=
Modified: root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-RichFa= ces_overview.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-RichFaces_ov= erview.xml 2010-05-27 18:19:39 UTC (rev 17328) +++ root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-RichFaces_ov= erview.xml 2010-05-28 00:18:50 UTC (rev 17329) @@ -217,7 +217,7 @@ - Maven 2.1.0 and higher + Maven 2.1.0 and higher (2.2.1 recommended) --===============0412380009054864192==--