Skip to content
Melloware edited this page May 12, 2024 · 10 revisions

Welcome to PrimeFaces WIKI

PrimeFaces is a popular open source framework for JavaServer Faces featuring over 100 components, touch optimized mobilekit, client side validation, theme engine and more.

Building From Source

PrimeFaces employs Apache Maven as its build tool, with the minimum required Java Development Kit (JDK) version being 11.

Building PrimeFaces Snapshots

To build PrimeFaces, start by cloning the code repository using git. Navigate to the /primefaces directory and execute the Maven build command. The master branch on GitHub corresponds to the trunk branch in SVN. Building from the master branch generates a SNAPSHOT version of the current development.

git clone https://github.com/primefaces/primefaces.git
cd primefaces
mvn clean install

Building PrimeFaces Release Versions

To build release versions of PrimeFaces from the source, utilize release tags. Below are the steps to check out the 6.0 release:

git clone https://github.com/primefaces/primefaces.git
cd primefaces
git fetch --tags
git checkout 6_0
mvn clean install

Replace 6_0 with the desired release version.

Resource Minimization

Executing mvn clean install -Prelease minimizes resources, generates a Javadoc jar, a sources jar, and JavaScript API docs in the docs/jsdocs directory.

Testing JavaScript API Docs

Since version 10.0.0, ensure JavaScript file changes are accompanied by proper doc comments to prevent Travis CI build failures. Run the following command to verify changes:

mvn clean install -Pjsdoc

This command generates the type declaration file and API docs in target/type-declaration/jsdocs. Preview changes by opening target/type-declaration/jsdocs/index.html in a browser.

Refer to the JavaScript API docs readme for detailed instructions.

Pre 7.0

Note

A specialized Maven plugin is provided for producing JSF artifacts. Initially, you may need to clone and compile the PrimeFaces maven-jsf-plugin if the version utilized is not accessible in the Prime Repository.

Build Maven JSF Plugin

If you already have maven-jsf-plugin in your local maven repository you can skip this step.

git clone https://github.com/primefaces/maven-jsf-plugin.git
cd maven-jsf-plugin
mvn clean install

Pre 7.0 Component Development

PrimeFaces JSF plugin generates the necessary artifacts including component sources, faces-config.xml, and facelets taglib. Component developers only need to implement the Renderer classes of the components. Component metadata files are defined under src/main/resources-maven-jsf folder.