Skip to content

monsterwhat/QuarkusFaces

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuarkusFaces - PrimeFaces with H2

Description

A Quarkus application using PrimeFaces for the UI and H2 as the embedded database. This project demonstrates modern Java development with Quarkus framework, Jakarta Faces, and PrimeFaces components.


Prerequisites

Before getting started with the project, make sure you have the following prerequisites installed on your system:

1. JDK 21

2. Apache Maven 3.8+

  • Download and install Maven from here.

Quick Start

Development Mode

  1. Clone or download this project

  2. Navigate to the project directory

  3. Run the development server:

    Windows:

    dev.bat

    Linux/Mac:

    chmod +x dev.sh
    ./dev.sh
  4. The application will be available at:

Production Build

  1. Build the application:

    Windows:

    build.bat

    Linux/Mac:

    chmod +x build.sh
    ./build.sh
  2. Run the built application:

    java -jar target/quarkus-app/quarkus-run.jar

Project Structure

QuarkusFaces/
├── src/
│   ├── main/
│   │   ├── java/           # Java source code
│   │   ├── resources/      # Configuration files
│   │   │   ├── application.properties
│   │   │   └── import.sql
│   │   └── webapp/         # Web resources (JSF pages)
│   └── test/               # Test source code
├── dev.bat                 # Windows development script
├── dev.sh                  # Linux/Mac development script
├── build.bat               # Windows build script
├── build.sh                # Linux/Mac build script
└── pom.xml                 # Maven configuration

Configuration

Database Configuration

The project uses H2 file-based database with following configuration (in src/main/resources/application.properties):

quarkus.datasource.db-kind=h2
quarkus.datasource.username=sa
quarkus.datasource.password=
quarkus.datasource.jdbc.url=jdbc:h2:file:${user.home}/.quarkus-faces/quarkus-faces;DB_CLOSE_DELAY=-1
quarkus.hibernate-orm.database.generation=drop-and-create
quarkus.hibernate-orm.sql-load-script=import.sql

PrimeFaces Configuration

PrimeFaces 15.0.7 is included with Jakarta EE namespace support (using the -jakarta classifier). The theme and other configurations can be customized in the web.xml or via PrimeFaces configuration files.


Development Features

  • Hot Reload: Changes to Java files are automatically recompiled and reloaded
  • Dev UI: Access development tools at http://localhost:8080/q/dev
  • Live Configuration: Modify application properties without restarting

Building for Production

Standard Build

mvn clean package

UberJar Build

mvn clean package -DskipTests

The UberJar includes all dependencies and can be run with:

java -jar target/quarkus-app/quarkus-run.jar

Native Image (Optional)

mvn package -Pnative

Key Technologies

  • Quarkus 3.30.3: Supersonic Subatomic Java
  • MyFaces Quarkus Extension 4.0.1: JSF implementation for Quarkus
  • Quarkus PrimeFaces Extension 3.15.3: PrimeFaces integration for Quarkus
  • PrimeFaces 15.0.3: UI component library for JSF
  • H2 Database: In-memory database for development
  • Hibernate ORM: JPA implementation
  • Jakarta Faces: Web framework
  • Maven: Build tool

Additional Resources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors