[jboss-cvs] JBossAS SVN: r95737 - projects/docs/enterprise/5.0/RichFaces/en-US.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 29 05:22:03 EDT 2009
Author: laubai
Date: 2009-10-29 05:22:03 -0400 (Thu, 29 Oct 2009)
New Revision: 95737
Modified:
projects/docs/enterprise/5.0/RichFaces/en-US/Getting_Started.xml
Log:
Added changes as mentioned in JBPAPP-2980.
Modified: projects/docs/enterprise/5.0/RichFaces/en-US/Getting_Started.xml
===================================================================
--- projects/docs/enterprise/5.0/RichFaces/en-US/Getting_Started.xml 2009-10-29 09:20:49 UTC (rev 95736)
+++ projects/docs/enterprise/5.0/RichFaces/en-US/Getting_Started.xml 2009-10-29 09:22:03 UTC (rev 95737)
@@ -229,225 +229,8 @@
</section>
</section>
- <!--<section>
- <title>Integration of RichFaces into Maven Project</title>
- <para>This section tells you how to create a simple JSF with RichFaces application using Maven.</para>
- <para>First, ensure that Maven is installed on your local machine. This JSF application will run on the Apache Tomcat 6.0 server — download and install this if you have not done so already.</para>
- <para>To create the project structure and populate it with basic content, we use the <literal>maven-archetype-jsfwebapp</literal> Maven archetype, which is a part of the RichFaces CDK.</para>
- <para>The <literal>maven-archetype-jsfwebapp</literal> archetype and the project itself require extra repositories: <literal>http://snapshots.jboss.org/maven2/</literal> and <literal>http://repository.jboss.com/maven2/</literal>. The easist way to make these repositories visible to Maven is to create a profile in <filename>maven_installation_folder/conf/settings.xml</filename>. Add the following beneath the <literal><profiles></literal> element:</para>
+ <!--MAVEN INTEGRATION HERE-->
- <programlisting role="XML"><profile>
- <id>jsf-app-profile</id>
- <repositories>
- <repository>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>always</updatePolicy>
- </snapshots>
- <id>snapshots.jboss.org</id>
- <name>Snapshot Jboss Repository for Maven</name>
- <url>http://snapshots.jboss.org/maven2/</url>
- <layout>default</layout>
- </repository>
- <repository>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>always</updatePolicy>
- </snapshots>
- <id>repository.jboss.com</id>
- <name>Jboss Repository for Maven</name>
- <url>http://repository.jboss.com/maven2/</url>
- <layout>default</layout>
- </repository>
- </repositories>
-</profile></programlisting>
- <para>Once you have added the profile, you must also activate it. Add the following beneath the <literal><activeProfiles></literal> element.</para>
-
- <programlisting role="XML">...
-<activeProfiles>
- <activeProfile>jsf-app-profile</activeProfile>
-</activeProfiles></programlisting>
-
-
- <para>This fulfills the requirements for creating a project using the <literal>maven-archetype-jsfwebapp</literal> archetype. Create a directory for your project and run the following command from within the directory:</para>
- <programlisting role="XML" >...
-mvn archetype:generate -DarchetypeGroupId=org.richfaces.cdk -DarchetypeArtifactId=maven-archetype-jsfwebapp -DarchetypeVersion=3.3.1.GA -DgroupId=org.docs.richfaces -DartifactId=jsf-app</programlisting>
-
-
- <para>You can adjust some parameters of the command.</para>
- <table>
- <title>Title of the table</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Parameter</entry>
-
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>-DgroupId</entry>
- <entry>Defines the package for the Managed beans</entry>
- </row>
- <row>
- <entry>-DartifactId</entry>
- <entry>Defines the name of the project</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
-
-
- <para>This command generates a JSF project that has the following structure:</para>
-
- <programlisting role="XML">
-jsf-app
-|-- pom.xml
-`-- src
- |-- main
- | |-- java
- | | `-- org
- | | `-- docs
- | | `-- richfaces
- | | `-- Bean.java
- | |-- resources
- | `-- webapp
- | |-- WEB-INF
- | | |-- faces-config.xml
- | | `-- web.xml
- | |-- index.jsp
- | `-- pages
- | |-- index.jsp
- | `-- index.xhtml
- `-- test
- `-- java
- `-- org
- `-- docs
- `-- richfaces
- `-- BeanTest.java
-</programlisting>
- <para>
- Go to the <literal>jsf-app</literal> folder and open the project descriptor, <filename>pom.xml</filename> to edit and add dependencies. The <literal><dependencies></literal> element should contain at least the following:
- </para>
-
-
-
- <programlisting role="XML">...
-<dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.4</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>jstl</groupId>
- <artifactId>jstl</artifactId>
- <version>1.1.2</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet.jsp</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>1.2_12</version>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- <version>1.2_12</version>
- </dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>el-impl</groupId>
- <artifactId>el-impl</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.annotation</groupId>
- <artifactId>jsr250-api</artifactId>
- <version>1.0</version>
- </dependency>
- <!-- RichFaces libraries -->
- <dependency>
- <groupId>org.richfaces.framework</groupId>
- <artifactId>richfaces-api</artifactId>
- <version>3.3.1.GA</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.framework</groupId>
- <artifactId>richfaces-impl</artifactId>
- <version>3.3.1.GA</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.ui</groupId>
- <artifactId>richfaces-ui</artifactId>
- <version>3.3.1.GA</version>
- </dependency>
-</dependencies></programlisting>
- <para>The final three dependencies add RichFaces libraries to the project. You can now build the project by running the <code>mvn install</code> command.</para>
- <para>When you see <literal>BUILD SUCCESSFUL</literal>, the project is assembled. It can now be imported to an IDE and run on the server.</para>
-
- <para>You can build this project for the Eclipse IDE with the following command: <code>mvn eclipse:eclipse -Dwtpversion=2.0</code></para>
-
- <para>Once the project is built, you can import it into Eclipse. Then, open <filename>jsf-app/src/main/webapp/WEB-INF/web.xml</filename> to configure it according to the listing under <xref linkend="RegisteringRichFacesinwebxml" />.</para>
- <para>The project is now configured and now you can start using RichFaces. Open <filename>jsf-app/src/main/webapp/pages/index.jsp</filename> and add the following tag library declaration.</para>
- <programlisting role="XML">...
-<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
-...</programlisting>
-
- <para>If you add some RichFaces component to the <filename>index.jsp</filename> page (<literal><rich:calendar></literal>, for instance), your <filename>index.jsp</filename> page will look like this:</para>
-
- <programlisting role="XML">...
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
-<html>
- <head>
- <title>JSF Application with RichFaces built by Maven</title>
- </head>
- <body>
- <f:view>
- <rich:calendar />
- </f:view>
- </body>
-</html>
-...</programlisting>
-
- <para>You can now run the application on the Tomcat server and open it in your preferred browser by pointing the browser to <literal>http://localhost:8080/jsf-app/</literal>.</para>
- </section>-->
-
-
<!-- RELEVANT RESOURCES LINKS -->
<section id="RelevantResourcesLinks">
More information about the jboss-cvs-commits
mailing list