quarkusio/quarkus · error · MojoExecutionException

Failed to resolve ${a}

Error message

Failed to resolve ${a}

What it means

ExtensionDescriptorMojo.resolve() resolves a Maven artifact through the MavenArtifactResolver to obtain its file. Any resolution failure other than a MojoExecutionException (e.g. ArtifactNotFoundException or repository I/O errors) is wrapped in this MojoExecutionException naming the artifact coordinates.

Source

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

                        .setRepositorySystemSession(session)
                        .setRemoteRepositories(repos)
                        .setPreferPomsFromWorkspace(true)
                        .setCurrentProject(workspaceProvider.origin()));
                resolver = new MavenArtifactResolver(ctx);
            } catch (BootstrapMavenException e) {
                throw new MojoExecutionException("Failed to initialize Maven artifact resolver", e);
            }
        }
        return resolver;
    }

    private File resolve(org.eclipse.aether.artifact.Artifact a) throws MojoExecutionException {
        try {
            return resolver().resolve(a).getArtifact().getFile();
        } catch (MojoExecutionException e) {
            throw e;
        } catch (Exception e) {
            throw new MojoExecutionException("Failed to resolve " + a, e);
        }
    }
}

View on GitHub (pinned to e1c734241f)

Solutions

  1. Check the artifact coordinates in the error message exist and are correct in the project dependencies
  2. Run `mvn -U` to force re-download of snapshots/releases and check network/proxy access to the repository
  3. Verify the artifact is deployed/published to the configured remote repository
  4. Run `mvn install` on the local module that produces the missing artifact (often a sibling Quarkus module)

Example fix

// before: depending on a never-installed sibling module
<dependency><groupId>io.quarkus</groupId><artifactId>quarkus-myext</artifactId><version>999-SNAPSHOT</version></dependency>
// after: build/install the module first
mvn install -f extensions/myext/
Defensive patterns

Strategy: validation

Validate before calling

// verify the artifact exists before the goal runs
mvn dependency:get -Dartifact=groupId:artifactId:version

Try / catch

try { return resolver().resolve(a).getArtifact().getFile(); } catch (Exception e) { throw new MojoExecutionException("Failed to resolve " + a + " — check it exists in the configured repos", e); }

Prevention

When it happens

Trigger: Calling resolve(Artifact) during the extension-descriptor goal when the artifact (often a dependency of the extension being processed) cannot be downloaded from the configured remote repositories.

Common situations: Artifact missing from remote repos, network/proxy outage, typo in dependency coordinates, snapshot artifact purged from the repo, or offline mode with the artifact not in the local repo.

Related errors


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