Home
PrimeFaces is a popular open source framework for JavaServer Faces featuring over 100 components, touch optimized mobilekit, client side validation, theme engine and more.
PrimeFaces employs Apache Maven as its build tool, with the minimum required Java Development Kit (JDK) version being 11.
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
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.
Executing mvn clean install -Prelease
minimizes resources, generates a Javadoc jar, a sources jar, and JavaScript API docs in the docs/jsdocs
directory.
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.
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.
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
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.