PrimeFaces can be used in all web applications based on Java Server Faces (version 2.x) which are run on Servlet Containers (e.g. Wildlfy or Tomcat or GlassFish).
There are several ways you can add PrimeFaces to your application.
Download the primefaces-{version}.jar
and add it to you classpath.
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>{version}</version>
</dependency>
For older versions (3.5 and below) you additionally have to add the PrimeFaces repository:
<repository>
<id>prime-repo</id>
<name>PrimeFaces Maven Repository</name>
<url>http://repository.primefaces.org</url>
<layout>default</layout>
</repository>
repositories {
mavenCentral()
maven {
url "http://repository.primefaces.org"
}
}
dependencies {
compile "org.primefaces:primefaces:{version}"
}
PrimeFaces is bundled with the Java EE bundle of NetBeans. When you create a new "Java Web -> Web Application" you can select JavaServer Faces as framework. Then you configure JSF to use PrimeFaces components. It will copy the library to your project.
If you have created a Maven web application, you can select project properties and select JavaServer Faces as framework and then select PrimeFaces as mentioned above. Your pom.xml
will be modified to include the PrimeFaces dependency.