https://github.com/primefaces/primefaces/wiki/Building-From-Source
-
git-clone the packages:
git clone https://github.com/primefaces/maven-jsf-plugin.git git clone https://github.com/primefaces/primefaces.git
-
Find out maven-jsf-plugin version before trying to build Primefaces
-
Especially when you want to build older snapshots of Primefaces, you need to build maven-jsf-plugin that matches them
<groupId>org.primefaces</groupId> <artifactId>maven-jsf-plugin</artifactId> <version>1.3.2</version> <!-- Check this out inside primefaces/pom.xml!!! -->
-
Skip this when building the latest version
-
Now build maven-jsf-plugin
cd maven-jsf-plugin ### Checkout into the matching version (Skip this when building the latest) git checkout -b [ any name ] [ tag of the matching version ( e.g, 1_3_2 ) ] mvn clean install
-
Then, build Primefaces
cd primefaces ### Skip this when building the latest git checkout -b [ any name ] [ tag of the matching version ]
-
[For recent versions] There is a recent commit that update to jQuery 3.1 and it breaks many things. So you should replace the content of jquery.js with https://github.com/primefaces/primefaces/blob/928f919e2ab7670f0ffe4cf3578f5c87934a1ce4/src/main/resources/META-INF/resources/primefaces/jquery/jquery.js
mvn clean install
-
mvn clean install -Prelease -Dgpg.skip=true will minimize resources, creates a javadoc jar and a sources jar
- Clone the source;
- git clone
https://github.com/primefaces/showcase.git
- Build;
- Looks like build fails when you have no commercial license; So don't miss specifying community-stable profile
- mvn clean package -P community-stable
- Run it using Jetty
- mvn -Djetty.port=9090 jetty:run -P community-stable
- Access
http://localhost:9090/showcase/
- Importing into Eclipse
-
Activate "community-stable" profile only and deactivate all other profiles
-
You may have this error : “Dynamic Web Module 3.1 requires Java 1.7 or newer”
- Change the version of maven plugin like so:<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> </plugins>
- And then Maven -> Update Project
- [optional] Validation takes tremendous time per every build;
- Can deactivate validations by selecting Project Properties > Validation > Suspend all validators
- Debugging in Eclipse
- Unfortunately, debugging showcase app in a Eclipse native way was really hard; Trying various ways ended up with unsuccessful results;
- The only successful way was debugging with Remote Java Application
- See http://stackoverflow.com/questions/9066733/how-do-i-debug-a-web-application-running-on-jetty-in-eclipse
- MAVEN_OPTS : -Xdebug -Xnoagent -Djetty.port=9090 -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=y