How to build mojarra from a source

I downloaded the Mojarra source code from here . I also uploaded a pom file to create source code files. It turns out that the code structure is different from the original one, and I need to create directories, but the files are there.

I created this directory structure:

laptop@Laptop javax.faces-2.1.9-sources]$ tree . |-- pom.xml `-- src `-- main |-- java | |-- com | | `-- sun | | `-- faces ....(other sub directories) | `-- javax | `-- faces ....(other sub directories) `-- resources `-- META-INF `-- MANIFEST.MF 

I created the src , main , java and resources directories, and I put the source directories in these directories, but it does not work. What is the correct way to put source code files in a package?

Best wishes

+4
source share
1 answer

As of January 16, 2017, you can create Mojarra by following these steps:

Note: Mojarra building requires ant and maven to be installed on your system. It also requires that you use the correct version of the JDK:

  • For Mojarra 2.3.x use JDK 8 (or 1.8 ).
  • For Mojarra 2.2.x use JDK 7 (or 1.7 ).
  • For Mojarra 2.1.x use JDK 6 (or 1.6 ) (I have not actually tested this).

  • Download the source from git://java.net/mojarra~git :

     git clone git://java.net/mojarra~git 
  • Go to the new mojarra~git directory:

     cd mojarra~git/ 
  • Copy build.properties.glassfish to build.properties :

     cp build.properties.glassfish build.properties 
  • Set the jsf.build.home property in the jsf.build.home file:

     jsf.build.home=/path/to/mojarra 

    This uses the (GNU) sed command:

     sed -i "s|jsf[.]build[.]home=.*|jsf.build.home=$PWD|" build.properties 
  • Mojarra 2.3.x Note: skip this step.

    Run ant to create Mojarra build tools:

     ant main clean main 
  • Run one of the following ant commands to create Mojarra:

    • Run the following command if you want to create Mojarra as one javax.faces.jar :

       ant clean main mvn.deploy.snapshot.local 

      The newly built Mojarra banner will be located in jsf-ri/build/mvn/target as javax.faces-${mojarra.version}.jar .

      Mojarra 2.3.x Note. the newly created JSF / Mojarra API will be located in jsf-api/build/mvn/target as javax.faces-api-${mojarra.version}.jar .

    • Mojarra 2.3.x Note: this command may not work for Mojarra 2.3.x

      Run the following command if you want to build Mojarra as two banks, jsf-api.jar and jsf-impl.jar :

       ant clean main mvn.pre-maven-rename.deploy.snapshot.local 

      The newly built Mojarra API jar will be located in jsf-api/build.pre-maven-rename/mvn-pre-maven-rename/target as jsf-api-${mojarra.version}.jar . The newly built Mojarra banner will be located in jsf-ri/build.pre-maven-rename/mvn-pre-maven-rename/target as jsf-impl-${mojarra.version}.jar .

Mojarra's snapshot box will also be installed in your local ~/.m2/ for maven purposes.

+3
source

All Articles