Quarkus CLI
Command line tool for creating, building, and managing Quarkus projects.
Project Initialization
Create New Application
Scaffolds a new Quarkus application project.
Parameters:
| Parameter | Description | Naming Rules | Example |
|---|---|---|---|
group_id | Uniquely identifies your project | Reversed domain name (avoid uppercase) | org.acme |
artifact_id | Name of the generated application/jar | All lowercase, hyphens for spaces (kebab-case) | my-quarkus-app |
quarkus create app [group_id]:[artifact_id]
Create with Specific Extensions
Creates a project with pre-selected extensions.
quarkus create app [group_id]:[artifact_id] \
--extension=[extension_name]
Create CLI Application
Creates a command-line application project.
quarkus create cli [group_id]:[artifact_id]
Specify Build Tool
Create a project explicitly using Gradle (Kotlin DSL) or Maven.
Use Gradle with Kotlin DSL.
quarkus create app [group_id]:[artifact_id] --gradle-kotlin
Use Maven.
quarkus create app [group_id]:[artifact_id] --maven
Development Mode
Start Dev Mode
Runs the application in development mode with live coding enabled. Changes are reflected immediately.
quarkus dev
Clean Dev Mode
Forces a clean build before starting dev mode.
quarkus dev --clean
Suspend Debugger
Starts dev mode but waits for a debugger to attach before running (default port 5005).
quarkus dev --debug --suspend
Extension Management
List Extensions
Lists all available extensions or those installed in the current project.
List all installable extensions.
quarkus ext list
List installed extensions.
quarkus ext list --installed
Add Extension
Adds a dependency to your build file.
quarkus ext add [extension_name]
Remove Extension
Removes a dependency from your build file.
quarkus ext remove [extension_name]
Building and Packaging
Standard Build
Builds the application (fast-jar by default).
quarkus build
Native Image Build
Compiles the application into a native executable (requires GraalVM or Docker).
quarkus build --native
Native Build with Container
Builds a native executable using a container runtime (Docker/Podman), removing the need for local GraalVM.
quarkus build --native -Dquarkus.native.container-build=true
Skip Tests
Builds the project without running tests.
quarkus build -DskipTests
Configuration
Set Configuration Property
You can override configuration properties at runtime or build time using flags.
quarkus dev -Dquarkus.http.port=8090
Specify Profile
Run or build with a specific profile (e.g., prod, dev, test).
quarkus build -Dquarkus.profile=prod
Common Extensions
Here are some frequently used extensions to add:
quarkus-resteasy-reactive: REST API support (blocking & non-blocking)quarkus-resteasy-reactive-jackson: JSON serializationquarkus-jdbc-postgresql: PostgreSQL driverquarkus-hibernate-orm-panache: Simplified JPA/Hibernate data accessquarkus-smallrye-health: Health checksquarkus-smallrye-openapi: Swagger/OpenAPI documentation