Error Knowledge Base MAVEN PLUGIN_RESOLUTION_FAILURE

Plugin ... or one of its dependencies could not be resolved

Maven cannot download a build plugin (or its transitive dependencies) from configured plugin repositories.

Affected versions: All supported Apache Maven versions.

What This Error Means

Maven cannot download a build plugin (or its transitive dependencies) from configured plugin repositories.

How to Fix It

  1. Confirm the plugin version is correct and exists in the repository you expect.
  2. If the plugin is hosted outside Central, ensure <pluginRepositories> (or your mirror) includes that repository.
  3. Configure credentials for the plugin repository in ~/.m2/settings.xml under <servers> (matching repository <id>).
  4. Force updates once: mvn -U -DskipTests package.
  5. Delete cached failures under ~/.m2/repository/<groupId path>/<artifactId>/ (including *.lastUpdated), then retry.
  6. If resolution still fails, run with debug logs to see which repositories Maven is attempting: mvn -X -DskipTests package.

Why It Happens

  • The plugin version does not exist in any configured plugin repository.
  • A mirror/proxy repository is misconfigured and does not proxy the plugin's upstream repository.
  • The plugin repository requires authentication (401/403) and Maven is not sending valid credentials.
  • A cached failed download (*.lastUpdated) prevents Maven from retrying immediately.

How to Verify

  1. Re-run your Maven build and confirm the plugin downloads and executes successfully.
  2. Confirm the plugin artifacts exist under ~/.m2/repository/.

Manual plugin repository checks

  1. Identify the exact plugin coordinates Maven is trying to resolve (copy from the error output).
  2. Force a remote re-check once: mvn -U -DskipTests package.
  3. Print effective settings to check mirrors/proxies/servers: mvn -q help:effective-settings.
  4. If the plugin is internal, confirm your repository configuration includes the plugin repository (or a mirror that proxies it).

Common CLI Output

[ERROR] Plugin org.apache.maven.plugins:maven-surefire-plugin:3.2.5 or one of its dependencies could not be resolved: Could not find artifact org.apache.maven.plugins:maven-surefire-plugin:jar:3.2.5 in central (https://repo.maven.apache.org/maven2)
[ERROR] Plugin com.example:internal-plugin:1.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.example:internal-plugin:jar:1.0.0

How Maven resolves plugins

  1. Maven resolves build plugins separately from regular project dependencies.
  2. Plugins are downloaded from plugin repositories (which may be mirrored) and cached in the same local repository (~/.m2/repository).
  3. If plugin repositories are misconfigured, blocked, or missing required credentials, plugin resolution fails.

Prevention Tips

  • Pin plugin versions in pom.xml and keep them consistent across modules.
  • Use a repository manager mirror that proxies plugin repositories and caches them for CI stability.
  • Avoid duplicating plugin repository configuration across many projects, centralize it in settings.xml or a parent POM.

Where This Can Be Triggered

github.com/apache/maven/blob/maven-3.9.11/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java

When resolving plugin descriptors, Maven logs a warning and rethrows PluginResolutionException (often containing "Plugin ... or one of its dependencies could not be resolved"). - GitHub

} catch (PluginResolutionException e) {
    logger.warn("Failed to retrieve plugin descriptor for {}: {}", plugin, e.getMessage());
    throw e;
}

Need help or found a mistake? Contact RepoFlow support for questions.

Join our mailing list