quarkusio/quarkus · error · MojoExecutionException

Failed to collect dependencies of deployment artifact ${depl

Error message

Failed to collect dependencies of deployment artifact ${deploymentCoords}

What it means

The mojo collects the transitive dependency tree of the extension's deployment artifact via repoSystem.collectDependencies using the deployment artifact coords. Exceptions are wrapped as 'Failed to collect dependencies of deployment artifact <coords>'.

Source

Thrown at independent-projects/extension-maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java:1184

        try (BufferedReader reader = Files.newBufferedReader(extDescr)) {
            props.load(reader);
        }
        return props;
    }

    private static ArtifactKey toKey(org.eclipse.aether.artifact.Artifact a) {
        return DependencyUtils.getKey(a);
    }

    private CollectResult collectDeploymentDeps() throws MojoExecutionException {
        if (collectedDeploymentDeps == null) {
            final ArtifactCoords deploymentCoords = getDeploymentCoords();
            try {
                collectedDeploymentDeps = repoSystem.collectDependencies(repoSession,
                        newCollectRequest(new DefaultArtifact(deploymentCoords.getGroupId(), deploymentCoords.getArtifactId(),
                                deploymentCoords.getClassifier(), deploymentCoords.getType(), deploymentCoords.getVersion())));
            } catch (Exception e) {
                throw new MojoExecutionException("Failed to collect dependencies of deployment artifact " + deploymentCoords,
                        e);
            }
        }
        return collectedDeploymentDeps;
    }

    private ArtifactCoords getDeploymentCoords() {
        return deploymentCoords == null ? deploymentCoords = ArtifactCoords.fromString(deployment) : deploymentCoords;
    }

    private CollectRequest newCollectRuntimeDepsRequest() throws MojoExecutionException {
        return newCollectRequest(new DefaultArtifact(project.getArtifact().getGroupId(),
                project.getArtifact().getArtifactId(),
                project.getArtifact().getClassifier(),
                project.getArtifact().getArtifactHandler().getExtension(),
                project.getArtifact().getVersion()));
    }

View on GitHub (pinned to e1c734241f)

Solutions

  1. Run mvn install on the deployment module (or full reactor build) before the runtime descriptor goal
  2. Verify the deployment artifact exists in the local/remote repositories at the printed coords
  3. Run with -U to refresh snapshot metadata
  4. Inspect the wrapped cause for invalid-pom or network errors and fix accordingly

Example fix

# before: deployment artifact not installed
mvn package -pl my-ext
# after
mvn install -pl my-ext,my-ext-deployment
Defensive patterns

Strategy: validation

Validate before calling

mvn dependency:get -Dartifact=my.org:my-ext-deployment:1.0.0

Prevention

When it happens

Trigger: Deployment artifact coordinates cannot be collected: the deployment artifact doesn't exist in any repository, its POM is invalid, or repository access fails when getCollectedDeploymentDeps() first runs.

Common situations: Deployment module not built/installed before the runtime module's descriptor goal; missing repo hosting the deployment artifact; invalid deployment pom; stale snapshot metadata.

Related errors


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