{"record":{"id":"6bf4ddd8e746402b","repo":"quarkusio/quarkus","slug":"unable-to-locate-effective-artifact","errorCode":null,"errorMessage":"Unable to locate effective artifact","messagePattern":"Unable to locate effective artifact","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"core/deployment/src/main/java/io/quarkus/runner/bootstrap/AugmentActionImpl.java","lineNumber":298,"sourceCode":"        if (metadata != null) {\n            for (Map.Entry<String, String> entry : metadata.entrySet()) {\n                properties.put(\"metadata.\" + entry.getKey(), entry.getValue());\n            }\n        }\n        try {\n            PropertyUtils.store(properties, quarkusArtifactMetadataPath, \"Generated by Quarkus - Do not edit manually\");\n        } catch (IOException e) {\n            log.debug(\"Unable to write artifact result metadata file\", e);\n        }\n    }\n\n    private ArtifactResultBuildItem effectiveArtifact(List<ArtifactResultBuildItem> artifactResultBuildItems) {\n\n        Optional<PrioritizedArtifactResultBuildItem> first = toSortedPrioritizedArtifactResultStream(artifactResultBuildItems)\n                .filter(bi -> bi.getPriority() > 0).findFirst();\n\n        if (first.isEmpty()) {\n            throw new IllegalStateException(\"Unable to locate effective artifact\");\n        }\n\n        return first.get().bi();\n    }\n\n    private Stream<PrioritizedArtifactResultBuildItem> toSortedPrioritizedArtifactResultStream(\n            List<ArtifactResultBuildItem> artifactResultBuildItems) {\n        return artifactResultBuildItems.stream()\n                .map(PrioritizedArtifactResultBuildItem::new)\n                .sorted(((o1, o2) -> Integer.compare(o2.getPriority(), o1.getPriority())));\n    }\n\n    private record PrioritizedArtifactResultBuildItem(ArtifactResultBuildItem bi) {\n\n        public int getPriority() {\n            String type = bi.getType();\n            // max priority\n            if (type.endsWith(\"container\")) {","sourceCodeStart":280,"sourceCodeEnd":316,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/core/deployment/src/main/java/io/quarkus/runner/bootstrap/AugmentActionImpl.java#L280-L316","documentation":"During augmentation, Quarkus collects ArtifactResultBuildItem outputs (jar, fast-jar, mutable-jar, etc.) and picks the effective artifact by priority. This error means no artifact result had a positive priority, so AugmentActionImpl could not determine which final artifact the build produced. It signals a build pipeline where no artifact-producing build step ran.","triggerScenarios":"Calling AugmentActionImpl.createProductionApplication() (or another augment path that resolves the effective artifact) when the build produced no ArtifactResultBuildItem with priority > 0 — e.g. all artifact results were filtered out, a custom build step removed/replaced the standard artifact producers, or the jar-building extension was excluded.","commonSituations":"Custom packaging setups or excluded extensions (no jar/container packaging steps), broken user-added BuildSteps that consume or drop ArtifactResultBuildItem, or customized quarkus.package configuration that disables all package types.","solutions":["Verify quarkus jar/packaging extensions are present and not excluded from the build","Check quarkus.package.type configuration for a value that disables artifact production","Remove or fix custom BuildSteps that consume/eliminate ArtifactResultBuildItem","Ensure a clean rebuild (mvn clean) so artifact build steps run"],"exampleFix":"// before (application.properties)\nquarkus.package.type=unknown-custom\n// after\nquarkus.package.type=jar","handlingStrategy":"validation","validationCode":"List<ArtifactResultBuildItem> artifacts = result.getBuildSteps().consumeMulti(ArtifactResultBuildItem.class);\nboolean hasEffective = artifacts.stream().anyMatch(a -> result.getBuildSteps().hasBuildItem(PrioritizedArtifactResultBuildItem.class));\nif (!hasEffective) { throw new IllegalStateException(\"No artifact result with priority > 0\"); }","typeGuard":null,"tryCatchPattern":"try { ArtifactResultBuildItem a = action.createProductionApplication(); } catch (IllegalStateException e) { if (e.getMessage().contains(\"Unable to locate effective artifact\")) { /* fix packaging config */ } else { throw e; } }","preventionTips":["Keep quarkus packaging extensions in the dependency list","Do not write BuildSteps that consume ArtifactResultBuildItem without producing a replacement","Run mvn clean after changing packaging configuration"],"tags":["quarkus","augmentation","packaging"],"backgroundTag":"no-artifact-produced","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}