quarkusio/quarkus · error · MojoExecutionException

Failed to resolve codestart artifact ${codestartArtifactCoor

Error message

Failed to resolve codestart artifact ${codestartArtifactCoords}

What it means

ExtensionDescriptorMojo resolves the codestart artifact declared by an extension to validate it exists in the configured repositories. When Maven Resolver fails to resolve the artifact coordinates (any MojoExecutionException from resolve()), it wraps the failure with the offending coordinates.

Source

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

        if (!skipCodestartValidation) {
            // first we look for it in the workspace, if it's in there we don't need to actually resolve the artifact, because it might not have been built yet
            if (workspaceProvider.getProject(codestartArtifactCoords.getGroupId(),
                    codestartArtifactCoords.getArtifactId()) != null) {
                return;
            }
            for (Artifact attached : project.getAttachedArtifacts()) {
                if (codestartArtifactCoords.getArtifactId().equals(attached.getArtifactId()) &&
                        codestartArtifactCoords.getClassifier().equals(attached.getClassifier()) &&
                        codestartArtifactCoords.getType().equals(attached.getType()) &&
                        codestartArtifactCoords.getVersion().equals(attached.getVersion()) &&
                        codestartArtifactCoords.getGroupId().equals(attached.getGroupId())) {
                    return;
                }
            }
            try {
                resolve(new DefaultArtifact(codestartArtifact));
            } catch (MojoExecutionException e) {
                throw new MojoExecutionException("Failed to resolve codestart artifact " + codestartArtifactCoords, e);
            }
        }
    }

    /**
     * If artifact contains "G:A" the project version is added to have "G:A:V" <br>
     * else the version must be defined either with ${project.version} or hardcoded <br>
     * to be compatible with AppArtifactCoords.fromString
     *
     * @param originalArtifact
     * @param projectVersion
     * @return
     */
    static String getCodestartArtifact(String originalArtifact, String projectVersion) {
        if (originalArtifact.matches("^[^:]+:[^:]+$")) {
            return originalArtifact + ":" + projectVersion;
        }
        return originalArtifact.replace("${project.version}", projectVersion);

View on GitHub (pinned to e1c734241f)

Solutions

  1. Check the codestart artifact coordinates printed in the message for typos in groupId:artifactId:version
  2. Verify the codestart artifact is actually deployed to a repository configured for the build (check settings.xml / distributionManagement)
  3. Run mvn dependency:get -Dartifact=<coords> locally to confirm it is fetchable
  4. If the codestart was refactored/renamed, update the extension's quarkus-extension.properties accordingly

Example fix

<!-- before: missing codestart in descriptor -->
<!-- after: deploy the codestart or correct coords, e.g. -->
quarkus.extension.codestart=my.org:my-codestart:${project.version}
Defensive patterns

Strategy: validation

Validate before calling

mvn dependency:get -Dartifact=my.org:my-codestart:1.0.0

Prevention

When it happens

Trigger: Running quarkus-maven-plugin:extension-descriptor on an extension whose quarkus-extension.properties declares a codestart artifact with wrong GAV, or an artifact absent from configured repositories; resolution throws and completeCodestartArtifact wraps it.

Common situations: Typos in codestart artifact coordinates in extension descriptor properties; codestart jar not deployed to remote repository; missing repository configured in settings.xml; using a project version property that doesn't interpolate.

Related errors


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