Skip to content

quarkus packaging type overridden by jar default when generating project with codestart extensions that provide a pom.xml.tpl.qute template #52679

@mcollovati

Description

@mcollovati

Describe the bug

When generating a new Quarkus project using quarkus-maven-plugin 3.31+ with extensions that provide a codestart containing a pom.xml.tpl.qute template (e.g. vaadin, quarkus-jnosql-couchdb), the new quarkus packaging type introduced in 3.31 is silently overridden by the default jar packaging. This results in the quarkus-maven-plugin having no build executions configured, causing mvn quarkus:dev to fail with a warning and skip execution.

The issue appears to lie in the POM merge process during project generation.
If an extension codestart provides a pom.xml.tpl.qute template that does not explicitly declare a <packaging> element, the related Maven model assumes the default value of jar by default.

When ModelMerger.mergeModel_Packaging method is invoked with sourceDominant=true, the default jar value takes precedence over the intial quarkus packaging type that Quarkus itself sets.

Here's a representative example of an extension template that triggers this:
https://github.com/vaadin/quarkus/blob/main/runtime/src/main/codestarts/quarkus/flow-codestart/base/pom.xml.tpl.qute

Expected behavior

The <packaging>quarkus</packaging> tag should be present in the generated pom.xml regardless of whether any of the selected extensions contribute a pom.xml.tpl.qute codestart template.

Actual behavior

The project is created without a packaging type in POM, resulting in the default JAR lifecycle.
However, the POM file does also not define an execution for quarkus-maven-plugin goals, so the application does not start in dev mode.

How to Reproduce?

  1. Generate a project with only the rest extension (works correctly):
mvn -ntp io.quarkus.platform:quarkus-maven-plugin:3.31.1:create \
  -Dextensions=rest \
  -DwithCodestart \
  -DprojectGroupId=my.package \
  -DprojectArtifactId=working

The generated pom.xml correctly contains <packaging>quarkus</packaging> and no explicit plugin executions are needed.

  1. Generate a project adding an extension that ships a pom.xml.tpl.qute codestart template (e.g. vaadin or quarkus-jnosql-couchdb):
mvn -ntp io.quarkus.platform:quarkus-maven-plugin:3.31.1:create \
  -Dextensions=rest,vaadin \
  -DwithCodestart \
  -DprojectGroupId=my.package \
  -DprojectArtifactId=notworking

The generated pom.xml is missing <packaging>quarkus</packaging> and has no plugin executions configured.

  1. Run mvn quarkus:dev in the generated project; it skips with the following warning:
[WARNING] Skipping quarkus:dev as this is assumed to be a support library. To disable this warning set
warnIfBuildGoalMissing parameter to false.
To enable quarkus:dev for this module, make sure the quarkus-maven-plugin configuration includes the
build goal or disable the enforceBuildGoal flag (via plugin configuration or via
-Dquarkus.enforceBuildGoal=false).

Output of uname -a or ver

Linux 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

OpenJDK Runtime Environment Temurin-21.0.6+7 (build 21.0.6+7-LTS)

Quarkus version or git rev

3.31+

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.11 (3e54c93a704957b63ee3494413a2b544fd3d825b)

Additional information

Quarlus user chat discussion: https://quarkusio.zulipchat.com/#narrow/channel/187030-users/topic/Quarkus.20packaging.20type.20not.20always.20set.20in.20POM

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions