liveBook · Manning

Quarkus Maven plugin

As explained in Quarkus in Action

The Quarkus Maven plugin is a Maven plugin that integrates Quarkus project generation and build operations with Maven.

The Quarkus Maven plugin integrates Quarkus application generation and build operations with Apache Maven. It is useful when Maven is already the project build tool and provides a command-driven alternative to the Quarkus CLI or graphical starter. section 2.1 section 2.1.1

Use the plugin for two related stages:

  • Generate a new project with the create goal, supplying the project groupId, artifactId, optional extensions, and, when needed, the platform version. section 2.1.1
  • Build and manage the generated application through the plugin declaration in pom.xml, including packaging, generated code, test-code generation, and Dev mode lifecycle management. section 2.2.1
  • Select Gradle generation with -DbuildTool=gradle, even though the project creation command is invoked through Maven. section 2.1.1

Generate a REST application

Run the fully qualified plugin invocation when no Maven project setup exists. Set projectGroupId and projectArtifactId to avoid interactive prompts, and request quarkus-rest as an extension. Add -DplatformVersion=3.15.1 when reproducing a fixed platform version; otherwise, the latest available Quarkus platform version is used. section 2.1.1

$ mvn io.quarkus.platform:quarkus-maven-plugin:3.15.1:create \
    -DprojectGroupId=org.acme \
    -DprojectArtifactId=quarkus-in-action \
    -Dextensions="quarkus-rest"

Inspect the complete Maven command for creating a Quarkus project with explicit coordinates and the quarkus-rest extension. section 2.1.1

After generation, the plugin is declared in the build section of pom.xml. Its version aligns with the Quarkus platform version, while the platform BOM manages compatible extension versions. Individual Quarkus lifecycle goals normally do not require modification. A native Maven profile can additionally enable native packaging. section 2.2.1

How Quarkus in Action covers it

How deep it goes
Explains commands, pom.xml placement, lifecycle goals, version alignment, and native profiles without detailing goal internals.
Examples
Demonstrates REST project generation, explicit platform selection, pom.xml plugin configuration, and a native Maven profile.
What it assumes
Assumes familiarity with Maven coordinates and project builds while allowing project coordinates and extensions to be supplied interactively.
What you can do after
Build a Quarkus Maven project from the command line and configure its standard Quarkus build lifecycle.
How it connects
Connects Quarkus application generation with Apache Maven, Quarkus extensions, the platform BOM, Dev mode, and GraalVM native executables.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Quarkus in Action. The section links point to the parts of the book it draws on.