LinuxCommandLibrary

quarkus

Develop and build Quarkus applications

TLDR

Create a new application project in a new directory

$ quarkus create app [project_name]
copy

Run the current project in live coding mode
$ quarkus dev
copy

Run the application
$ quarkus run
copy

Run the current project in continuous testing mode
$ quarkus test
copy

Add one or more extensions to the current project
$ quarkus extension add [extension_name1 extension_name2 ...]
copy

Build a container image using Docker
$ quarkus image build docker
copy

Deploy the application to Kubernetes
$ quarkus deploy kubernetes
copy

Update project
$ quarkus update
copy

SYNOPSIS

quarkus <command> [options]

PARAMETERS

create [options]
    Initializes a new Quarkus project. Options include specifying groupId, artifactId, version, build tool (Maven/Gradle), and initial extensions.

dev
    Runs the Quarkus application in development mode. This enables live coding, automatically recompiling and reloading changes without requiring a manual restart.

build [options]
    Builds the Quarkus application into a deployable artifact, typically a JAR. The --native option can be used to compile a native executable using GraalVM.

add extension <extension-name...>
    Adds one or more specified Quarkus extensions to an existing project, updating its build configuration (e.g., pom.xml or build.gradle).

test
    Executes the unit and integration tests defined within the Quarkus project.

help [command]
    Displays general help information for the quarkus CLI or detailed help for a specific subcommand.

DESCRIPTION

The quarkus command-line interface (CLI) is a developer tool designed to streamline the creation, development, and building of applications using the Quarkus framework.

Quarkus is a Kubernetes-native Java framework tailored for GraalVM and OpenJDK, focusing on high performance, fast boot times, and low memory consumption. The quarkus CLI provides a convenient way to interact with the framework, allowing users to initialize new projects, run applications in development mode with live coding capabilities, add various extensions for different functionalities (like REST, database integration, messaging), and build deployable artifacts for cloud and serverless environments. It significantly enhances developer productivity by providing an efficient and responsive development loop, making Java a first-class citizen in the modern microservices and serverless landscape.

CAVEATS

The quarkus command is not a standard Linux utility and requires a Java Development Kit (JDK 11+) and Apache Maven or Gradle installed. While it can be installed as a standalone CLI (e.g., via SDKMAN! or Homebrew), it's also commonly invoked through Maven or Gradle wrappers (e.g., ./mvnw quarkus:dev). Many commands must be executed from within the root directory of a Quarkus project.

INSTALLATION

The quarkus CLI can be installed via several methods:

  • Using SDKMAN!: sdk install quarkus
  • Using Homebrew (macOS/Linux): brew install quarkus
  • By downloading a distribution archive from the official Quarkus website and adding its bin directory to your system's PATH.

PROJECT STRUCTURE

A typical Quarkus project created with the CLI follows a standard Maven or Gradle layout, including:

  • src/main/java: For Java source code.
  • src/main/resources: For application configuration (e.g., application.properties) and static assets.
  • src/test/java: For test source code.
  • pom.xml (Maven) or build.gradle (Gradle): Project build file.

HISTORY

Quarkus was first unveiled by Red Hat in March 2019, emerging as a response to the challenges of traditional Java frameworks in cloud-native and serverless environments, specifically high memory consumption and slow startup times. It quickly gained traction due to its 'Supersonic Subatomic Java' promise, leveraging modern technologies like GraalVM, Eclipse Vert.x, Hibernate ORM with Panache, and RESTEasy Reactive to deliver unparalleled performance and efficiency for cloud-native Java applications.

SEE ALSO

mvn(1), gradle(1), java(1), sdkman(1)

Copied to clipboard