Sponsoring
If you like this project, please consider supporting me ❤️
Goals
The main goal was to take an out-of-the-box Faces (formerly JSF)
application (PrimeFaces Showcase)
and get it running in Quarkus and deployed as a GraalVM Native executable or an UberJar single
executable JAR.
Application
See QuarkusFaces Showcase running live in GraalVM on a free cloud
hosting using 0.1 VCPU and 512MB RAM. It is an underpowered machine, but it gets the point across.
Optimizations
- Apache MyFaces (Quarkus) instead of Jakarta Mojarra (Wildfly)
- PrimeFaces MOVE_SCRIPTS_TO_BOTTOM
- Quarkus Brotli
Compression quarkus.http.enable-compression=true - OmniFaces CombinedResourceHandler
- PrimeFaces
Extensions CombinedResourceHandler Helper - jQuery Hide Page Until Complete
- Caffeine High Performance Caching
Development
To run the example in Dev mode:
git clone https://github.com/melloware/quarkus-faces
cd quarkus-faces
mvn quarkus:devThen open your web browser to http://localhost:8000/
Production Fast-Jar
To run the example in HotSpot Production mode Fast-Jar:
git clone https://github.com/melloware/quarkus-faces
cd quarkus-faces
mvn -Pfast
java -jar target/quarkus-app/quarkus-run.jarThen open your web browser to http://localhost:8000/
quarkus-faces 15.0.0 on JVM (powered by Quarkus 3.32.2) started in 1.383sProduction Uber-Jar
To run the example in HotSpot Production mode Uber-Jar:
git clone https://github.com/melloware/quarkus-faces
cd quarkus-faces
mvn -Puber
java -jar target/quarkus-faces-runner.jarThen open your web browser to http://localhost:8000/
quarkus-faces 15.0.0 on JVM (powered by Quarkus 3.32.2) started in 1.381sProduction Ahead-of-Time (AOT) Caching
To run the example in JDK25 Ahead-of-Time (AOT) Caching mode:
git clone https://github.com/melloware/quarkus-faces
cd quarkus-faces
mvn -Paot
java -XX:AOTCache=target/quarkus-app/app.aot -jar target/quarkus-app/quarkus-run.jarThen open your web browser to http://localhost:8000/
quarkus-faces 15.0.0 on JVM (powered by Quarkus 3.32.2) started in 0.622sDocker JVM
Builds a Docker image running as a standard JVM application.
mvn clean package -Ddocker
docker run -i --rm -p 8000:8000 melloware/quarkus-faces:latest
Docker Native
Builds a native Docker image running as a GraalVM (Mandrel) application.
mvn -Pnative-docker
docker run -i --rm -p 8000:8000 melloware/quarkus-faces:${version}
quarkus-faces 15.0.0 native (powered by Quarkus 3.32.2) started in 0.178s
Known Issues
We have a WIKI page where we are keeping track
of known issues while developing with
Quarkus/MyFaces/PrimeFaces. Please feel free to contribute to that page if you find anything you think others should
know!
