Quarkus 3.40.1.1’s dev mode now sorts the goals attached to each Maven phase by their priority, a change that restores the generation of gRPC stubs that previously failed when running mvn clean quarkus:dev.
Incorrect goal order blocked gRPC generation
Developers observed that invoking mvn clean compile quarkus:dev produced the expected gRPC Java classes, while the shorter mvn clean quarkus:dev command left them missing. The build log showed the generate‑code goal executing before the resources goal, so the application.properties file containing the quarkus.generate-code.grpc.scan-for-proto setting was not yet copied into target/classes when the generator ran, causing it to ignore the configuration.
Maven’s priority rule versus dev mode’s shortcut
In a standard Maven build, each phase can contain multiple goals. Maven assigns each goal an explicit priority number; the lower the number, the earlier the goal runs. When two goals share the same priority, Maven falls back to the order declared in pom.xml. Dev mode, however, bypasses Maven for early phases and simply iterates over the plugins in declaration order, which placed the Quarkus generate‑code goal ahead of the resources goal. Both reports confirm that this deviation from Maven’s ordering logic caused the gRPC settings to be read too early.
Implemented sorting and priority adjustment
The fix adds a sorting step that mirrors Maven’s behavior: executions.sort(Comparator.comparingInt(pe -> pe.execution.getPriority())); This stable sort ensures that goals with lower priority run first while preserving the relative order of goals sharing the same priority. To guarantee that a copy of the generate‑code goal, which dev mode injects into the compile phase when the original goal lacks an explicit phase, always runs before compilation, the code assigns it Integer.MIN_VALUE (the smallest possible int). The original implementation also inserted the copy at the front of the list; the new version relies solely on the priority value, eliminating the duplicate ordering mechanism.
Code review refinements and test coverage
During review, contributors questioned the need for both the priority assignment and the explicit list insertion. As detailed in the sources, the smallest priority alone fulfills the ordering requirement, so the insertion logic was dropped. Additional unit tests were added: one confirms that after sorting, the resources goal precedes generate‑code in the process‑resources phase, and another verifies that a copy placed at the end of the compile list still sorts to the front, proving the priority approach works regardless of list position. The changes were approved by the project’s maintainers and merged on 5 November 2026.
Implications for Quarkus developers
Aligning dev mode with Maven’s priority scheme eliminates a class of subtle bugs where configuration files are read before they are materialised, a scenario that can surface with any plugin that depends on resources generated earlier in the build. For teams that rely on gRPC code generation, the update restores the expected live‑reload workflow, allowing developers to edit .proto files and see changes instantly without needing a full clean‑compile cycle. More broadly, the change underscores the importance of faithfully reproducing build‑tool semantics when a framework implements its own shortcut paths; deviations can lead to hard‑to‑track ordering issues. Projects that extend Quarkus with custom Maven plugins should now see consistent ordering in both dev mode and standard builds, reducing the need for ad‑hoc fixes.
Cover: unknown author · CC0 · rawpixel. Layout and headline text by Signal Titans. Logo: Quarkus, via Wikimedia Commons (Public domain).
Source: I fixed Quarkus dev mode running two Maven steps in the wrong order · quarkus:dev ignores gRPC settings in application.properties

Leave a Reply