liveBook · Manning

Build stage

As explained in Quarkus in Action

A build step is a Quarkus extension processing unit that consumes and produces build items during the application build.

A build stage is a Quarkus extension processing unit: a method annotated with @BuildStep that consumes and produces build items during application build time. Build stages reside in deployment-side processors and form a graph of build-time actions. section 12.2.2 section 12.2.3

A build stage commonly performs these operations:

  • Consumes build items supplied by Quarkus or other extensions, such as application metadata, dependency information, or the Jandex application index. section 12.2.3 section 12.3.5
  • Creates application models, validates class usage, registers CDI beans, or produces integration items such as HTTP routes and request filters. section 12.2.3 section 12.3.5
  • Calls a recorder when runtime behavior must be represented as generated bytecode rather than executed immediately. section 12.2.2
  • Uses STATIC_INIT or RUNTIME_INIT to control when recorded bytecode runs; STATIC_INIT can execute during native image construction. section 12.3.5 section 12.6

Generating a metadata endpoint

A processor can consume application name, version, and dependency build items, assemble a metadata JSON object, pass it to a recorder, and produce a RouteBuildItem. The Vert.x HTTP extension then consumes that item to register the configured endpoint. section 12.3.5

Figure 12.1 The relationships between build-time processing components and how they translate to runtime
figure

Trace how processors exchange build items, invoke recorders, and translate build-time processing into runtime behavior. section 12.2.3

How Quarkus in Action covers it

How deep it goes
Explains annotations, inputs, outputs, recorders, execution phases, and integration examples without detailing the complete build-item catalog.
Examples
Demonstrates metadata JSON construction, dependency scanning, recorder invocation, HTTP route registration, CDI registration, and request filtering.
What it assumes
Assumes basic Quarkus extension structure while introducing processors, build items, recorders, and build-time versus runtime execution.
What you can do after
Build it from scratch by writing a processor method that consumes build items, records runtime logic, and produces extension integration items.
How it connects
Connects processors, build items, recorders, Jandex, CDI, Vert.x HTTP, and JVM bytecode generation.

Also explained in

Compare how 2 books explain build stage →

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.