{"record":{"id":"b7356251fef193a9","repo":"quarkusio/quarkus","slug":"the-project-artifact-s-extension-is-extension","errorCode":null,"errorMessage":"The project artifact's extension is '${extension}' while this goal expects it be 'jar'","messagePattern":"The project artifact's extension is '(.+?)' while this goal expects it be 'jar'","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"devtools/maven/src/main/java/io/quarkus/maven/BuildMojo.java","lineNumber":102,"sourceCode":"\n    /**\n     * The list of system properties defined for the plugin.\n     */\n    @Parameter\n    Map<String, String> systemProperties = Collections.emptyMap();\n\n    @Override\n    protected boolean beforeExecute() throws MojoExecutionException {\n        if (skip) {\n            getLog().info(\"Skipping Quarkus build\");\n            return false;\n        }\n        if (mavenProject().getPackaging().equals(ArtifactCoords.TYPE_POM)) {\n            getLog().info(\"Type of the artifact is POM, skipping build goal\");\n            return false;\n        }\n        if (!mavenProject().getArtifact().getArtifactHandler().getExtension().equals(ArtifactCoords.TYPE_JAR)) {\n            throw new MojoExecutionException(\n                    \"The project artifact's extension is '\" + mavenProject().getArtifact().getArtifactHandler().getExtension()\n                            + \"' while this goal expects it be 'jar'\");\n        }\n        return true;\n    }\n\n    @Override\n    protected void doExecute() throws MojoExecutionException {\n        try {\n            Set<String> propertiesToClear = new HashSet<>();\n\n            // Add the system properties of the plugin to the system properties\n            // if and only if they are not already set.\n            for (Map.Entry<String, String> entry : systemProperties.entrySet()) {\n                if (entry.getValue() == null) {\n                    continue;\n                }\n","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/maven/src/main/java/io/quarkus/maven/BuildMojo.java#L84-L120","documentation":"BuildMojo.beforeExecute validates that the Maven project's artifact handler extension is 'jar' (skipping POM packaging earlier). If the artifact extension is anything else (e.g. 'war'), the Quarkus build goal cannot proceed and this MojoExecutionException is thrown.","triggerScenarios":"Running quarkus:build on a project whose <packaging> yields an artifact handler extension other than 'jar' — most commonly war packaging or custom packaging types.","commonSituations":"Projects converted to war packaging but still running quarkus:build; custom packaging types in multi-module builds; misconfigured maven-war-plugin/maven-jar-plugin overriding the artifact handler.","solutions":["Change packaging back to jar (`<packaging>jar</packaging>`) for Quarkus applications.","If a war is needed, use quarkus-rest / appropriate extensions and keep the Quarkus build on a jar-packaged module.","Check that no plugin overrides the artifact handler extension in the POM."],"exampleFix":"// before\n<packaging>war</packaging>\n// after\n<packaging>jar</packaging>","handlingStrategy":"validation","validationCode":"if (!'jar'.equals(project.getPackaging())) throw new IllegalStateException('quarkus:build requires jar packaging, got ' + project.getPackaging())","typeGuard":null,"tryCatchPattern":"catch (MojoExecutionException e) { log.error('Packaging invalid for quarkus:build: ' + e.getMessage()); }","preventionTips":["Keep Quarkus applications on jar packaging.","Run quarkus:build only on jar-packaged modules in multi-module builds.","Audit POMs for custom packaging overrides."],"tags":["maven","packaging","configuration"],"backgroundTag":"unsupported-packaging-type","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}