I downloaded the Mojarra source code from here. I also downloaded the pom file to build the source code files. It turns out that the code structure is different from the original and I need to create directories and but the files 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 directories src
, main
, java
and resources
and I placed the source code directories in those directories but it's not working. What is the proper way to place the source code files into the the package?
Best wishes
As of Jan 16, 2017, you can build Mojarra using the following steps:
Note: building Mojarra requires that ant
and maven
be installed on your system. It also requires that you are using the correct JDK version:
2.3.x
use JDK 8
(or 1.8
).2.2.x
use JDK 7
(or 1.7
).2.1.x
use JDK 6
(or 1.6
) (I haven't actually tested this).Download the source from git://java.net/mojarra~git
:
git clone git://java.net/mojarra~git
Navigate to your 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 your build.properties
file:
jsf.build.home=/path/to/mojarra
Here's a (GNU) sed
command to do this:
sed -i "s|jsf[.]build[.]home=.*|jsf.build.home=$PWD|" build.properties
Mojarra 2.3.x
Note: skip this step.
Run ant
to build the Mojarra build tools:
ant main clean main
Run one of the following ant
commands to build Mojarra:
Run the following command if you want to build Mojarra as a single javax.faces.jar
:
ant clean main mvn.deploy.snapshot.local
The newly built Mojarra jar will be located in jsf-ri/build/mvn/target
as javax.faces-${mojarra.version}.jar
.
Mojarra 2.3.x
Note: the newly built JSF/Mojarra API jar 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 a two jars, 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 jar will be located in jsf-ri/build.pre-maven-rename/mvn-pre-maven-rename/target
as jsf-impl-${mojarra.version}.jar
.
The Mojarra snapshot jar(s) will also be installed in your local ~/.m2/
repository for maven purposes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With