{"record":{"id":"d11ef5878c0bfc68","repo":"quarkusio/quarkus","slug":"failed-to-build-quarkus-application","errorCode":null,"errorMessage":"Failed to build quarkus application","messagePattern":"Failed to build quarkus application","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"devtools/maven/src/main/java/io/quarkus/maven/BuildMojo.java","lineNumber":190,"sourceCode":"                            original.setFile(result.getJar().getPath().toFile());\n                        } else {\n                            projectHelper.attachArtifact(mavenProject(), result.getJar().getPath().toFile(),\n                                    result.getJar().getClassifier());\n                        }\n                        if (attachSboms) {\n                            for (var sbom : result.getJar().getSboms()) {\n                                projectHelper.attachArtifact(mavenProject(), sbom.getFormat(), sbom.getClassifier(),\n                                        sbom.getSbomFile().toFile());\n                            }\n                        }\n                    }\n                }\n            } finally {\n                // Clear all the system properties set by the plugin\n                propertiesToClear.forEach(System::clearProperty);\n            }\n        } catch (Exception e) {\n            throw new MojoExecutionException(\"Failed to build quarkus application\", e);\n        }\n    }\n\n    @Override\n    public void setLog(Log log) {\n        super.setLog(log);\n        MojoLogger.delegate = log;\n    }\n}\n","sourceCodeStart":172,"sourceCodeEnd":200,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/maven/src/main/java/io/quarkus/maven/BuildMojo.java#L172-L200","documentation":"BuildMojo.doExecute wraps any Exception from the Quarkus application build (bootstrap, augmentation, packaging) into this MojoExecutionException, after clearing any system properties the plugin had set in a finally block. It is the top-level failure signal for quarkus:build.","triggerScenarios":"Any exception in the doExecute try block: application compilation errors, augmentation/dependency resolution failures, config validation errors, or failures in application model building.","commonSituations":"Code does not compile; unsatisfied CDI/extension configuration (e.g. missing datasource); dependency conflicts surfaced during augmentation; system-property-driven build misconfiguration.","solutions":["Read the 'Caused by' chain to find the root cause (compilation error, config problem, etc.).","Run `mvn clean` and rebuild to clear stale augmentation output.","Fix the application config or code issue reported during the augmentation phase, then rerun quarkus:build."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// pre-validate config before build\nif (Files.exists(Path.of('src/main/resources/application.properties')) && hasUnsetPlaceholders()) throw new IllegalStateException('Resolve config placeholders before quarkus:build')","typeGuard":null,"tryCatchPattern":"catch (MojoExecutionException e) { Throwable root = e; while (root.getCause() != null) root = root.getCause(); log.error('quarkus:build failed, root cause: ' + root.getMessage(), root); }","preventionTips":["Compile (`mvn compile`) before quarkus:build to isolate code errors.","Keep application.properties valid; validate config early.","Run `mvn clean` when augmentation state looks stale.","Keep dependency versions aligned with the Quarkus platform BOM."],"tags":["maven","build","augmentation"],"backgroundTag":"build-failed","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"}