Skip to content

Instantly share code, notes, and snippets.

@suewonjp
Last active January 18, 2017 10:31
Show Gist options
  • Save suewonjp/d3f3245846c305be49db630ca24a1a65 to your computer and use it in GitHub Desktop.
Save suewonjp/d3f3245846c305be49db630ca24a1a65 to your computer and use it in GitHub Desktop.
Building Primefaces from source

https://github.com/primefaces/primefaces/wiki/Building-From-Source

  1. git-clone the packages:

     git clone https://github.com/primefaces/maven-jsf-plugin.git
     git clone https://github.com/primefaces/primefaces.git
    
  2. 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

  1. 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
    
  2. Then, build Primefaces

         cd primefaces
    
         ### Skip this when building the latest
         git checkout -b [ any name ] [ tag of the matching version ]
    
Building Showcases
  1. Clone the source;
  • git clone https://github.com/primefaces/showcase.git
  1. 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
  1. Run it using Jetty
  • mvn -Djetty.port=9090 jetty:run -P community-stable
  • Access http://localhost:9090/showcase/
  1. 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
  1. Debugging in Eclipse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment