Create new RichFaces Documentation Jira issue

This will launch the RichFaces Jira page - to complete your feedback please login if needed, and submit the Jira.

JBoss.orgCommunity Documentation

Chapter 3. Setting up the environment

In order to start working with the Component Development Kit (CDK) and to create your rich component, it's necessary to have the following installed:

After the Maven is installed you should configure it. In this case, please, go to the directory where you've just installed Maven, open a conf/settings.xml file for editing and add to the profiles section this code:


...
<profile>
    <id>cdk</id>
    <repositories>
        <repository>
            <id>maven2-repository.dev.java.net</id>
            <name>Java.net Repository for Maven</name>
            <url>http://download.java.net/maven/1</url>
            <layout>legacy</layout>
        </repository>
        <repository>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
                <updatePolicy>never</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>
    <pluginRepositories>
        <pluginRepository>
            <id>maven.jboss.org</id>
            <name>JBoss Repository for Maven Snapshots</name>
            <url>http://snapshots.jboss.org/maven2/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
        </pluginRepository>
        <pluginRepository>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
                <updatePolicy>never</updatePolicy>
            </snapshots>
            <id>repository.jboss.com</id>
            <name>Jboss Repository for Maven</name>
            <url>http://repository.jboss.com/maven2/ </url>
            <layout>default</layout>
        </pluginRepository>
    </pluginRepositories>
</profile>
...

In order to activate a new profile, add the following after the profiles section:


...
<activeProfiles>
    <activeProfile>cdk</activeProfile>
</activeProfiles>
...

Note:

In order to work with Maven from Eclipse, it's possible to download and install the Maven plugin. Please, follow the instruction at Eclipse plugins for Maven page

The environment is set up now to use the Component Development Kit (CDK).

We are going to create two components throughout the RichFaces CDK Developer Guide, but at first you need take the following steps to set up the Project and create your library:

Here are some of these elements with descriptions:

Table 3.1. The POM elements

ElementDescription
groupIdPrefix for the Java package structure of your library
url Namespace for your library to be used in the TLD file
versionVersion of your library
scope Dependency scope is used to limit the transitivity of a dependency, and also to affect the classpath used for various build tasks. "Provided" scope indicates you expect the JDK or a container to provide the dependency at runtime. For example, when you build a web application with RichFaces, you would set the dependency on the Servlet API and related libraries to scope "provided" because the web container provides those classes.