quarkusio/quarkus · error · IllegalStateException

Unable to locate effective artifact

Error message

Unable to locate effective artifact

What it means

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.

Source

Thrown at core/deployment/src/main/java/io/quarkus/runner/bootstrap/AugmentActionImpl.java:298

        if (metadata != null) {
            for (Map.Entry<String, String> entry : metadata.entrySet()) {
                properties.put("metadata." + entry.getKey(), entry.getValue());
            }
        }
        try {
            PropertyUtils.store(properties, quarkusArtifactMetadataPath, "Generated by Quarkus - Do not edit manually");
        } catch (IOException e) {
            log.debug("Unable to write artifact result metadata file", e);
        }
    }

    private ArtifactResultBuildItem effectiveArtifact(List<ArtifactResultBuildItem> artifactResultBuildItems) {

        Optional<PrioritizedArtifactResultBuildItem> first = toSortedPrioritizedArtifactResultStream(artifactResultBuildItems)
                .filter(bi -> bi.getPriority() > 0).findFirst();

        if (first.isEmpty()) {
            throw new IllegalStateException("Unable to locate effective artifact");
        }

        return first.get().bi();
    }

    private Stream<PrioritizedArtifactResultBuildItem> toSortedPrioritizedArtifactResultStream(
            List<ArtifactResultBuildItem> artifactResultBuildItems) {
        return artifactResultBuildItems.stream()
                .map(PrioritizedArtifactResultBuildItem::new)
                .sorted(((o1, o2) -> Integer.compare(o2.getPriority(), o1.getPriority())));
    }

    private record PrioritizedArtifactResultBuildItem(ArtifactResultBuildItem bi) {

        public int getPriority() {
            String type = bi.getType();
            // max priority
            if (type.endsWith("container")) {

View on GitHub (pinned to e1c734241f)

Solutions

  1. Verify quarkus jar/packaging extensions are present and not excluded from the build
  2. Check quarkus.package.type configuration for a value that disables artifact production
  3. Remove or fix custom BuildSteps that consume/eliminate ArtifactResultBuildItem
  4. Ensure a clean rebuild (mvn clean) so artifact build steps run

Example fix

// before (application.properties)
quarkus.package.type=unknown-custom
// after
quarkus.package.type=jar
Defensive patterns

Strategy: validation

Validate before calling

List<ArtifactResultBuildItem> artifacts = result.getBuildSteps().consumeMulti(ArtifactResultBuildItem.class);
boolean hasEffective = artifacts.stream().anyMatch(a -> result.getBuildSteps().hasBuildItem(PrioritizedArtifactResultBuildItem.class));
if (!hasEffective) { throw new IllegalStateException("No artifact result with priority > 0"); }

Try / catch

try { ArtifactResultBuildItem a = action.createProductionApplication(); } catch (IllegalStateException e) { if (e.getMessage().contains("Unable to locate effective artifact")) { /* fix packaging config */ } else { throw e; } }

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/6bf4ddd8e746402b. Report an issue: GitHub.