Author: SeanRogers
Date: 2010-05-13 02:01:36 -0400 (Thu, 13 May 2010)
New Revision: 17012
Added:
root/docs/trunk/Developer_Guide/en-US/extras/prog-Developer_Guide-Using_RichFaces_with_Maven-Add_dependencies.xml_sample
root/docs/trunk/Developer_Guide/en-US/extras/prog-Developer_Guide-Using_RichFaces_with_Maven-Update_the_generated_project.xml_sample
Modified:
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Getting_started_with_RichFaces.xml
root/docs/trunk/Developer_Guide/en-US/extras/prog-Developer_Guide-Using_RichFaces_with_Maven-Add_required_repositories.xml_sample
Log:
Revised Maven usage
Modified:
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Getting_started_with_RichFaces.xml
===================================================================
---
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Getting_started_with_RichFaces.xml 2010-05-12
22:53:13 UTC (rev 17011)
+++
root/docs/trunk/Developer_Guide/en-US/chap-Developer_Guide-Getting_started_with_RichFaces.xml 2010-05-13
06:01:36 UTC (rev 17012)
@@ -296,74 +296,108 @@
</para>
<programlisting language="XML"
role="XML"><activeProfiles>
- <activeProfile>jsf-app-profile</activeProfile>
+ <activeProfile>jboss-public-repository</activeProfile>
</activeProfiles>
</programlisting>
</step>
- <step
id="step-Developer_Guide-Using_RichFaces_with_Maven-Generate_project_from_archetype">
- <title>Generate project from archetype</title>
+ <step
id="step-Developer_Guide-Using_RichFaces_with_Maven-Generate_the_project_from_the_archetype">
+ <title>Generate the project from the archetype</title>
+
+<!--
+<remark>ONCE 4.0 ARCHETYPE IS COMPLETE:</remark>
<para>
- The project can now be generated with the
<filename>maven-archetype-jsfwebapp</filename> <remark>(may be renamed
in a later release)</remark> archetype. Create a new directory for your project,
then run the following Maven command:
-<screen>mvn archetype:generate -DarchetypeGroupId=org.richfaces.cdk
-DarchetypeArtifactId=maven-archetype-jsfwebapp -DarchetypeVersion=4.0.0-SNAPSHOT
-DgroupId=<replaceable>org.docs.richfaces</replaceable>
-DartifactId=<replaceable>jsf-app</replaceable>
-</screen>
+ The project can now be generated with the
<filename>maven-archetype-jsfwebapp</filename> <remark>(may be renamed
in a later release)</remark> archetype. Create a new directory for your project,
then run the following Maven command:
</para>
+<screen>mvn archetype:generate -DarchetypeGroupId=org.richfaces.cdk
-DarchetypeArtifactId=maven-archetype-jsfwebapp -DarchetypeVersion=4.0.0-SNAPSHOT
-DgroupId=<replaceable>org.docs.richfaces</replaceable>
-DartifactId=<replaceable>jsf-app</replaceable></screen>
+-->
+
<para>
- The following parameters can be used to customize your project:
- <variablelist>
- <varlistentry>
- <term><command>-DgroupId</command></term>
- <listitem>
- <para>
- Defines the package for the Managed Beans
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><command>-DartifactId</command></term>
- <listitem>
- <para>
- Defines the name of the project
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
+ The project can now be generated with the
<filename>maven-archetype-jsfwebapp</filename> 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 archetype is released. Create a new directory for your project, then
run the following Maven command:
</para>
+<screen>mvn archetype:generate -DarchetypeGroupId=org.richfaces.cdk
-DarchetypeArtifactId=maven-archetype-jsfwebapp -DarchetypeVersion=3.3.3-SNAPSHOT
-DgroupId=<replaceable>org.docs.richfaces</replaceable>
-DartifactId=<replaceable>jsf-app</replaceable></screen>
<para>
- The command generates a JSF project with the following structure:
+ The following parameters can be used to customize your project:
+ </para>
+ <variablelist>
+ <varlistentry>
+ <term><command>-DgroupId</command></term>
+ <listitem>
+ <para>
+ Defines the package for the Managed Beans
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><command>-DartifactId</command></term>
+ <listitem>
+ <para>
+ Defines the name of the project
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+ The command generates a JSF project with the following structure:
+ </para>
<screen><replaceable>jsf-app</replaceable>
-├── pom.xml
-└── src
- ├── main
- │ ├── java
- │ │ └── org
- │ │ └── docs
- │ │ └── richfaces
- │ │ └── Bean.java
- │ ├── resources
- │ └── webapp
- │ ├── WEB-INF
- │ │ ├── faces-config.xml
- │ │ └── web.xml
- │ ├── index.xhtml
- │ └── pages
- │ └── index.xhtml
- └── test
- └── java
- └── org
- └── docs
- └── richfaces
- └── BeanTest.java
-</screen>
- </para>
+├── <filename>pom.xml</filename>
+└── <filename>src</filename>
+ ├── <filename>main</filename>
+ │ ├── <filename>java</filename>
+ │ │ └── <filename>org</filename>
+ │ │ └── <filename>docs</filename>
+ │ │ └── <filename>richfaces</filename>
+ │ │ └── <filename>Bean.java</filename>
+ │ ├── <filename>resources</filename>
+ │ └── <filename>webapp</filename>
+ │ ├── <filename>WEB-INF</filename>
+ │ │ ├── <filename>faces-config.xml</filename>
+ │ │ └── <filename>web.xml</filename>
+ │ ├── <filename>index.xhtml</filename>
+ │ └── <filename>pages</filename>
+ │ └── <filename>index.xhtml</filename>
+ └── <filename>test</filename>
+ └── <filename>java</filename>
+ └── <filename>org</filename>
+ └── <filename>docs</filename>
+ └── <filename>richfaces</filename>
+ └──
<filename>BeanTest.java</filename></screen>
</step>
<step
id="step-Developer_Guide-Using_RichFaces_with_Maven-Add_dependencies">
<title>Add dependencies</title>
<para>
- The <filename>jsf-app</filename> directory contains a project descriptor
file, <filename>pom.xml</filename>. To add RichFaces libraries to your
project, edit the project descriptor to add dependencies to the
<sgmltag><dependencies></sgmltag> element as follows:
+ Your root directory of your project contains a project descriptor file,
<filename>pom.xml</filename>. To add RichFaces libraries to your project, edit
the project descriptor to add dependencies to the
<sgmltag><dependencies></sgmltag> element as follows:
</para>
<programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/prog-Developer_Guide-Using_RichFaces_with_Maven-Add_dependencies.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
</step>
+
+<!--
+<remark>REMOVE ONCE 4.0 ARCHETYPE IS COMPLETE</remark>
+-->
+ <step
id="step-Developer_Guide-Using_RichFaces_with_Maven-Update_the_generated_project">
+ <title>Update the generated project</title>
+ <para>
+ After the project has been generated from the old archetype, it must be updated to
use RichFaces &VERSION; and JSF 2.
+ </para>
+ <substeps>
+ <step>
+ <title>Replace <filename>index.jsp</filename>
pages</title>
+ <para>
+ RichFaces &VERSION; does not support JSP. Any
<filename>index.jsp</filename> pages that were generated must be replaced with
<filename>index.xhtml</filename> page equivalents.
+ </para>
+ </step>
+ <step>
+ <title>Deactivate the VDL view handler</title>
+ <para>
+ The <acronym>VDL</acronym> (View Definition Language) view handler
must be deactivated for your project to work with JSF 2. To deactivate the viewhandler,
edit the project's <filename>web.xml</filename> settings file with the
following context parameter:
+ </para>
+<programlisting language="XML" role="XML"><xi:include
parse="text"
href="extras/prog-Developer_Guide-Using_RichFaces_with_Maven-Update_the_generated_project.xml_sample"
xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ </step>
+ </substeps>
+ </step>
+
+
<step
id="step-Developer_Guide-Using_RichFaces_with_Maven-Build_the_project">
<title>Build the project</title>
<para>
Added:
root/docs/trunk/Developer_Guide/en-US/extras/prog-Developer_Guide-Using_RichFaces_with_Maven-Add_dependencies.xml_sample
===================================================================
---
root/docs/trunk/Developer_Guide/en-US/extras/prog-Developer_Guide-Using_RichFaces_with_Maven-Add_dependencies.xml_sample
(rev 0)
+++
root/docs/trunk/Developer_Guide/en-US/extras/prog-Developer_Guide-Using_RichFaces_with_Maven-Add_dependencies.xml_sample 2010-05-13
06:01:36 UTC (rev 17012)
@@ -0,0 +1,75 @@
+<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>4.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.framework</groupId>
+ <artifactId>richfaces-impl</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-ui</artifactId>
+ <version>3.3.3.Final</version>
+ </dependency>
+</dependencies>
Modified:
root/docs/trunk/Developer_Guide/en-US/extras/prog-Developer_Guide-Using_RichFaces_with_Maven-Add_required_repositories.xml_sample
===================================================================
---
root/docs/trunk/Developer_Guide/en-US/extras/prog-Developer_Guide-Using_RichFaces_with_Maven-Add_required_repositories.xml_sample 2010-05-12
22:53:13 UTC (rev 17011)
+++
root/docs/trunk/Developer_Guide/en-US/extras/prog-Developer_Guide-Using_RichFaces_with_Maven-Add_required_repositories.xml_sample 2010-05-13
06:01:36 UTC (rev 17012)
@@ -1,47 +1,38 @@
-<settings>
- ...
- <profiles>
+<profiles>
...
<profile>
- <id>jboss-public-repository</id>
- <repositories>
- <repository>
- <id>jboss-public-repository-group</id>
- <name>JBoss Public Maven Repository Group</name>
-
<
url>https://repository.jboss.org/nexus/content/groups/public/</url>
- <layout>default</layout>
- <releases>
- <enabled>true</enabled>
- <updatePolicy>never</updatePolicy>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>never</updatePolicy>
- </snapshots>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>jboss-public-repository-group</id>
- <name>JBoss Public Maven Repository Group</name>
-
<
url>https://repository.jboss.org/nexus/content/groups/public/</url>
- <layout>default</layout>
- <releases>
- <enabled>true</enabled>
- <updatePolicy>never</updatePolicy>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>never</updatePolicy>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
+ <id>jboss-public-repository</id>
+ <repositories>
+ <repository>
+ <id>jboss-public-repository-group</id>
+ <name>JBoss Public Maven Repository Group</name>
+
<
url>https://repository.jboss.org/nexus/content/groups/public/</url>
+ <layout>default</layout>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>jboss-public-repository-group</id>
+ <name>JBoss Public Maven Repository Group</name>
+
<
url>https://repository.jboss.org/nexus/content/groups/public/</url>
+ <layout>default</layout>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
</profile>
-
- </profiles>
-
- <activeProfiles>
- <activeProfile>jboss-public-repository</activeProfile>
- </activeProfiles>
- ...
-</settings>
+</profiles>
Added:
root/docs/trunk/Developer_Guide/en-US/extras/prog-Developer_Guide-Using_RichFaces_with_Maven-Update_the_generated_project.xml_sample
===================================================================
---
root/docs/trunk/Developer_Guide/en-US/extras/prog-Developer_Guide-Using_RichFaces_with_Maven-Update_the_generated_project.xml_sample
(rev 0)
+++
root/docs/trunk/Developer_Guide/en-US/extras/prog-Developer_Guide-Using_RichFaces_with_Maven-Update_the_generated_project.xml_sample 2010-05-13
06:01:36 UTC (rev 17012)
@@ -0,0 +1,4 @@
+<context-param>
+ <param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
+ <param-value>true</param-value>
+</context-param>