JBossWiki : RichFacesRepositoryStructureOverview
Wiki Home: RichFacesRepositoryStructureOverview [EN]
[Permalink]
[Recent Changes]
[History]
[RSS Feed][RDF Feed][Atom Feed][Print]

RichFaces SVN Repository. Structure Overview


Structure

JBoss RichFaces repository has the following directories on the top level:

  • cdk - the RichFaces Component Developer Kit
  • docs - the root folder for building RichFaces Developers Guide
  • extensions - the additional extension to the main package. Includes extension for gwt, Portal, Seam (not required any more), Trinidad
  • framework - the codebase for RichFaces API and RichFaces Impl libraries
  • samples - the examples that are used for developing and testing RichFaces components
  • sandbox - an incubator for future RichFaces components
  • test-applications - the test suite that QA team is used to test the components
  • ui - the main project with source code for RichFaces Components

ui directory

JBoss RichFaces is a Maven driven project. Thus, the project structure is based on the approaches provided by Maven.

RichFaces CDK (Component Development Kit) is used for developing RichFaces components. CDK generates the read-to-use JSF library based on the source code located in the richfaces directory.

RichFaces project contains several sub-projects. Each subproject is used to develop a particular set of components independently from each other.

The examples: sub-projects are:

  • dataFilterSlider
  • dataTable
  • drag-drop
  • dropdown-menu
  • gmap
  • etc.

Some sub-projects depend on other project(s). For example, dropdown-menu sub-project where rich:dropDownMenu component is developed depending on a menu-components project where rich:menuItem, rich:menuGroup and rich:menuSeparator are developed.

During the component development, each subproject is built separately and the result jar contains only a developing component (or a set of them). This jar (small library) is not distributed to public, but used only for testing purposes.

The special subproject 'assembly' is used to build an integration library that is distributed to public.

samples directory

samples contains the source code for main richfaces-demo and test projects that are used for testing RichFaces components during the development phase.

As it is mentioned above, RichFaces components have been developed separately from each other. This means that the test projects use not the integration library, but the library that contains only the testing component(s).

How to Build samples Applications

Those application are Maven driven. Thus, it's necessary to have a Maven installed and configured. See " How to Configure Maven for RichFaces" how to accomplish it.

After the Maven is installed and configured, you can launch "mvn install" to build the example. If you launch this command right at the sample directory, all available applications are built. The result war file will be located at the target directory of each project.

How to work with samples Applications in Eclipse

This instruction presumes that you use Eclipse and at least the original WTP 1.5 plugin installed. Red Hat Developers Studio also contains original WTP 1.5, so you can use it as well.

Preparation:

Those steps should be followed once, before you import a first Maven based project.

1. Maven. You need Maven installed and configured, as it is directed above.

2. Maven Classpath Variable - M2_REPO. Select "Window->Preferences". In the Preferences dialog: "Java->Build Path->Classpath Variables". Click "New....". Type M2_REPO for name, and choice path the Maven repository. Click "OK" and close the Preferences dialog. Note for Maven newbies: Maven repository is not the same that directory where you installed the Maven files. The default path to it is ~/.m2/repository. You can change the path in the <Maven-root>/conf/setting.xml file.

Import:

1. At the root of the project perform the following Maven command:

mvn eclipse:eclipse -DdownloadSources=true -Dwtpversion=1.5

This magic command creates an eclipse project meta files with WTP support. Also, it instructs to attach the available source code for each libraries used in the project. Really cool!

2. Launch Eclipse and open the Import Project wizard. Use "Existing Projects into Workspace" option. Select the root directory of the project and click Finish.

3. On the Server View, right click on the current Server and add the project to deployment

Launch Server (for example, Tomcat) from Server View. Launch a browser and type the URL to the application. If you can see the application up-and-running, you have done the import right.

Re-import:

If you switch to the new version of RichFaces (for example, from 3.1.0-SNAPSHOT to 3.1.1-SNAPSHOT) you need to re-import the project. Otherwise, it does not see the changes in the library. In particular situation, re-import is a good solution when Eclipse starts to produce unexpected glitches.

In order to re-import:

1. Delete the project from the Eclipse workspace (without deleting the content)

2. At the root of the project perform the following Maven command:

mvn eclipse:clean

3. Follow the instruction for the "Import" mentioned above.


Other languages:

Log in to make links between pages

The page last changed on Wed Oct 10 09:23:24 EDT 2007 by smukhina